結果
| 問題 |
No.714 回転寿司屋のシミュレート
|
| コンテスト | |
| ユーザー |
totori_nyaa
|
| 提出日時 | 2019-07-17 21:03:17 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,075 bytes |
| コンパイル時間 | 2,051 ms |
| コンパイル使用メモリ | 174,016 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-23 07:55:29 |
| 合計ジャッジ時間 | 2,893 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 33 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
signed main(){
ios::sync_with_stdio(false);
cin.tie(0);
int n;
cin>>n;
vector<vector<string>> seki(20);
for(int i=0;i<n;i++){
int d;
cin>>d;
if(d==0){
int k,m;
cin>>k>>m;
k--;
for(int j=0;j<m;j++){
string s;
cin>>s;
seki[k].push_back(s);
}
}
if(d==1){
string s;
cin>>s;
bool erase=false;
for(int j=0;j<20;j++){
for(int k=0;k<seki[j].size();k++){
if(seki[j][k]==s){
erase=true;
cout<<j+1<<"\n";
seki[j][k]="";
break;
}
}
}
if(!erase) cout<<-1<<"\n";
}
if(d==2){
int s;
cin>>s;
vector<string> v;
seki[s-1] = v;
}
}
}
totori_nyaa