結果
| 問題 | No.2044 Infinite Nim |
| コンテスト | |
| ユーザー |
bit_kyopro
|
| 提出日時 | 2022-08-19 23:00:41 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 566 bytes |
| 記録 | |
| コンパイル時間 | 680 ms |
| コンパイル使用メモリ | 94,636 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-06-27 03:20:37 |
| 合計ジャッジ時間 | 2,225 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 26 WA * 8 |
ソースコード
#include <iostream>
#include <string>
#include <set>
#include <algorithm>
#include <vector>
using namespace std;
using ll = long long;
int main() {
int n; cin >> n;
ll inf = 0;
ll x = 0;
for (int i=0; i<n; i++) {
ll val;
cin >> val;
if (val == -1) inf++;
else x ^= val;
}
string F = "First", S = "Second";
string ans;
if (inf == 0) {
ans = S;
}
else if (inf == 1) {
ans = F;
}
else {
if (x == 0) ans = S;
else ans = F;
}
cout << ans << endl;
}
bit_kyopro