結果

問題 No.1852 Divide or Reduce
コンテスト
ユーザー aaaaaaaaaa2230
提出日時 2022-02-25 22:56:25
言語 PyPy3
(7.3.17)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
AC  
実行時間 543 ms / 2,000 ms
コード長 438 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 290 ms
コンパイル使用メモリ 85,504 KB
実行使用メモリ 136,456 KB
最終ジャッジ日時 2026-03-25 01:39:43
合計ジャッジ時間 6,622 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

t = int(input())
for _ in range(t):
    n = int(input())
    A = list(map(int,input().split()))
    num = 0
    dif = 10**20
    for a in A:
        dif = min(dif,a-1)
        num += a-1
    
    if num%2:
        print("First")
        continue
    if dif == 0:
        print("Second")
        continue

    if n%2:
        print("Second")
        continue
    if dif%2:
        print("First")
    else:
        print("Second")
    
    
0