結果
| 問題 |
No.714 回転寿司屋のシミュレート
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-10-14 19:21:56 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 855 bytes |
| コンパイル時間 | 2,151 ms |
| コンパイル使用メモリ | 198,728 KB |
| 最終ジャッジ日時 | 2025-01-15 07:16:31 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 33 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
multiset<string> st[20];
int n; cin >> n;
while(n--){
int t; cin >> t;
if(t==0){
int n,m; cin >> n >> m;
for(int i=0;i<m;i++){
string s; cin >> s;
st[n-1].insert(s);
}
}
else if(t==1){
string s; cin >> s;
int res=-1;
for(int i=0;i<20;i++){
if(st[i].find(s)!=st[i].end()){
res=i+1;
auto it=st[i].lower_bound(s);
st[i].erase(it);
}
}
printf("%d\n",res);
}
else{
int n; cin >> n;
st[n-1].clear();
}
}
}