結果
問題 | No.2502 Optimization in the Dark |
ユーザー |
|
提出日時 | 2023-01-12 16:04:00 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 902 bytes |
コンパイル時間 | 448 ms |
コンパイル使用メモリ | 68,040 KB |
最終ジャッジ日時 | 2025-02-10 01:50:35 |
ジャッジサーバーID (参考情報) |
judge1 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | RE * 43 |
ソースコード
#include <cassert> #include <iostream> bool query(int i, int x, int j, int y) { std::cout << "? " << i << ' ' << x << ' ' << j << ' ' << y << '\n', std::cout.flush(); std::string response; std::cin >> response; if (response == "Yes") { return true; } else if (response == "No") { return false; } else { assert(false); } } void output_answer(int n, int i1, int j1, int i2, int j2, int i3, int j3) { std::cout << "!"; for (int i = 0; i < n; ++i) std::cout << ' ' << i1 << ' ' << j1; for (int i = 0; i < n; ++i) std::cout << ' ' << i2 << ' ' << j2; for (int i = 0; i < n; ++i) std::cout << ' ' << i3 << ' ' << j3; std::cout << '\n', std::cout.flush(); } int main() { int n; std::cin >> n; query(1, 1, 1, 1); query(1, 1, 1, 1); query(1, 1, 1, 1); query(1, 1, 1, 1); output_answer(n, 1, 2, 2, 3, 3, 1); }