結果
| 問題 | No.2044 Infinite Nim |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-09-17 10:25:29 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 562 bytes |
| 記録 | |
| コンパイル時間 | 1,448 ms |
| コンパイル使用メモリ | 208,592 KB |
| 実行使用メモリ | 9,932 KB |
| 最終ジャッジ日時 | 2026-09-17 10:25:34 |
| 合計ジャッジ時間 | 3,711 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 28 WA * 6 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll n;
int main(){
cin >> n;
ll inf = 0;
ll x = 0;
for(ll i = 1; i <= n; i++){
ll a;
cin >> a;
if(a == -1){
inf++;
}
else{
x ^= a;
}
}
if(inf > 0){
if(inf % 2){
cout << "First";
}
else{
cout << "Second";
}
}
else{
if(x != 0){
cout << "First";
}
else{
cout << "Second";
}
}
}
vjudge1