結果
問題 | No.282 おもりと天秤(2) |
ユーザー | 紙ぺーぱー |
提出日時 | 2015-08-24 11:20:35 |
言語 | C++11 (gcc 11.4.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 596 bytes |
コンパイル時間 | 769 ms |
コンパイル使用メモリ | 67,756 KB |
実行使用メモリ | 24,384 KB |
平均クエリ数 | 986.96 |
最終ジャッジ日時 | 2023-09-23 05:45:31 |
合計ジャッジ時間 | 13,810 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 28 ms
24,036 KB |
testcase_01 | AC | 105 ms
24,384 KB |
testcase_02 | AC | 44 ms
23,844 KB |
testcase_03 | AC | 32 ms
23,640 KB |
testcase_04 | AC | 31 ms
23,844 KB |
testcase_05 | AC | 63 ms
24,024 KB |
testcase_06 | AC | 122 ms
23,652 KB |
testcase_07 | AC | 34 ms
23,412 KB |
testcase_08 | AC | 122 ms
24,036 KB |
testcase_09 | AC | 26 ms
24,312 KB |
testcase_10 | RE | - |
testcase_11 | TLE | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
testcase_14 | -- | - |
testcase_15 | -- | - |
testcase_16 | -- | - |
testcase_17 | -- | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
ソースコード
/* 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; }