結果

問題 No.1208 anti primenumber game
ユーザー H3PO4H3PO4
提出日時 2022-01-15 09:10:15
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 224 ms / 2,000 ms
コード長 288 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 10,696 KB
実行使用メモリ 26,968 KB
最終ジャッジ日時 2023-08-13 11:43:40
合計ジャッジ時間 10,183 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,764 KB
testcase_01 AC 15 ms
7,936 KB
testcase_02 AC 14 ms
7,824 KB
testcase_03 AC 16 ms
7,828 KB
testcase_04 AC 15 ms
7,772 KB
testcase_05 AC 15 ms
7,856 KB
testcase_06 AC 15 ms
7,892 KB
testcase_07 AC 15 ms
7,956 KB
testcase_08 AC 15 ms
7,816 KB
testcase_09 AC 15 ms
7,812 KB
testcase_10 AC 16 ms
7,812 KB
testcase_11 AC 16 ms
7,876 KB
testcase_12 AC 16 ms
7,840 KB
testcase_13 AC 16 ms
7,760 KB
testcase_14 AC 16 ms
7,904 KB
testcase_15 AC 84 ms
11,340 KB
testcase_16 AC 84 ms
11,392 KB
testcase_17 AC 84 ms
11,420 KB
testcase_18 AC 85 ms
11,304 KB
testcase_19 AC 97 ms
11,404 KB
testcase_20 AC 89 ms
11,372 KB
testcase_21 AC 160 ms
12,208 KB
testcase_22 AC 159 ms
12,200 KB
testcase_23 AC 129 ms
11,264 KB
testcase_24 AC 218 ms
26,812 KB
testcase_25 AC 219 ms
26,804 KB
testcase_26 AC 212 ms
26,968 KB
testcase_27 AC 208 ms
26,824 KB
testcase_28 AC 224 ms
26,812 KB
testcase_29 AC 218 ms
26,852 KB
testcase_30 AC 89 ms
11,276 KB
testcase_31 AC 99 ms
11,380 KB
testcase_32 AC 90 ms
11,312 KB
testcase_33 AC 144 ms
11,388 KB
testcase_34 AC 161 ms
11,252 KB
testcase_35 AC 159 ms
11,372 KB
testcase_36 AC 127 ms
10,868 KB
testcase_37 AC 177 ms
11,268 KB
testcase_38 AC 187 ms
22,088 KB
testcase_39 AC 182 ms
21,824 KB
testcase_40 AC 208 ms
26,264 KB
testcase_41 AC 108 ms
13,212 KB
testcase_42 AC 168 ms
13,284 KB
testcase_43 AC 160 ms
13,280 KB
testcase_44 AC 144 ms
13,276 KB
testcase_45 AC 144 ms
13,140 KB
testcase_46 AC 129 ms
11,168 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

input = sys.stdin.buffer.readline

N, M = map(int, input().split())
A = list(map(int, input().split()))

dp = 0
for a in reversed(A):
    new_dp = a - M - dp
    if a > 1:
        new_dp = max(new_dp, a - 1 + M - 1 + dp)
    dp = new_dp
print("First" if dp > 0 else "Second")
0