crowulll

Untitled

Aug 3rd, 2020
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.48 KB | None | 0 0
  1. #include<iostream>
  2. #include<vector>
  3. using namespace std;
  4. int t;
  5. int main(){
  6.     cin >> t;
  7.     for (int v = 0; v < t; ++v){
  8.         int n;
  9.         cin >> n;
  10.         vector <int> a(n + 1);
  11.         for (int i = 1; i < n + 1; ++i)
  12.             cin >> a[i];
  13.         int ones = 0; int i = 1;
  14.         while (a[i] == 1 && i != n){
  15.             ++ones;
  16.             ++i;
  17.         }
  18.         if (ones % 2 == 1) cout << "Second" << endl;
  19.         else cout << "First" << endl;
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment