結果

問題 No.282 おもりと天秤(2)
ユーザー sortreewsortreew
提出日時 2015-09-19 00:26:11
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,081 bytes
コンパイル時間 1,418 ms
コンパイル使用メモリ 150,320 KB
実行使用メモリ 24,420 KB
平均クエリ数 601.25
最終ジャッジ日時 2023-09-23 06:12:44
合計ジャッジ時間 58,061 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
24,024 KB
testcase_01 AC 99 ms
24,072 KB
testcase_02 AC 41 ms
23,664 KB
testcase_03 AC 31 ms
24,384 KB
testcase_04 AC 30 ms
23,388 KB
testcase_05 AC 63 ms
24,408 KB
testcase_06 AC 118 ms
23,640 KB
testcase_07 AC 32 ms
23,652 KB
testcase_08 AC 119 ms
24,324 KB
testcase_09 AC 26 ms
24,012 KB
testcase_10 WA -
testcase_11 TLE -
testcase_12 WA -
testcase_13 WA -
testcase_14 TLE -
testcase_15 TLE -
testcase_16 AC 769 ms
24,036 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 TLE -
testcase_20 TLE -
testcase_21 TLE -
testcase_22 TLE -
testcase_23 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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="";
	s+="? ";
	ostringstream ss;
	ss<<a;
	s+=ss.str();
	s+=" ";
	ostringstream ssb;
	ssb<<b;
	s+=ssb.str();
	REP(i,N-1) s+=" 0 0";
	cout << s << endl;
	cin >> s;
	cin.ignore(N*2-2);
	return s[0]=='<';
}
int main(){
	cin >> N;
	REP(i,N+1) nums[i]=i;
	sort(nums+1,nums+N+1,pred);
	cout << "!";
	FOR(i,1,N+1)
		cout << " "  << nums[i];
	cout << endl;
	return 0;
}
0