結果
問題 | No.282 おもりと天秤(2) |
ユーザー | beet |
提出日時 | 2018-11-11 21:15:47 |
言語 | C++17 (gcc 12.3.0 + boost 1.83.0) |
結果 |
TLE
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 773 bytes |
コンパイル時間 | 2,051 ms |
コンパイル使用メモリ | 201,740 KB |
実行使用メモリ | 24,360 KB |
平均クエリ数 | 917.12 |
最終ジャッジ日時 | 2023-09-24 02:02:04 |
合計ジャッジ時間 | 17,722 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 99 ms
24,024 KB |
testcase_01 | AC | 682 ms
23,556 KB |
testcase_02 | AC | 464 ms
23,640 KB |
testcase_03 | AC | 369 ms
24,072 KB |
testcase_04 | AC | 310 ms
23,388 KB |
testcase_05 | AC | 568 ms
24,048 KB |
testcase_06 | AC | 717 ms
24,180 KB |
testcase_07 | AC | 319 ms
23,436 KB |
testcase_08 | AC | 729 ms
24,036 KB |
testcase_09 | AC | 139 ms
24,360 KB |
testcase_10 | AC | 3,623 ms
23,532 KB |
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 | -- | - |
ソースコード
#include<bits/stdc++.h> using namespace std; using Int = long long; template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;} //INSERT ABOVE HERE signed main(){ int n; cin>>n; vector<int> ans(n); for(int i=0;i<n;i++) ans[i]=i+1; for(int t=0;t<2000;t++){ cout<<"?"; int c=n; for(int i=t&1;i+1<n;i+=2){ cout<<" "<<ans[i]; cout<<" "<<ans[i+1]; c--; } while(c--) cout<<" "<<0<<" "<<0; cout<<endl; c=n; string x; for(int i=t&1;i+1<n;i+=2){ cin>>x; if(x==">") swap(ans[i],ans[i+1]); c--; } while(c--) cin>>x; } cout<<"!"; for(int x:ans) cout<<" "<<x; cout<<endl; return 0; }