結果

問題 No.355 数当てゲーム(2)
コンテスト
ユーザー femto
提出日時 2016-08-20 19:11:49
言語 C++14
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
RE  
実行時間 -
コード長 599 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 734 ms
コンパイル使用メモリ 92,872 KB
実行使用メモリ 28,988 KB
平均クエリ数 1385.46
最終ジャッジ日時 2026-03-30 22:48:06
合計ジャッジ時間 26,037 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other RE * 52
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <string>
#include <algorithm>
#include <iomanip>
using namespace std;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int a[4] = { 0 };

	while(true) {
		for(int i = 0; i < 4; i++) {
			int maxj = -1, maxx = -1;
			for(int j = 0; j < 10; j++) {
				a[j] = j;
				for(int k = 0; k < 4; k++) {
					cout << a[k] << " ";
				}
				cout << endl;
				cout.flush();

				int X, Y;
				cin >> X >> Y;
				if(X == 4) return 0;
				if(maxx < X) {
					maxx = X;
					maxj = j;
				}
			}
			a[i] = maxj;
		}
	}
}
0