結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,364 KB
testcase_01 AC 74 ms
71,356 KB
testcase_02 AC 84 ms
71,584 KB
testcase_03 AC 88 ms
71,396 KB
testcase_04 AC 83 ms
71,396 KB
testcase_05 AC 79 ms
71,144 KB
testcase_06 AC 80 ms
71,392 KB
testcase_07 AC 78 ms
71,360 KB
testcase_08 AC 120 ms
77,344 KB
testcase_09 AC 95 ms
76,408 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 75 ms
71,332 KB
testcase_13 AC 120 ms
77,704 KB
testcase_14 AC 84 ms
76,212 KB
testcase_15 AC 99 ms
76,484 KB
testcase_16 AC 97 ms
76,264 KB
testcase_17 AC 84 ms
76,184 KB
testcase_18 AC 82 ms
76,116 KB
testcase_19 WA -
testcase_20 AC 81 ms
76,116 KB
testcase_21 AC 75 ms
71,296 KB
testcase_22 AC 83 ms
76,076 KB
testcase_23 AC 125 ms
78,368 KB
testcase_24 AC 135 ms
78,304 KB
testcase_25 AC 125 ms
78,312 KB
testcase_26 AC 122 ms
78,128 KB
testcase_27 AC 123 ms
78,244 KB
testcase_28 AC 181 ms
78,992 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.copy()
        while len(q2) > 0 and len(s) < N:
            s.add(q2[-1])
            q2.pop(-1)
        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