結果
問題 | No.2044 Infinite Nim |
ユーザー |
![]() |
提出日時 | 2022-08-19 22:05:36 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 45 ms / 2,000 ms |
コード長 | 469 bytes |
コンパイル時間 | 1,451 ms |
コンパイル使用メモリ | 166,140 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-10-09 06:06:00 |
合計ジャッジ時間 | 3,033 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 34 |
ソースコード
#include <bits/stdc++.h>using namespace std;using ll=long long;using ld=long double;using P=pair<ll,ll>;using ps=pair<int,string>;using V=vector<int>;#define rep(i,n) for(int i=0;i<n;i++)#define REP(i,n) for(int i=1;i<=n;i++)int main(){int n,count=0,x=0;cin >> n;rep(i,n){int a;cin >> a;if(a==-1) count++;else x^=a;}if(x==0&&count%2==0) cout << "Second" << endl;else cout << "First" << endl;}