結果

問題 No.2372 既視感
ユーザー moharan627moharan627
提出日時 2023-07-07 21:37:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 1,360 bytes
コンパイル時間 343 ms
コンパイル使用メモリ 87,068 KB
実行使用メモリ 78,360 KB
最終ジャッジ日時 2023-09-28 22:36:51
合計ジャッジ時間 4,876 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 96 ms
71,760 KB
testcase_01 AC 97 ms
71,832 KB
testcase_02 AC 94 ms
71,580 KB
testcase_03 AC 96 ms
71,696 KB
testcase_04 AC 96 ms
71,412 KB
testcase_05 WA -
testcase_06 AC 95 ms
71,368 KB
testcase_07 AC 97 ms
71,976 KB
testcase_08 WA -
testcase_09 AC 111 ms
76,104 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 118 ms
76,276 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 104 ms
72,312 KB
testcase_23 AC 133 ms
77,640 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 131 ms
77,928 KB
testcase_28 AC 150 ms
78,360 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 = MI()
    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