結果

問題 No.715 集合と二人ゲーム
ユーザー nebukuro09nebukuro09
提出日時 2018-07-13 23:34:01
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 692 bytes
コンパイル時間 234 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 50,108 KB
最終ジャッジ日時 2024-04-17 11:39:02
合計ジャッジ時間 7,827 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,816 KB
testcase_01 AC 14 ms
6,940 KB
testcase_02 WA -
testcase_03 AC 18 ms
7,168 KB
testcase_04 WA -
testcase_05 AC 22 ms
7,552 KB
testcase_06 WA -
testcase_07 AC 26 ms
8,192 KB
testcase_08 WA -
testcase_09 AC 30 ms
8,696 KB
testcase_10 WA -
testcase_11 AC 34 ms
9,268 KB
testcase_12 AC 34 ms
9,184 KB
testcase_13 AC 37 ms
9,672 KB
testcase_14 WA -
testcase_15 AC 41 ms
10,088 KB
testcase_16 WA -
testcase_17 AC 43 ms
10,412 KB
testcase_18 WA -
testcase_19 AC 48 ms
10,940 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 56 ms
11,804 KB
testcase_24 AC 61 ms
12,584 KB
testcase_25 AC 61 ms
12,584 KB
testcase_26 WA -
testcase_27 AC 67 ms
13,368 KB
testcase_28 AC 69 ms
13,648 KB
testcase_29 AC 71 ms
13,864 KB
testcase_30 AC 65 ms
12,756 KB
testcase_31 AC 59 ms
11,928 KB
testcase_32 AC 54 ms
11,452 KB
testcase_33 AC 64 ms
12,808 KB
testcase_34 AC 57 ms
11,576 KB
testcase_35 AC 12 ms
6,940 KB
testcase_36 AC 11 ms
6,944 KB
testcase_37 AC 12 ms
6,948 KB
testcase_38 AC 12 ms
6,944 KB
testcase_39 AC 11 ms
6,940 KB
testcase_40 WA -
testcase_41 AC 13 ms
6,940 KB
testcase_42 AC 12 ms
6,940 KB
testcase_43 AC 12 ms
6,940 KB
testcase_44 AC 12 ms
6,940 KB
testcase_45 AC 12 ms
6,944 KB
testcase_46 AC 13 ms
6,940 KB
testcase_47 AC 12 ms
6,944 KB
testcase_48 AC 12 ms
6,940 KB
testcase_49 AC 13 ms
6,944 KB
testcase_50 WA -
testcase_51 AC 362 ms
49,860 KB
testcase_52 WA -
testcase_53 AC 361 ms
49,800 KB
testcase_54 AC 367 ms
49,852 KB
testcase_55 AC 356 ms
49,612 KB
testcase_56 WA -
testcase_57 AC 325 ms
44,708 KB
testcase_58 WA -
testcase_59 AC 362 ms
49,824 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = 50
F = [0 for _ in xrange(N)]
F[1] = 1
F[2] = 1
for i in xrange(3, N):
    H = set([F[i-2], F[i-3]])
    j = 1
    while i - 3 - j >= j:
        k = i - 3 - j
        H.add(F[j]^F[k])
        j += 1
    H = sorted(list(H))
    for j in xrange(len(H)+1):
        if j >= len(H) or H[j] != j:
            F[i] = j
            break

n = input()
A = sorted(map(int, raw_input().split()))
B = []

last = -1
cnt = 0
for a in A:
    if last == -1:
        last = a
        cnt = 1
    elif a - last == 1:
        last = a
        cnt += 1
    else:
        B.append(cnt)
        last = a
        cnt = 1
B.append(cnt)

ans = 0
for b in B:
    ans ^= F[b%34]

print "First" if ans else "Second"
0