結果

問題 No.714 回転寿司屋のシミュレート
ユーザー d_seid_sei
提出日時 2019-11-15 18:29:39
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
TLE  
実行時間 -
コード長 1,480 bytes
コンパイル時間 1,015 ms
コンパイル使用メモリ 103,800 KB
実行使用メモリ 14,896 KB
最終ジャッジ日時 2023-10-25 03:42:29
合計ジャッジ時間 8,395 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<queue>
#include<map>
#include<math.h>
#include<iomanip>
#include<set>
#include<numeric>
#include<cstring>
#include<cstdio>
#include<functional>
#include<bitset>
#include<limits.h>
#include<cassert>
#include<iterator>
#include<complex>
#include<stack>
using namespace std;
#define lint long long int
/*
vector<char>al(26);
al = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
vector<char>AL(26);
AL = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'};
*/


int main() {
	int N;
	cin >> N;
	int a;//0,1,2
	int ni, mi, ci;
	string bi;
	int cnt = 0;
	vector<int>ans(10000);
	int cnt2 = 0;
	vector<vector<string>>list(20, vector<string>(10, "**"));
	for (int i = 0; i < N; i++) {
		cnt = 0;
		cin >> a;
		if (a == 0) {
			cin >> ni >> mi;
			for (int k = 0; k < mi; k++) {
				cin >> list[ni - 1][k];
			}
		}
		else if (a == 1) {
			cin >> bi;
			for (int k = 0; k < 20; k++) {
				for (int j = 0; j < 10; j++) {
					if (list[k][j] == bi&&cnt==0) {
						list[k][j] = "**";
						ans[cnt2] = k + 1;
						cnt++;
						cnt2++;
					}
				}
			}
			if (cnt == 0) {
				ans[cnt2] = -1;
				cnt2++;
			}

		}
		else if (a == 2) {
			cin >> ci;
			for (int k = 0; k < 10; i++) {
				list[ci - 1][k] = "**";
			}
		}
	}
	int l = 0;
	while (ans[l] != 0) {
		cout << ans[l] << endl;
		l++;
	}
}
0