結果
| 問題 |
No.2372 既視感
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-06-18 20:46:16 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 768 bytes |
| コンパイル時間 | 1,953 ms |
| コンパイル使用メモリ | 199,920 KB |
| 最終ジャッジ日時 | 2025-02-14 22:41:42 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 TLE * 2 |
| other | TLE * 26 |
ソースコード
#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 = 0;
for(int j = 0; j < 6; i++) {
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;
}
Solved[t] = order;
order++;
}
if(ok) cout << 6 << endl;
}
}
}