結果
| 問題 |
No.282 おもりと天秤(2)
|
| コンテスト | |
| ユーザー |
唐澤貴洋
|
| 提出日時 | 2015-10-13 22:32:34 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 830 bytes |
| コンパイル時間 | 609 ms |
| コンパイル使用メモリ | 72,600 KB |
| 実行使用メモリ | 25,604 KB |
| 平均クエリ数 | 357.50 |
| 最終ジャッジ日時 | 2024-07-16 06:28:33 |
| 合計ジャッジ時間 | 25,508 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 WA * 20 RE * 2 |
ソースコード
#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<list>
#include<stack>
#include<queue>
#include<bitset>
#include<array>
#include<algorithm>
#include<cstdio>
#include<string>
#include<cstdlib>
#include<numeric>
#define D long long
#define U unsigned
using namespace std;
D n, m,a, b, d, e, x, y, z;
D i, j, k;
char c,f;
string s;
D p[500];
int main() {
cin >> a;
iota(p, p + a, 1);
f = 0;
for (i = 0; i < a * 2;i++){
s = "";
s +='?';
for (j = 0; j < a; j++) {
s += " "+to_string(p[j+f]);
}
for (; j < a * 2; j++) {
s+= " 0";
}
cout << s << endl;
for (j = f; j < ((a-f)&(~0<<1)); j++) {
cin >> c;
if (c == '>') {
swap(p[j], p[j + 1]);
}
}
for (; j < a; j++)
cin >> c;
f ^= 1;
}
cout << '!';
for (i = 0; i < a; i++) {
cout <<' '<< p[i];
}
cout << endl;
}
唐澤貴洋