結果

問題 No.471 直列回転機
ユーザー YamyukiYamyuki
提出日時 2016-12-22 08:34:16
言語 C90
(gcc 11.4.0)
結果
AC  
実行時間 313 ms / 3,141 ms
コード長 576 bytes
コンパイル時間 1,733 ms
コンパイル使用メモリ 23,572 KB
実行使用メモリ 24,324 KB
平均クエリ数 19589.39
最終ジャッジ日時 2023-09-02 03:50:01
合計ジャッジ時間 13,329 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,216 KB
testcase_01 AC 20 ms
23,508 KB
testcase_02 AC 20 ms
23,220 KB
testcase_03 AC 21 ms
24,024 KB
testcase_04 AC 21 ms
23,340 KB
testcase_05 AC 23 ms
23,424 KB
testcase_06 AC 22 ms
23,508 KB
testcase_07 AC 23 ms
23,652 KB
testcase_08 AC 37 ms
23,448 KB
testcase_09 AC 46 ms
24,012 KB
testcase_10 AC 32 ms
23,340 KB
testcase_11 AC 132 ms
23,220 KB
testcase_12 AC 248 ms
24,240 KB
testcase_13 AC 251 ms
23,484 KB
testcase_14 AC 267 ms
24,024 KB
testcase_15 AC 313 ms
23,544 KB
testcase_16 AC 24 ms
24,024 KB
testcase_17 AC 21 ms
23,628 KB
testcase_18 AC 20 ms
23,844 KB
testcase_19 AC 22 ms
23,640 KB
testcase_20 AC 296 ms
23,844 KB
testcase_21 AC 74 ms
23,832 KB
testcase_22 AC 263 ms
23,328 KB
testcase_23 AC 251 ms
23,868 KB
testcase_24 AC 156 ms
23,808 KB
testcase_25 AC 70 ms
23,532 KB
testcase_26 AC 275 ms
24,240 KB
testcase_27 AC 153 ms
23,880 KB
testcase_28 AC 169 ms
23,172 KB
testcase_29 AC 189 ms
24,204 KB
testcase_30 AC 91 ms
24,204 KB
testcase_31 AC 295 ms
23,880 KB
testcase_32 AC 243 ms
24,012 KB
testcase_33 AC 187 ms
23,832 KB
testcase_34 AC 293 ms
23,340 KB
testcase_35 AC 85 ms
24,000 KB
testcase_36 AC 137 ms
23,808 KB
testcase_37 AC 37 ms
23,868 KB
testcase_38 AC 73 ms
23,232 KB
testcase_39 AC 112 ms
23,400 KB
testcase_40 AC 216 ms
23,640 KB
testcase_41 AC 286 ms
23,340 KB
testcase_42 AC 195 ms
23,376 KB
testcase_43 AC 266 ms
24,324 KB
testcase_44 AC 51 ms
23,640 KB
testcase_45 AC 178 ms
23,340 KB
testcase_46 AC 223 ms
23,412 KB
testcase_47 AC 267 ms
23,388 KB
testcase_48 AC 242 ms
23,640 KB
testcase_49 AC 231 ms
23,424 KB
testcase_50 AC 258 ms
23,832 KB
testcase_51 AC 131 ms
23,832 KB
testcase_52 AC 25 ms
23,412 KB
testcase_53 AC 25 ms
23,340 KB
testcase_54 AC 23 ms
23,328 KB
testcase_55 AC 93 ms
24,168 KB
testcase_56 AC 76 ms
23,232 KB
testcase_57 AC 59 ms
23,844 KB
testcase_58 AC 32 ms
23,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<stdio.h>
long x[50000],y[50000];

int main(){
	long m,i,x1,x2,y1,y2,x3,y3;
	int r;
	scanf("%ld",&m);
	for(i=0;i<m;i++){
		scanf("%ld %ld",&x[i],&y[i]);
	}
	printf("? 0 0\n");
	fflush(stdout);
	scanf("%ld %ld",&x1,&y1);
	printf("? 1 0\n");
	fflush(stdout);
	scanf("%ld %ld",&x2,&y2);
	printf("? 0 1\n");
	fflush(stdout);
	scanf("%ld %ld",&x3,&y3);
	r=(x2==x1)?0:1;
	x2=(x2==x1)?(y2-y1):(x2-x1);
	y3=(x3==x1)?(y3-y1):(x3-x1);
	printf("!\n");
	for(i=0;i<m;i++){
		printf("%ld %ld\n",r*x2*x[i]+(!r)*y3*y[i]+x1,(!r)*x2*x[i]+r*y3*y[i]+y1);
	}
	fflush(stdout);
	return 0;
}
0