結果

問題 No.305 鍵(2)
ユーザー pekempeypekempey
提出日時 2015-11-27 22:40:40
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,045 bytes
コンパイル時間 1,296 ms
コンパイル使用メモリ 146,568 KB
実行使用メモリ 24,420 KB
平均クエリ数 77.46
最終ジャッジ日時 2023-09-23 06:42:32
合計ジャッジ時間 4,449 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 31 ms
24,072 KB
testcase_06 AC 28 ms
23,700 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define GET_MACRO(a, b, c, NAME, ...) NAME
#define rep(...) GET_MACRO(__VA_ARGS__, rep3, rep2)(__VA_ARGS__)
#define rep2(i, a) rep3 (i, 0, a)
#define rep3(i, a, b) for (int i = (a); i < (b); i++)
#define repr(...) GET_MACRO(__VA_ARGS__, repr3, repr2)(__VA_ARGS__)
#define repr2(i, a) repr3 (i, 0, a)
#define repr3(i, a, b) for (int i = (b) - 1; i >= (a); i--)
#define chmin(a, b) ((b) < a && (a = (b), true))
#define chmax(a, b) (a < (b) && (a = (b), true))
using namespace std;
typedef long long ll;

int main() {
	string ans(10, '*');
	rep (i, 10) {
		string s(10, '0' + i);
		int num;
		string res;
		cout << s << endl;
		cin >> num >> res;
		if (res == "unlocked") return 0;

		rep (j, 10) {
			string t = s;
			t[j] = (s[i] - '0' + 1) % 10 + '0';
			cout << t << endl;
			int num2;
			string res2;
			cin >> num2 >> res2;
			if (res2 == "unlocked") return 0;
			if (num2 < num) {
				ans[j] = t[j];
				break;
			}
		}
		cerr << ans << endl;
	}
	cout << ans << endl;
	int a;
	string b;
	cin >> a >> b;
	return 0;
}
0