結果

問題 No.714 回転寿司屋のシミュレート
ユーザー aguroshouaguroshou
提出日時 2018-07-13 22:57:49
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 12 ms / 2,000 ms
コード長 1,168 bytes
コンパイル時間 638 ms
コンパイル使用メモリ 71,776 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-04-17 11:21:29
合計ジャッジ時間 1,893 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
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 AC 3 ms
5,376 KB
testcase_04 AC 3 ms
5,376 KB
testcase_05 AC 3 ms
5,376 KB
testcase_06 AC 6 ms
5,376 KB
testcase_07 AC 8 ms
5,376 KB
testcase_08 AC 12 ms
5,376 KB
testcase_09 AC 5 ms
5,376 KB
testcase_10 AC 4 ms
5,376 KB
testcase_11 AC 5 ms
5,376 KB
testcase_12 AC 4 ms
5,376 KB
testcase_13 AC 5 ms
5,376 KB
testcase_14 AC 5 ms
5,376 KB
testcase_15 AC 5 ms
5,376 KB
testcase_16 AC 5 ms
5,376 KB
testcase_17 AC 4 ms
5,376 KB
testcase_18 AC 5 ms
5,376 KB
testcase_19 AC 5 ms
5,376 KB
testcase_20 AC 5 ms
5,376 KB
testcase_21 AC 5 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 4 ms
5,376 KB
testcase_27 AC 3 ms
5,376 KB
testcase_28 AC 4 ms
5,376 KB
testcase_29 AC 4 ms
5,376 KB
testcase_30 AC 2 ms
5,376 KB
testcase_31 AC 2 ms
5,376 KB
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<iostream>
#include <algorithm>
#include<string>
#include <bitset>
#include <vector>
#include <functional>
#include <climits>
#include <iomanip>
using namespace std;
int main()
{

	//int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, ans = 0;
	long long a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0, k = 0, l = 0, ans = 0;
	//cout << LONG_MAX << endl;
	//string s[1001];
	//long long n, A[1000000000];
	long long n, m;
	string s[21][11];
	cin >> n;
	int ni, mi;
	string bi;
	for (a = 1; a <= n; a++)
	{
		cin >> m;
		if (m == 0)
		{
			cin >> ni;
			cin >> mi;

			for (b = 0; b < mi; b++)
			{
				cin >> s[ni][b];
			}
		}
		if (m == 1)
		{
			cin >> bi;
			d = 0;
			for (b = 1; b <= 20; b++)
			{
				for (c = 0; c < 10; c++)
				{
					if (bi == s[b][c])
					{
						cout << b << endl;
						s[b][c] = "";
						b = 21;
						d = 1;
						break;
					}
				}
			}
			if (d==0)
			{
				cout << -1 << endl;
			}
		}
		if (m == 2)
		{
			cin >> mi;
			for ( b = 0; b < 10; b++)
			{
				s[mi][b] = " ";
			}
		}
	}
	//std::cout << std::fixed;
	//cout << std::setprecision(20) << << endl;
	//cout << d << endl;

	return 0;
}
0