結果

問題 No.471 直列回転機
ユーザー けーけー
提出日時 2017-04-13 22:18:50
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 470 ms / 3,141 ms
コード長 710 bytes
コンパイル時間 1,923 ms
コンパイル使用メモリ 165,728 KB
実行使用メモリ 24,480 KB
平均クエリ数 19588.39
最終ジャッジ日時 2023-09-02 03:56:24
合計ジャッジ時間 17,840 ms
ジャッジサーバーID
(参考情報)
judge16 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,324 KB
testcase_01 AC 25 ms
24,288 KB
testcase_02 AC 24 ms
24,372 KB
testcase_03 AC 25 ms
23,376 KB
testcase_04 AC 25 ms
23,616 KB
testcase_05 AC 27 ms
23,700 KB
testcase_06 AC 27 ms
24,348 KB
testcase_07 AC 28 ms
24,012 KB
testcase_08 AC 67 ms
24,024 KB
testcase_09 AC 72 ms
23,364 KB
testcase_10 AC 51 ms
23,640 KB
testcase_11 AC 194 ms
24,228 KB
testcase_12 AC 410 ms
23,424 KB
testcase_13 AC 401 ms
24,012 KB
testcase_14 AC 442 ms
23,376 KB
testcase_15 AC 470 ms
24,324 KB
testcase_16 AC 29 ms
24,240 KB
testcase_17 AC 26 ms
23,376 KB
testcase_18 AC 25 ms
23,508 KB
testcase_19 AC 26 ms
24,300 KB
testcase_20 AC 462 ms
24,348 KB
testcase_21 AC 104 ms
23,376 KB
testcase_22 AC 394 ms
23,364 KB
testcase_23 AC 388 ms
23,352 KB
testcase_24 AC 219 ms
23,412 KB
testcase_25 AC 88 ms
23,808 KB
testcase_26 AC 449 ms
23,628 KB
testcase_27 AC 214 ms
23,400 KB
testcase_28 AC 258 ms
23,616 KB
testcase_29 AC 294 ms
24,300 KB
testcase_30 AC 120 ms
23,376 KB
testcase_31 AC 429 ms
24,348 KB
testcase_32 AC 363 ms
23,376 KB
testcase_33 AC 296 ms
23,364 KB
testcase_34 AC 435 ms
23,628 KB
testcase_35 AC 109 ms
23,400 KB
testcase_36 AC 188 ms
24,024 KB
testcase_37 AC 62 ms
24,012 KB
testcase_38 AC 98 ms
23,376 KB
testcase_39 AC 151 ms
23,520 KB
testcase_40 AC 305 ms
23,616 KB
testcase_41 AC 463 ms
23,520 KB
testcase_42 AC 289 ms
24,240 KB
testcase_43 AC 406 ms
23,376 KB
testcase_44 AC 63 ms
24,252 KB
testcase_45 AC 281 ms
23,508 KB
testcase_46 AC 323 ms
24,312 KB
testcase_47 AC 410 ms
24,228 KB
testcase_48 AC 372 ms
24,024 KB
testcase_49 AC 367 ms
24,240 KB
testcase_50 AC 405 ms
23,364 KB
testcase_51 AC 177 ms
23,628 KB
testcase_52 AC 27 ms
23,808 KB
testcase_53 AC 30 ms
23,616 KB
testcase_54 AC 30 ms
23,820 KB
testcase_55 AC 117 ms
24,480 KB
testcase_56 AC 99 ms
23,964 KB
testcase_57 AC 74 ms
24,336 KB
testcase_58 AC 47 ms
24,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<bits/stdc++.h>
#define int long long
const int inf=8938103643641919514ll;
const int mod=1000000007;
const int dd[]={0,-1,0,1,0};
using namespace std;
int a,b,c,d;
int p[100000],q[100000];
signed main(){
	int i,j;
	cin>>a;
	for(i=0;i<a;i++)
		cin>>p[i]>>q[i];
	cout<<"? 0 0"<<endl;
	int x,y;
	cin>>x>>y;
	cout<<"? 1 0"<<endl;
	int z,w;
	cin>>z>>w;
	z-=x;
	w-=y;
	if(z==0){
		if(w==1)
			for(i=0;i<a;i++){
				int x=p[i];
				p[i]=-q[i];
				q[i]=x;
			}
		else
			for(i=0;i<a;i++){
				int x=p[i];
				p[i]=q[i];
				q[i]=-x;
			}
	}else if(z==-1){
		for(i=0;i<a;i++)
			p[i]=-p[i],q[i]=-q[i];
	}
	for(i=0;i<a;i++)
		p[i]+=x,q[i]+=y;
	cout<<"!"<<endl;
	for(i=0;i<a;i++)
		cout<<p[i]<<" "<<q[i]<<endl;
}
0