結果
| 問題 | No.3737 Quiz Time |
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2026-07-12 03:28:57 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 778 bytes |
| 記録 | |
| コンパイル時間 | 3,041 ms |
| コンパイル使用メモリ | 352,496 KB |
| 実行使用メモリ | 6,528 KB |
| 平均クエリ数 | 35.90 |
| 最終ジャッジ日時 | 2026-09-19 12:34:48 |
| 合計ジャッジ時間 | 6,196 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / <nil> |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 50 |
ソースコード
// random queries
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int p;
cin >> p;
vector<pair<int, int>> queries = {{1, 1}, {p, p}, {1, p}};
for (int q = 0; q < (int)queries.size() && q < p; q++) {
cout << "? " << queries[q].first << ' ' << queries[q].second << '\n' << flush;
int response;
cin >> response;
if (response == -1) {
return 0;
}
}
cout << "!" << '\n';
for (int i = 0; i < p; i++) {
for (int j = 0; j < p; j++) {
if (j > 0) {
cout << ' ';
}
cout << 1 + (i * p + j + 1) % (p * p);
}
cout << '\n';
}
cout << flush;
return 0;
}