結果
問題 |
No.355 数当てゲーム(2)
|
ユーザー |
|
提出日時 | 2017-01-26 11:26:43 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 807 bytes |
コンパイル時間 | 1,625 ms |
コンパイル使用メモリ | 171,448 KB |
実行使用メモリ | 25,836 KB |
平均クエリ数 | 35.00 |
最終ジャッジ日時 | 2024-07-16 12:17:44 |
合計ジャッジ時間 | 11,648 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 52 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); vector<int> data = {9, 8, 7, 6}; for (int i = 0; i < 4; i++) { int xy = -1; int know = data.back(); for (int num = 0; num <= data.back(); num++) { for (int idx = 0; idx < 4; idx++) { cout << data[idx]; if (idx == 3) cout << endl; else cout << " "; } int X, XY; cin >> X >> XY; XY += X; if (xy < XY) { xy = XY; know = num; } } rotate(data.rbegin(), data.rbegin() + 1, data.rend()); data.front() = know; } do { for (int idx = 0; idx < 4; idx++) { cout << data[idx]; if (idx == 3) cout << endl; else cout << " "; } int X, Y; cin >> X >> Y; if (X == 4) break; } while (next_permutation(data.begin(), data.end())); return 0; }