Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<vector>
- using namespace std;
- int t;
- int main(){
- cin >> t;
- for (int v = 0; v < t; ++v){
- int n;
- cin >> n;
- vector <int> a(n + 1);
- for (int i = 1; i < n + 1; ++i)
- cin >> a[i];
- int ones = 0; int i = 1;
- while (a[i] == 1 && i != n){
- ++ones;
- ++i;
- }
- if (ones % 2 == 1) cout << "Second" << endl;
- else cout << "First" << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment