結果
問題 | No.761 平均値ゲーム |
ユーザー | mkawa2 |
提出日時 | 2021-02-10 13:26:00 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
AC
|
実行時間 | 80 ms / 2,000 ms |
コード長 | 1,138 bytes |
コンパイル時間 | 157 ms |
コンパイル使用メモリ | 12,800 KB |
実行使用メモリ | 20,288 KB |
最終ジャッジ日時 | 2024-07-08 00:01:13 |
合計ジャッジ時間 | 7,311 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 25 ms
10,752 KB |
testcase_01 | AC | 23 ms
10,752 KB |
testcase_02 | AC | 24 ms
10,880 KB |
testcase_03 | AC | 25 ms
10,752 KB |
testcase_04 | AC | 23 ms
10,880 KB |
testcase_05 | AC | 24 ms
10,752 KB |
testcase_06 | AC | 25 ms
10,752 KB |
testcase_07 | AC | 24 ms
10,880 KB |
testcase_08 | AC | 24 ms
10,880 KB |
testcase_09 | AC | 24 ms
10,880 KB |
testcase_10 | AC | 24 ms
10,752 KB |
testcase_11 | AC | 25 ms
10,880 KB |
testcase_12 | AC | 24 ms
10,880 KB |
testcase_13 | AC | 25 ms
10,752 KB |
testcase_14 | AC | 24 ms
10,752 KB |
testcase_15 | AC | 24 ms
10,752 KB |
testcase_16 | AC | 24 ms
10,624 KB |
testcase_17 | AC | 24 ms
10,752 KB |
testcase_18 | AC | 24 ms
10,752 KB |
testcase_19 | AC | 24 ms
10,752 KB |
testcase_20 | AC | 24 ms
10,752 KB |
testcase_21 | AC | 24 ms
10,624 KB |
testcase_22 | AC | 23 ms
10,752 KB |
testcase_23 | AC | 24 ms
10,752 KB |
testcase_24 | AC | 24 ms
10,752 KB |
testcase_25 | AC | 24 ms
10,752 KB |
testcase_26 | AC | 24 ms
10,752 KB |
testcase_27 | AC | 24 ms
10,752 KB |
testcase_28 | AC | 23 ms
10,880 KB |
testcase_29 | AC | 25 ms
10,624 KB |
testcase_30 | AC | 24 ms
10,752 KB |
testcase_31 | AC | 24 ms
10,752 KB |
testcase_32 | AC | 24 ms
10,880 KB |
testcase_33 | AC | 59 ms
17,664 KB |
testcase_34 | AC | 65 ms
18,628 KB |
testcase_35 | AC | 27 ms
11,648 KB |
testcase_36 | AC | 47 ms
15,720 KB |
testcase_37 | AC | 57 ms
17,140 KB |
testcase_38 | AC | 57 ms
17,256 KB |
testcase_39 | AC | 67 ms
19,052 KB |
testcase_40 | AC | 67 ms
18,812 KB |
testcase_41 | AC | 64 ms
18,256 KB |
testcase_42 | AC | 67 ms
19,156 KB |
testcase_43 | AC | 32 ms
12,252 KB |
testcase_44 | AC | 51 ms
16,112 KB |
testcase_45 | AC | 63 ms
18,160 KB |
testcase_46 | AC | 46 ms
14,648 KB |
testcase_47 | AC | 47 ms
15,704 KB |
testcase_48 | AC | 27 ms
11,264 KB |
testcase_49 | AC | 69 ms
19,232 KB |
testcase_50 | AC | 31 ms
11,776 KB |
testcase_51 | AC | 28 ms
11,520 KB |
testcase_52 | AC | 28 ms
11,648 KB |
testcase_53 | AC | 70 ms
19,132 KB |
testcase_54 | AC | 49 ms
15,580 KB |
testcase_55 | AC | 72 ms
19,180 KB |
testcase_56 | AC | 39 ms
13,372 KB |
testcase_57 | AC | 72 ms
19,280 KB |
testcase_58 | AC | 31 ms
12,160 KB |
testcase_59 | AC | 64 ms
18,692 KB |
testcase_60 | AC | 38 ms
13,456 KB |
testcase_61 | AC | 77 ms
19,872 KB |
testcase_62 | AC | 68 ms
19,356 KB |
testcase_63 | AC | 33 ms
12,528 KB |
testcase_64 | AC | 63 ms
18,248 KB |
testcase_65 | AC | 40 ms
14,544 KB |
testcase_66 | AC | 28 ms
11,520 KB |
testcase_67 | AC | 37 ms
13,388 KB |
testcase_68 | AC | 30 ms
11,776 KB |
testcase_69 | AC | 59 ms
17,400 KB |
testcase_70 | AC | 48 ms
15,756 KB |
testcase_71 | AC | 34 ms
13,424 KB |
testcase_72 | AC | 28 ms
11,776 KB |
testcase_73 | AC | 38 ms
14,604 KB |
testcase_74 | AC | 33 ms
12,412 KB |
testcase_75 | AC | 45 ms
14,716 KB |
testcase_76 | AC | 37 ms
13,324 KB |
testcase_77 | AC | 58 ms
17,228 KB |
testcase_78 | AC | 47 ms
15,788 KB |
testcase_79 | AC | 32 ms
12,416 KB |
testcase_80 | AC | 31 ms
12,032 KB |
testcase_81 | AC | 29 ms
11,904 KB |
testcase_82 | AC | 52 ms
16,068 KB |
testcase_83 | AC | 77 ms
20,068 KB |
testcase_84 | AC | 80 ms
20,164 KB |
testcase_85 | AC | 80 ms
20,288 KB |
testcase_86 | AC | 77 ms
20,088 KB |
testcase_87 | AC | 76 ms
20,140 KB |
testcase_88 | AC | 77 ms
20,216 KB |
testcase_89 | AC | 74 ms
20,216 KB |
testcase_90 | AC | 76 ms
20,216 KB |
testcase_91 | AC | 78 ms
20,064 KB |
testcase_92 | AC | 75 ms
20,212 KB |
testcase_93 | AC | 25 ms
10,752 KB |
testcase_94 | AC | 26 ms
10,752 KB |
testcase_95 | AC | 74 ms
20,212 KB |
testcase_96 | AC | 72 ms
20,088 KB |
testcase_97 | AC | 74 ms
20,216 KB |
testcase_98 | AC | 69 ms
20,216 KB |
testcase_99 | AC | 72 ms
20,216 KB |
ソースコード
import sys sys.setrecursionlimit(10**6) int1 = lambda x: int(x)-1 p2D = lambda x: print(*x, sep="\n") def II(): return int(sys.stdin.buffer.readline()) def MI(): return map(int, sys.stdin.buffer.readline().split()) def MI1(): return map(int1, sys.stdin.buffer.readline().split()) def LI(): return list(map(int, sys.stdin.buffer.readline().split())) def LI1(): return list(map(int1, sys.stdin.buffer.readline().split())) def LLI(rows_number): return [LI() for _ in range(rows_number)] def BI(): return sys.stdin.buffer.readline().rstrip() def SI(): return sys.stdin.buffer.readline().rstrip().decode() # dij = [(0, 1), (-1, 0), (0, -1), (1, 0)] dij = [[(-1, 0), (1, 0)], [(0, -1), (0, 1)]] inf = 10**16 md = 998244353 # md = 10**9+7 def mid(l, r): sl,sr=l,r while l+1 < r: m = (l+r)//2 if cs[sr]-cs[sl] <= aa[m]*(sr-sl): r = m else: l = m return r def win(l, r): if aa[l] == aa[r-1]: return True m = mid(l, r) if win(l, m) == False or win(m, r) == False: return True return False n = II() aa = LI() cs = [0] for a in aa: cs.append(cs[-1]+a) print("First" if win(0, n) else "Second")