結果
| 問題 |
No.714 回転寿司屋のシミュレート
|
| コンテスト | |
| ユーザー |
focus
|
| 提出日時 | 2018-08-13 12:31:26 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 888 bytes |
| コンパイル時間 | 731 ms |
| コンパイル使用メモリ | 77,696 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-24 07:53:29 |
| 合計ジャッジ時間 | 1,910 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 35 |
ソースコード
#include<iostream>
#include<map>
using ll = long long;
using namespace std;
int main(){
int n;
string str;
map<string,int> want[21];
cin >> n;
for(int i=0;i<n;i++){
int flag;
cin >> flag;
if(flag==0){
int place,m;
cin >> place >> m;
for(int j=0;j<m;j++){
cin >> str;
want[place][str]++;
}
}
else if(flag==1){
cin >> str;
bool check=false;
for(int j=1;j<=20;j++){
if(want[j][str]>0){
cout << j << endl;
check=true;
break;
}
}
if(!check) cout << -1 << endl;
}
else{
int place;
cin >> place;
want[place].clear();
}
}
return 0;
}
focus