結果
| 問題 |
No.282 おもりと天秤(2)
|
| コンテスト | |
| ユーザー |
紙ぺーぱー
|
| 提出日時 | 2015-08-24 11:20:35 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 596 bytes |
| コンパイル時間 | 687 ms |
| コンパイル使用メモリ | 65,816 KB |
| 実行使用メモリ | 33,584 KB |
| 平均クエリ数 | 986.96 |
| 最終ジャッジ日時 | 2024-07-16 05:43:45 |
| 合計ジャッジ時間 | 13,411 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 10 RE * 1 TLE * 1 -- * 12 |
ソースコード
/*
fail
*/
#include <algorithm>
#include <vector>
#include <iostream>
using namespace std;
int n;
vector<int>a,q;
char op;
bool comp(int lhs,int rhs){
q[0]=lhs;q[1]=rhs;
cout<<"? ";
for(int i=0;i<2*n;i++){
cout<<q[i];
if(i<2*n-1)
cout<<' ';
}
cout<<endl;
char tmp;
cin>>op;
for(int i=0;i<n-1;i++){
cin>>tmp;
}
return op=='<';
}
int main(){
cin>>n;
q.assign(2*n,0);
a.assign(n,0);
for(int i=0;i<n;i++)
a[i]=i+1;
sort(a.begin(),a.end(),comp);
cout<<"! ";
for(int i=0;i<n;i++){
cout<<a[i];
if(i<n-1)cout<<' ';
}
cout<<endl;
}
紙ぺーぱー