結果

問題 No.305 鍵(2)
ユーザー startcpp
提出日時 2015-11-27 22:43:16
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 28 ms / 2,000 ms
コード長 703 bytes
コンパイル時間 707 ms
コンパイル使用メモリ 79,184 KB
実行使用メモリ 25,220 KB
平均クエリ数 92.62
最終ジャッジ日時 2024-07-16 21:47:17
合計ジャッジ時間 1,947 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 13
権限があれば一括ダウンロードができます

ソースコード

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( a == 10 )
				return 0;
			if( a > maxa ){
				maxa = a;
				ans[i] = j;
			}
		}
	}
	for( i = 0; i < 10; i++ )
		cout << ans[i];
	cout << endl;
	return 0;
}
0