結果

問題 No.1208 anti primenumber game
ユーザー titia
提出日時 2020-08-30 15:07:13
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 319 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 33,724 KB
最終ジャッジ日時 2024-11-15 08:35:58
合計ジャッジ時間 6,951 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 31 WA * 13
権限があれば一括ダウンロードができます

ソースコード

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
for i in range(N):
    if A[i]==1:
        break
    if i%2==0:
        S+=A[i]-1
    else:
        G+=A[i]-1

if N%2==1:
    S-=M-1

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