Saleh127

CF 1382b.cpp

Jul 21st, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define test int t; cin>>t; while (t--)
  4. #define ll long long int
  5. #define fellow_junior ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
  6. int main()
  7. {
  8. fellow_junior
  9. test
  10. {
  11. ll a[200000],c,d=0,e,f,i,j,k,l;
  12. cin>>c;
  13. for(i=0; i<c; i++)
  14. {
  15. cin>>a[i];
  16. }
  17. for(i=0; i<c; i++)
  18. {
  19. if(a[i]>1)
  20. {
  21. d=i+1;
  22. break;
  23. }
  24. }
  25. if(d%2==1 || c==1) cout<<"First"<<endl;
  26. else if(d%2==0 && d>0) cout<<"Second"<<endl;
  27. else if(c%2==0) cout<<"Second"<<endl;
  28. else cout<<"First"<<endl;
  29. }
  30. return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment