結果

問題 No.714 回転寿司屋のシミュレート
ユーザー 👑 nu50218nu50218
提出日時 2018-07-13 22:55:15
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 632 bytes
コンパイル時間 1,739 ms
コンパイル使用メモリ 167,028 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-17 11:21:19
合計ジャッジ時間 5,239 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,248 KB
testcase_01 AC 2 ms
5,376 KB
testcase_02 AC 2 ms
5,376 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 AC 4 ms
5,376 KB
testcase_20 AC 4 ms
5,376 KB
testcase_21 AC 4 ms
5,376 KB
testcase_22 AC 4 ms
5,376 KB
testcase_23 AC 4 ms
5,376 KB
testcase_24 AC 4 ms
5,376 KB
testcase_25 AC 3 ms
5,376 KB
testcase_26 AC 3 ms
5,376 KB
testcase_27 AC 3 ms
5,376 KB
testcase_28 AC 3 ms
5,376 KB
testcase_29 AC 4 ms
5,376 KB
testcase_30 AC 2 ms
5,376 KB
testcase_31 RE -
testcase_32 AC 2 ms
5,376 KB
testcase_33 AC 2 ms
5,376 KB
testcase_34 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define FOR(I,X,Y) for(int I=X;I<Y;I++)
#define INF 1e9+7
using namespace std;

string A[20][10];

int main(){
  int N,q,n,m,C;
  string B;
  cin >> N;
  vector<int> ans;
  FOR(bfruisbvf,0,N){
    cin >> q;
    if(q == 0){
      cin >> n >> m;
      FOR(i,0,m)cin >> A[n][i];
    }
    if(q == 1){
      cin >> B;
      int p = -1;
      FOR(i,0,20)FOR(j,0,10){
          if(B == A[i][j] && p == -1){
            p = i;
            A[i][j] = " ";
        }
      }
      ans.push_back(p);
    }
    if(q == 2){
      cin >> C;
      FOR(i,0,10)A[C][i] = " ";
    }
  }
  for(auto x:ans)cout << x << endl;
}
0