結果

問題 No.2372 既視感
ユーザー tassei903tassei903
提出日時 2023-07-08 11:22:47
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 767 bytes
コンパイル時間 236 ms
コンパイル使用メモリ 86,984 KB
実行使用メモリ 77,032 KB
最終ジャッジ日時 2023-09-29 12:44:42
合計ジャッジ時間 3,084 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
71,340 KB
testcase_01 AC 56 ms
71,124 KB
testcase_02 AC 57 ms
71,172 KB
testcase_03 AC 60 ms
71,444 KB
testcase_04 AC 61 ms
71,016 KB
testcase_05 WA -
testcase_06 AC 61 ms
71,240 KB
testcase_07 AC 57 ms
71,384 KB
testcase_08 WA -
testcase_09 AC 61 ms
71,260 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 65 ms
76,156 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 AC 62 ms
71,172 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 72 ms
76,708 KB
testcase_28 AC 76 ms
76,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
##

n,k,q = na()
z = []

for _ in range(q):
    q = ni()
    if q == 1:
        s = input()
        z.append(s)
        if len(z) > n:
            z.pop(0)
    else:
        t,d = zip(*[input().split() for i in range(6)])
        d = [int(i) for i in d]
        s = 0
        ans = 0
        for i in range(6):
            if t[i] in z:
                s += min(k, d[i])
            else:
                s += d[i]
            if s <= 60:
                ans = i + 1
        print(ans)
0