結果
| 問題 |
No.282 おもりと天秤(2)
|
| コンテスト | |
| ユーザー |
izuru_matsuura
|
| 提出日時 | 2016-06-15 15:17:27 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 1,069 bytes |
| コンパイル時間 | 1,403 ms |
| コンパイル使用メモリ | 162,904 KB |
| 実行使用メモリ | 25,348 KB |
| 平均クエリ数 | 917.12 |
| 最終ジャッジ日時 | 2024-07-16 10:27:48 |
| 合計ジャッジ時間 | 17,970 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 WA * 6 TLE * 1 -- * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
namespace {
int N;
void input() {
cin >> N;
}
void solve() {
vector<int> F;
for (int i = 1; i <= N; i++) F.push_back(i);
int d = N % 2;
for (int k = 0, t = 0; k < 2000; k++, t = !t) {
cout << "?";
int c = 0;
for (int i = (d && t); i + 1 < N; i += 2) {
cout << " " << F[i] << " " << F[i + 1];
c++;
}
for (int j = c; j < N; j++) {
cout << " 0 0";
}
cout << endl;
for (int i = (d && t); i + 1 < N; i += 2) {
string x; cin >> x;
if (x == ">") {
swap(F[i], F[i + 1]);
}
}
for (int i = c; i < N; i++) {
string x; cin >> x;
}
}
cout << "!";
for (int i = 0; i < N; i++) {
cout << " " << F[i];
}
cout << endl;
}
}
int main() {
input(); solve();
}
izuru_matsuura