結果

問題 No.973 余興
ユーザー chinchilla
提出日時 2020-01-28 04:51:23
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
TLE  
実行時間 -
コード長 299 bytes
コンパイル時間 124 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 26,048 KB
最終ジャッジ日時 2024-09-14 22:36:47
合計ジャッジ時間 10,894 ms
ジャッジサーバーID
(参考情報)
judge5 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 2
other TLE * 1 -- * 53
権限があれば一括ダウンロードができます

ソースコード

diff #

n, x = [int(w) for w in input().split()]
a = [int(w) for w in input().split()]
def f(i, j):
    return (0, 0) if i>x and j>x else (i, j)
l = [(0, 0, i, i) for i in a]
while len(l) > 1:
    l = [f(t[0]+u[3], u[1]+t[2])+  (t[2], u[3])
         for t, u in zip(l, l[1:])]
print("A" if l[0][0] else "B")
0