結果

問題 No.305 鍵(2)
ユーザー startcppstartcpp
提出日時 2015-11-27 22:37:14
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 711 bytes
コンパイル時間 1,019 ms
コンパイル使用メモリ 73,912 KB
実行使用メモリ 24,384 KB
平均クエリ数 92.62
最終ジャッジ日時 2023-09-23 06:41:29
合計ジャッジ時間 3,688 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <string>
#include <algorithm>
#include <functional>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
using namespace std;


int main()
{
	int i, j, k;
	int ans[10];
	for( i = 0; i < 10; i++ ){
		int maxa = -11;
		for( j = 0; j < 10; j++ ){
			for( k = 0; k < i; k++ )
				cout << "0";
			cout << j;
			for( k = i + 1; k < 10; k++ )
				cout << "0";
			cout << endl;
			int a; string s;
			cin >> a >> s;
			if( s == "unlocked" )
				return 0;
			if( a > maxa ){
				a = maxa;
				ans[i] = j;
			}
		}
	}
	for( i = 0; i < 10; i++ )
		cout << ans[i];
	cout << endl;
	return 0;
}
0