T3000

Untitled

Jan 19th, 2022
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.80 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, t2s, t3, a;
  9.     vector<ll> z1;
  10.     vector<ll> z2;
  11.     cin >> t;
  12.     t2 = t - 1;
  13.     t2s = t2;
  14.     t3 = t;
  15.     while (t-- > 0)
  16.     {
  17.         cin >> a;
  18.         z1.push_back(a);
  19.     }
  20.     while (t2-- > 0)
  21.     {
  22.         cin >> a;
  23.         z2.push_back(a);
  24.     }
  25.     ll z = 0;
  26.     for (int i = 0; i < t3; i++)
  27.     {
  28.         z = 0;
  29.         for (int p = 0; p < t2s; p++)
  30.         {
  31.             if (z1.at(i) == z2.at(p))
  32.             {
  33.                 z = 1;
  34.                 break;
  35.             }
  36.             else
  37.             {
  38.                         }
  39.         }
  40.         if (z == 0)
  41.         {
  42.             cout << z1.at(i) << '\n';
  43.             return 0;
  44.         }
  45.     }
  46.  
  47.     return 0;
  48. }
Advertisement
Add Comment
Please, Sign In to add comment