fork download
  1. #include <iostream>
  2. #include <set>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. int n,k;
  8. set<int >s;
  9. cin>>n;
  10. for(int i=0;i<n;i++)
  11. {
  12. cin>>k;
  13. s.insert(k);
  14. }
  15. for(int i=0;i<n-1;i++)
  16. {
  17. cin>>k;
  18. s.erase(k);
  19. }
  20. if(s.begin()==s.end())
  21. cout<<"No Difference"<<"\n";
  22. else
  23. cout<<*s.begin()<<"\n";
  24. return 0;
  25. }
Success #stdin #stdout 0s 15232KB
stdin
5
1 2 3 4 4
1 2 3 4
stdout
No Difference