Advertisement
rengetsu

VGTU_ACM_ICPC_B

Oct 12th, 2018
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.46 KB | None | 0 0
  1. // VGTU ACM ICPC selection B
  2. #include <iostream>
  3. using namespace std;
  4. int main()
  5. {
  6.     int t, n, q[13][13], z=1;
  7.     cin >> t;
  8.     for(int i=0;i<t;i++)
  9.     {
  10.         cin >> n;
  11.         for(int y=1;y<n;y++)
  12.         {
  13.             cin >> q[n][y];
  14.         }
  15.         for(int d=1;d<n;d++)
  16.         {
  17.             if(z!=q[n][d]){cout<<z<<endl;break;}
  18.             else if(d==n-1){cout<<z+1<<endl;}
  19.             z++;
  20.         }
  21.         z=1;
  22.     }
  23.     return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement