結果

問題 No.1852 Divide or Reduce
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2022-02-25 22:56:25
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 749 ms / 2,000 ms
コード長 438 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 135,288 KB
最終ジャッジ日時 2023-09-16 18:13:27
合計ジャッジ時間 9,336 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 71 ms
71,444 KB
testcase_01 AC 257 ms
79,208 KB
testcase_02 AC 252 ms
78,200 KB
testcase_03 AC 251 ms
78,080 KB
testcase_04 AC 249 ms
78,140 KB
testcase_05 AC 245 ms
78,024 KB
testcase_06 AC 166 ms
124,544 KB
testcase_07 AC 169 ms
125,224 KB
testcase_08 AC 177 ms
130,808 KB
testcase_09 AC 169 ms
122,224 KB
testcase_10 AC 176 ms
128,032 KB
testcase_11 AC 181 ms
133,840 KB
testcase_12 AC 187 ms
134,744 KB
testcase_13 AC 182 ms
135,288 KB
testcase_14 AC 183 ms
134,896 KB
testcase_15 AC 183 ms
134,952 KB
testcase_16 AC 742 ms
102,228 KB
testcase_17 AC 749 ms
101,972 KB
testcase_18 AC 739 ms
103,212 KB
testcase_19 AC 646 ms
104,952 KB
testcase_20 AC 704 ms
101,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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