結果

問題 No.2372 既視感
ユーザー Kanten4205Kanten4205
提出日時 2023-06-17 21:05:44
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 576 bytes
コンパイル時間 397 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 78,848 KB
最終ジャッジ日時 2023-09-14 08:39:29
合計ジャッジ時間 4,114 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 68 ms
71,340 KB
testcase_01 AC 68 ms
71,368 KB
testcase_02 AC 68 ms
71,404 KB
testcase_03 AC 69 ms
71,468 KB
testcase_04 AC 70 ms
71,600 KB
testcase_05 AC 69 ms
71,636 KB
testcase_06 AC 69 ms
71,256 KB
testcase_07 AC 68 ms
71,168 KB
testcase_08 WA -
testcase_09 AC 82 ms
75,364 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 87 ms
76,292 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 72 ms
71,320 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 111 ms
78,084 KB
testcase_28 AC 125 ms
77,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K, Q = map(int, input().split())
q = []
for _ in range(Q):
    p = int(input())
    if p == 1:
        t = input()
        q.append(t)
    else:
        s = set()
        q2 = q
        while len(q2) > 0 and len(s) < N:
            s.add(q2[-1])
            q2.pop()
        sum = 0;ans = 0
        for i in range(6):
            t = input().split()
            if t[0] in s:
                sum += min(int(t[1]), K)
            else:
                sum += int(t[1])
            if sum <= 60:
                q.append(t[0])
                ans = ans + 1
        print(ans)
0