結果

問題 No.1208 anti primenumber game
ユーザー chineristAC
提出日時 2020-08-30 15:09:39
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 408 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 110,720 KB
最終ジャッジ日時 2024-11-15 08:37:21
合計ジャッジ時間 5,468 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 36 WA * 8
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M=map(int,input().split())
A=list(map(int,input().split()))[::-1]

check=0
while A and A[-1]==1:
    A.pop()
    check+=1

if check%2==0:
    A=A[::-1]
    tmp=sum(A)-N+2*(1-M)*(2*A.count(1)-N)
    if tmp>0:
        print("First")
    else:
        print("Second")
else:
    A=A[::-1]
    tmp=(1-M)-(sum(A)-N+2*(1-M)*(2*A.count(1)-N))
    if tmp>0:
        print("First")
    else:
        print("Second")
0