結果

問題 No.1208 anti primenumber game
ユーザー titiatitia
提出日時 2020-08-30 15:17:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 566 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 34,012 KB
最終ジャッジ日時 2024-04-27 08:09:30
合計ジャッジ時間 6,459 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,752 KB
testcase_01 AC 25 ms
10,752 KB
testcase_02 AC 24 ms
10,752 KB
testcase_03 AC 26 ms
10,880 KB
testcase_04 AC 29 ms
10,752 KB
testcase_05 AC 27 ms
10,752 KB
testcase_06 AC 28 ms
10,752 KB
testcase_07 AC 25 ms
10,624 KB
testcase_08 AC 28 ms
10,880 KB
testcase_09 AC 27 ms
10,752 KB
testcase_10 AC 25 ms
10,752 KB
testcase_11 AC 25 ms
10,752 KB
testcase_12 AC 24 ms
10,752 KB
testcase_13 AC 26 ms
10,752 KB
testcase_14 AC 26 ms
10,752 KB
testcase_15 AC 107 ms
14,800 KB
testcase_16 AC 59 ms
14,672 KB
testcase_17 AC 103 ms
14,796 KB
testcase_18 AC 60 ms
14,672 KB
testcase_19 AC 62 ms
14,800 KB
testcase_20 AC 60 ms
14,672 KB
testcase_21 WA -
testcase_22 AC 125 ms
14,968 KB
testcase_23 AC 112 ms
14,796 KB
testcase_24 WA -
testcase_25 AC 166 ms
33,888 KB
testcase_26 AC 214 ms
33,672 KB
testcase_27 AC 214 ms
33,672 KB
testcase_28 AC 242 ms
33,544 KB
testcase_29 AC 238 ms
33,796 KB
testcase_30 WA -
testcase_31 AC 61 ms
14,780 KB
testcase_32 AC 108 ms
14,800 KB
testcase_33 AC 125 ms
14,672 KB
testcase_34 WA -
testcase_35 AC 106 ms
14,668 KB
testcase_36 AC 102 ms
13,432 KB
testcase_37 WA -
testcase_38 WA -
testcase_39 AC 200 ms
26,820 KB
testcase_40 AC 215 ms
32,972 KB
testcase_41 AC 84 ms
16,232 KB
testcase_42 AC 144 ms
16,052 KB
testcase_43 WA -
testcase_44 AC 129 ms
16,100 KB
testcase_45 WA -
testcase_46 AC 105 ms
14,072 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

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

A.sort(reverse=True)

S=0
G=0
NOW=0

if M==0:
    for i in range(N):
        if i%2==0:
            S+=A[i]
        else:
            G+=A[i]
else:   
    for i in range(N):
        if A[i]==1:
            break
        if i%2==0:
            S+=A[i]-1
            NOW=1
        else:
            G+=A[i]-1
            NOW=0

    if N%2==1 and NOW==0:
        S-=M-1
    elif N%2==1 and NOW==1:
        G-=M-1

if S>G:
    print("First")
else:
    print("Second")
0