結果
| 問題 | No.2044 Infinite Nim |
| コンテスト | |
| ユーザー |
vjudge1
|
| 提出日時 | 2026-09-18 12:30:14 |
| 言語 | C++17(clang) (clang++ 22.1.8 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 6 ms / 2,000 ms |
| + 857µs | |
| コード長 | 517 bytes |
| 記録 | |
| コンパイル時間 | 3,736 ms |
| コンパイル使用メモリ | 164,300 KB |
| 実行使用メモリ | 6,400 KB |
| 最終ジャッジ日時 | 2026-09-18 12:30:25 |
| 合計ジャッジ時間 | 6,677 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 34 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
long long i, j, l, r, mid, p, q, k, t, n, m, a, b, c, d, ans, cnt, res, arr[1000005];
const long long mod = 999993143, mod2 = 999993469, inf = 1e18;
string s;
bool check;
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
cin >> n;
a = 0;
b = 0;
for (i = 1; i <= n; i += 1){
cin >> arr[i];
if (arr[i] == -1){
a += 1;
}
else{
b ^= arr[i];
}
}
if (a % 2 == 0 && b == 0){
cout << "Second\n";
}
else{
cout << "First\n";
}
}
vjudge1