結果
問題 |
No.3120 Lower Nim
|
ユーザー |
![]() |
提出日時 | 2025-04-19 01:19:49 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 326 ms / 2,000 ms |
コード長 | 612 bytes |
コンパイル時間 | 308 ms |
コンパイル使用メモリ | 82,640 KB |
実行使用メモリ | 94,620 KB |
平均クエリ数 | 2685.91 |
最終ジャッジ日時 | 2025-04-19 01:20:02 |
合計ジャッジ時間 | 11,681 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 43 |
ソースコード
n = int(input()) a = list(map(int, input().split())) g = 0 for x in a: g ^= x if g > 0: print('First') x = g & -g for i in range(n): if a[i] >= x: print(i + 1, x) if int(input()) == 1: exit() a[i] -= x break else: print('Second') while True: i, x = map(int, input().split()) if int(input()) == 1: exit() a[i-1] -= x x = x & -x for i in range(n): if a[i] >= x: print(i + 1, x) if int(input()) == 1: exit() a[i] -= x break