Diff
checker
Text
Text
Images
Documents
Excel
Folders
Legal
Enterprise
Desktop
Pricing
Sign in
Download Diffchecker Desktop
Compare text
Find the difference between two text files
Tools
History
Real-time editor
Hide unchanged lines
Disable line wrap
Layout
Split
Unified
Diff precision
Smart
Word
Char
Syntax highlighting
Choose syntax
Ignore
Transform text
Go to first change
Edit input
Diffchecker Desktop
The most secure way to run Diffchecker. Get the Diffchecker Desktop app: your diffs never leave your computer!
Get Desktop
diff in code
Created
6 years ago
Diff never expires
Clear
Export
Share
Explain
2 removals
Lines
Total
Removed
Characters
Total
Removed
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
24 lines
Copy
3 additions
Lines
Total
Added
Characters
Total
Added
To continue using this feature, upgrade to
Diff
checker
Pro
View Pricing
23 lines
Copy
Copy
Copied
Copy
Copied
vector
v;
vector
<int>
v;
for(i=0;i<n;i++){
for(i=0;i<n;i++){
cin>>x; ch+=x; v.push_back(x);
cin>>x; ch+=x; v.push_back(x);
}
}
if(ch%360==0) cout<<"YES"<<endl;
if(ch%360==0) cout<<"YES"<<endl;
else if(ch%2==0){
else if(ch%2==0){
Copy
Copied
Copy
Copied
ch/=2;
for(mask=0;mask<(1LL<<n);mask++){
for(mask=0;mask<(1LL<<n);mask++){
ans=0;
ans=0;
for(i=0;i<n;i++){
for(i=0;i<n;i++){
if(mask & (1LL<<i)){
if(mask & (1LL<<i)){
ans+=v[i];
ans+=v[i];
}
}
Copy
Copied
Copy
Copied
if(
ans
==ch
) {
if(
(ch-2*
ans
)%360 == 0
) {
cout<<"YES"<<endl;
cout<<"YES"<<endl;
return 0;
return 0;
}
}
}
}
}
}
cout<<"NO"<<endl;
cout<<"NO"<<endl;
} else {
} else {
cout<<"NO"<<endl;
cout<<"NO"<<endl;
}
}
Saved diffs
Original text
Open file
vector v; for(i=0;i<n;i++){ cin>>x; ch+=x; v.push_back(x); } if(ch%360==0) cout<<"YES"<<endl; else if(ch%2==0){ ch/=2; for(mask=0;mask<(1LL<<n);mask++){ ans=0; for(i=0;i<n;i++){ if(mask & (1LL<<i)){ ans+=v[i]; } if(ans==ch) { cout<<"YES"<<endl; return 0; } } } cout<<"NO"<<endl; } else { cout<<"NO"<<endl; }
Changed text
Open file
vector<int> v; for(i=0;i<n;i++){ cin>>x; ch+=x; v.push_back(x); } if(ch%360==0) cout<<"YES"<<endl; else if(ch%2==0){ for(mask=0;mask<(1LL<<n);mask++){ ans=0; for(i=0;i<n;i++){ if(mask & (1LL<<i)){ ans+=v[i]; } if((ch-2*ans)%360 == 0) { cout<<"YES"<<endl; return 0; } } } cout<<"NO"<<endl; } else { cout<<"NO"<<endl; }
Find difference