結果
問題 |
No.2372 既視感
|
ユーザー |
|
提出日時 | 2023-06-18 20:58:14 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 870 bytes |
コンパイル時間 | 2,277 ms |
コンパイル使用メモリ | 206,172 KB |
最終ジャッジ日時 | 2025-02-14 22:41:54 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 10 WA * 16 |
ソースコード
#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 = 1; 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; vector<string> AsaAC; for(ll j = 0; j < 6; j++) { string t; ll d; cin >> t >> d; if(Solved[t] >= order - N && Solved[t] > 0) d = min(d, K); time_sum += d; if(time_sum > 60 && ok) { cout << j << endl; ok = 0; } AsaAC.push_back(t); } if(ok) cout << 6 << endl; for(string t : AsaAC) { Solved[t]=order; order++; } } } }