結果
問題 | No.2044 Infinite Nim |
ユーザー |
![]() |
提出日時 | 2022-08-19 21:37:06 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 314 bytes |
コンパイル時間 | 1,531 ms |
コンパイル使用メモリ | 166,572 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-10-08 07:49:22 |
合計ジャッジ時間 | 2,988 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 WA * 9 |
ソースコード
#include <bits/stdc++.h>int ri() {int n;scanf("%d", &n);return n;}int main() {int n = ri();int a[n];for (auto &i : a) i = ri();if (std::count(a, a + n, -1)) puts("First");else {int xored = 0;for (auto i : a) xored ^= i;if (xored) puts("First");else puts("Second");}return 0;}