結果

問題 No.2372 既視感
ユーザー moharan627moharan627
提出日時 2023-07-07 21:41:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,416 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 87,120 KB
実行使用メモリ 78,440 KB
最終ジャッジ日時 2023-09-28 22:43:43
合計ジャッジ時間 4,642 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
71,644 KB
testcase_01 AC 91 ms
71,920 KB
testcase_02 AC 92 ms
71,892 KB
testcase_03 AC 90 ms
71,824 KB
testcase_04 AC 91 ms
71,748 KB
testcase_05 WA -
testcase_06 AC 91 ms
71,920 KB
testcase_07 AC 91 ms
71,820 KB
testcase_08 WA -
testcase_09 AC 106 ms
76,264 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 110 ms
76,200 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 98 ms
72,440 KB
testcase_23 AC 126 ms
78,240 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 126 ms
78,080 KB
testcase_28 AC 146 ms
78,440 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
#sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10**9 + 7
MOD2 = 998244353
from collections import defaultdict
def ceil(A,B):
    return -(-A//B)
def solve():
    def II(): return int(sys.stdin.readline())
    def LI(): return list(map(int, sys.stdin.readline().split()))
    def LC(): return list(sys.stdin.readline().rstrip())
    def IC(): return [int(c) for c in sys.stdin.readline().rstrip()]
    def MI(): return map(int, sys.stdin.readline().split())
    N,K,Q = input().split()
    N = int(N)
    K = int(K)
    Q = int(Q)
    a = 0
    A = [""]*N
    Dic = defaultdict(lambda:INF)
    for _ in range(Q):
        que = II()
        if(que==1):
            S = input()
            Dic[A[a]]=INF
            A[a] = S
            Dic[A[a]]=K
            a+=1
            a%=N
        elif(que==2):
            T = [""]*6
            D = [0]*6
            for i in range(6):
                T[i],D[i] = input().split()
                D[i] = int(D[i])
            Time = 0
            for i in range(6):
                Time += min(D[i],Dic[T[i]])
                #print(Time)
                if(60<Time):
                    print(i)
                    break
                if(i==5):
                    print(6)
            for i in range(6):
                Dic[A[a]]=INF
                A[a]=T[i]
                Dic[A[a]]=K
                a+=1
                a%=N
    return
solve()
0