結果
問題 |
No.1208 anti primenumber game
|
ユーザー |
![]() |
提出日時 | 2025-04-15 22:04:51 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 597 bytes |
コンパイル時間 | 589 ms |
コンパイル使用メモリ | 82,224 KB |
実行使用メモリ | 107,972 KB |
最終ジャッジ日時 | 2025-04-15 22:06:43 |
合計ジャッジ時間 | 5,277 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 34 WA * 10 |
ソースコード
n, m = map(int, input().split()) a = list(map(int, input().split())) total_diff = 0 current_first = True for num in a: if num == 0: diff = 0 moves = 0 elif num == 1: diff = 1 - m moves = 1 else: if m == 0: diff = num moves = 1 else: diff = num - 2 + m moves = 2 if current_first: total_diff += diff else: total_diff -= diff if moves % 2 == 1: current_first = not current_first if total_diff > 0: print("First") else: print("Second")