結果
問題 |
No.282 おもりと天秤(2)
|
ユーザー |
![]() |
提出日時 | 2015-09-18 23:53:06 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 974 bytes |
コンパイル時間 | 1,684 ms |
コンパイル使用メモリ | 160,880 KB |
実行使用メモリ | 25,476 KB |
平均クエリ数 | 49.58 |
最終ジャッジ日時 | 2024-07-16 05:59:45 |
合計ジャッジ時間 | 10,409 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 10 TLE * 1 -- * 13 |
ソースコード
#include <bits/stdc++.h> #define FOR(i,a,b) for(int i=(a);i<(b);i++) #define FFOR(i,a,b) for(int i=(a);i<=(b);i++) #define REP(i,b) FOR(i,0,b) #define RREP(i,b) FFOR(i,1,b) #define PB push_back #define F first #define S second #define BE(c) c.begin(),c.end() using namespace std; typedef long long LL; typedef int ut; typedef long double ld; typedef pair<ut,ut> pr; typedef vector<pr> Vpr; typedef vector<ut> VI; typedef pair<ut,pr> ppr; typedef vector<ppr> Vppr; typedef priority_queue<pr,Vpr,greater<pr> > PQ; typedef priority_queue<ppr,Vppr,greater<ppr> > PprQ; const int SIZE=5+3*1e+5; const LL INF=1LL<<60; const ld eps=1e-6; const LL p=7+1e+9; int nums[SIZE]; int N; bool pred(const int& a,const int& b){ string s; cout << "? " << nums[a] <<" " << nums[b]; REP(i,N-1) cout << " 0" << " 0"; cout << endl; cin >> s; return s[0]=='<'; } int main(){ cin >> N; REP(i,N+1) nums[i]=i; sort(nums+1,nums+N+1,pred); FOR(i,1,N+1) cout << nums[i] << endl; return 0; }