T3000

Untitled

Jan 19th, 2022
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.51 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2.  
  3. using namespace std;
  4. using ll = long long;
  5.  
  6. int main()
  7. {
  8.     ll t, t2, a;
  9.     vector<ll> z1;
  10.     cin >> t;
  11.     t2 = t - 1;
  12.     while (t-- > 0)
  13.     {
  14.         cin >> a;
  15.         z1.push_back(a);
  16.     }
  17.     for (int i = 0; i < t2; i++)
  18.     {
  19.  
  20.         cin >> a;
  21.         for (int p = 0; p < t2; p++)
  22.         {
  23.             if (a == z1.at(p))
  24.             {
  25.                 z1.erase(z1.begin() + p);
  26.             }
  27.         }
  28.     }
  29.     cout << z1.at(0) << '\n';
  30.  
  31.     return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment