結果
| 問題 |
No.2372 既視感
|
| コンテスト | |
| ユーザー |
とろちゃ
|
| 提出日時 | 2023-07-07 21:37:08 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,123 bytes |
| コンパイル時間 | 149 ms |
| コンパイル使用メモリ | 82,084 KB |
| 実行使用メモリ | 68,732 KB |
| 最終ジャッジ日時 | 2024-07-21 17:21:25 |
| 合計ジャッジ時間 | 2,385 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 WA * 17 |
ソースコード
# 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.appendleft(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)
とろちゃ