結果

問題 No.1208 anti primenumber game
ユーザー 37zigen37zigen
提出日時 2020-08-30 14:43:34
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 287 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 33,856 KB
最終ジャッジ日時 2024-04-27 07:39:44
合計ジャッジ時間 11,789 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,752 KB
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 33 ms
10,752 KB
testcase_03 AC 29 ms
10,752 KB
testcase_04 AC 29 ms
10,752 KB
testcase_05 AC 29 ms
10,752 KB
testcase_06 AC 28 ms
10,752 KB
testcase_07 AC 29 ms
10,752 KB
testcase_08 AC 29 ms
10,752 KB
testcase_09 AC 29 ms
10,752 KB
testcase_10 AC 29 ms
10,752 KB
testcase_11 AC 29 ms
10,752 KB
testcase_12 AC 29 ms
10,752 KB
testcase_13 AC 29 ms
10,624 KB
testcase_14 AC 29 ms
10,752 KB
testcase_15 AC 194 ms
14,600 KB
testcase_16 AC 199 ms
14,600 KB
testcase_17 AC 196 ms
14,728 KB
testcase_18 AC 198 ms
14,728 KB
testcase_19 AC 216 ms
14,732 KB
testcase_20 AC 209 ms
14,728 KB
testcase_21 AC 314 ms
14,804 KB
testcase_22 AC 300 ms
14,836 KB
testcase_23 AC 251 ms
14,604 KB
testcase_24 AC 405 ms
33,856 KB
testcase_25 AC 395 ms
33,732 KB
testcase_26 AC 393 ms
33,520 KB
testcase_27 AC 393 ms
33,648 KB
testcase_28 AC 397 ms
32,544 KB
testcase_29 AC 411 ms
33,648 KB
testcase_30 AC 199 ms
14,600 KB
testcase_31 WA -
testcase_32 AC 201 ms
14,604 KB
testcase_33 AC 272 ms
14,600 KB
testcase_34 AC 308 ms
14,604 KB
testcase_35 AC 315 ms
14,728 KB
testcase_36 AC 269 ms
18,092 KB
testcase_37 AC 368 ms
23,436 KB
testcase_38 AC 350 ms
28,824 KB
testcase_39 AC 341 ms
27,600 KB
testcase_40 AC 401 ms
32,040 KB
testcase_41 WA -
testcase_42 AC 306 ms
17,376 KB
testcase_43 AC 312 ms
17,136 KB
testcase_44 AC 281 ms
16,084 KB
testcase_45 AC 271 ms
16,076 KB
testcase_46 AC 271 ms
17,916 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
A=list(map(int,input().split()))
dp=[0]*(N+1)
for i in range(N-1,-1,-1):
    dp[i]=max(dp[i],A[i]-M-dp[i+1]) # 全部取る
    if A[i]>1:
        dp[i]=max(dp[i],A[i]-1-(1-M)+dp[i+1]) # 1つ残す
if dp[0]>0:
    print("First")
else:
    print("Second")

0