fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. #define F first
  5. #define S second
  6. const int mod = 1e9+7;
  7. const int N = 2e5+10;
  8. int main ()
  9. {
  10. //cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);
  11. int t , n , arr[N];
  12. cin >> t;
  13. while(t--)
  14. {
  15. ll ans = 0;
  16. cin >> n;
  17. for (int i = 0 ; i < n ; ++i)
  18. {
  19. cin >> arr[i];
  20. ans ^= arr[i];
  21. }
  22. if (ans > 0)
  23. cout << "first\n";
  24. else
  25. cout << "second\n";
  26. }
  27.  
  28. return 0;
  29. }
  30.  
Success #stdin #stdout 0.01s 5468KB
stdin
Standard input is empty
stdout
Standard output is empty