結果
| 問題 |
No.2372 既視感
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-21 16:58:25 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 799 bytes |
| コンパイル時間 | 2,086 ms |
| コンパイル使用メモリ | 201,092 KB |
| 最終ジャッジ日時 | 2025-02-14 23:50:32 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 7 WA * 19 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define ll long long
/*hi, I'm rintaro. I’m the writer of the problem.*/
int main() {
//writerの確認コード
//O(N log Q)解法
ll N, K, Q, order = 0;
cin >> N >> K >> Q;
map<string,ll> Solved;
for(ll i = 0; i < Q; i++) {
ll x;
cin >> x;
if(x == 1) {
string s;
cin >> s;
Solved[s] = order;
order++;
}
else {
ll time_sum = 0, ok = 1;
for(int j = 0; j < 6; j++) {
string t;
ll d;
cin >> t >> d;
if(Solved[t] > order - N) d = min(d, K);
time_sum += d;
if(time_sum > 60 && ok) {
cout << j << endl;
ok = 0;
}
if(ok) {
order++;
Solved[t] = order;
}
}
if(ok) cout << 6 << endl;
}
}
}