Codeforces 519B. A and B and Compilation Errors Solution
Solution in C++:
///**********ALLAH IS ALMIGHTY************///
///AH Tonmoy
///Department of CSE,23rd batch
///Islamic University,Bangladesh
- #include<iostream>
- using namespace std;
- int main()
- {
- int n,s1=0,s2=0,s3=0,i;
- cin>>n;
- int a[n+1];
- for(i=0; i<n; i++)
- {
- cin>>a[i];
- s1=s1+a[i];
- }
- for(i=0; i<n-1; i++)
- {
- cin>>a[i];
- s2=s2+a[i];
- }
- for(i=0; i<n-2; i++)
- {
- cin>>a[i];
- s3=s3+a[i];
- }
- cout<<s1-s2<<endl;
- cout<<s2-s3<<endl;
- }
No comments