結果

問題 No.2372 既視感
ユーザー とろちゃとろちゃ
提出日時 2023-07-07 21:38:34
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,174 bytes
コンパイル時間 299 ms
コンパイル使用メモリ 86,912 KB
実行使用メモリ 78,400 KB
最終ジャッジ日時 2023-09-28 22:39:14
合計ジャッジ時間 4,473 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
71,620 KB
testcase_01 AC 92 ms
71,644 KB
testcase_02 AC 94 ms
71,588 KB
testcase_03 AC 89 ms
71,764 KB
testcase_04 AC 91 ms
71,644 KB
testcase_05 WA -
testcase_06 AC 90 ms
71,584 KB
testcase_07 AC 88 ms
71,700 KB
testcase_08 WA -
testcase_09 AC 98 ms
76,240 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 100 ms
77,500 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 88 ms
71,752 KB
testcase_23 AC 105 ms
77,828 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 107 ms
77,400 KB
testcase_28 AC 118 ms
78,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import pypyjit;pypyjit.set_param("max_unroll_recursion=-1")
# from bisect import *
from collections import *

# from heapq import *
# from itertools import *
# from math import *
# from datetime import *
# from decimal import *  # PyPyだと遅い
# from string import ascii_lowercase,ascii_uppercase
# import numpy as np
import sys
import os

# sys.setrecursionlimit(10**6) # PyPyだと遅い
INF = 10**18
MOD = 998244353
# MOD = 10**9 + 7
isFile = os.path.exists("input.txt")
File = open("input.txt", "r", encoding="utf-8") if isFile else sys.stdin


def input():
    return File.readline()[:-1]


# ///////////////////////////////////////////////////////////////////////////


N, K, Q = map(int, input().split())

que = deque([], N)
for _ in range(Q):
    i = int(input())
    if i == 1:
        que.append(input())
    if i == 2:
        problem = [input().split() for _ in range(6)]
        total = 0
        cnt = 0
        for i, j in problem:
            j = int(j)
            total += j if i not in que else min(j, K)
            if total > 60:
                break
            cnt += 1
        print(cnt)
        for i, j in problem:
            que.append(i)
0