結果

問題 No.471 直列回転機
ユーザー KlayKlay
提出日時 2017-05-10 21:19:38
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 438 ms / 3,141 ms
コード長 714 bytes
コンパイル時間 458 ms
コンパイル使用メモリ 51,944 KB
実行使用メモリ 24,348 KB
平均クエリ数 19589.39
最終ジャッジ日時 2023-09-02 03:58:38
合計ジャッジ時間 15,129 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,216 KB
testcase_01 AC 22 ms
24,168 KB
testcase_02 AC 22 ms
23,376 KB
testcase_03 AC 23 ms
23,316 KB
testcase_04 AC 23 ms
23,976 KB
testcase_05 AC 24 ms
24,180 KB
testcase_06 AC 22 ms
24,168 KB
testcase_07 AC 24 ms
23,460 KB
testcase_08 AC 61 ms
24,168 KB
testcase_09 AC 56 ms
23,856 KB
testcase_10 AC 38 ms
23,208 KB
testcase_11 AC 179 ms
23,604 KB
testcase_12 AC 362 ms
23,988 KB
testcase_13 AC 391 ms
23,880 KB
testcase_14 AC 409 ms
23,580 KB
testcase_15 AC 388 ms
23,376 KB
testcase_16 AC 26 ms
23,988 KB
testcase_17 AC 23 ms
24,252 KB
testcase_18 AC 23 ms
23,640 KB
testcase_19 AC 23 ms
23,328 KB
testcase_20 AC 421 ms
23,436 KB
testcase_21 AC 106 ms
24,252 KB
testcase_22 AC 372 ms
23,976 KB
testcase_23 AC 357 ms
23,796 KB
testcase_24 AC 221 ms
23,976 KB
testcase_25 AC 85 ms
23,208 KB
testcase_26 AC 438 ms
23,376 KB
testcase_27 AC 208 ms
23,976 KB
testcase_28 AC 247 ms
23,856 KB
testcase_29 AC 269 ms
23,448 KB
testcase_30 AC 116 ms
23,460 KB
testcase_31 AC 426 ms
24,216 KB
testcase_32 AC 356 ms
23,184 KB
testcase_33 AC 283 ms
23,796 KB
testcase_34 AC 434 ms
23,580 KB
testcase_35 AC 105 ms
23,844 KB
testcase_36 AC 174 ms
23,184 KB
testcase_37 AC 58 ms
23,448 KB
testcase_38 AC 94 ms
23,208 KB
testcase_39 AC 145 ms
23,640 KB
testcase_40 AC 292 ms
23,496 KB
testcase_41 AC 425 ms
23,604 KB
testcase_42 AC 280 ms
23,496 KB
testcase_43 AC 393 ms
23,448 KB
testcase_44 AC 59 ms
23,976 KB
testcase_45 AC 266 ms
23,484 KB
testcase_46 AC 301 ms
24,240 KB
testcase_47 AC 407 ms
23,508 KB
testcase_48 AC 340 ms
23,916 KB
testcase_49 AC 330 ms
23,196 KB
testcase_50 AC 400 ms
23,844 KB
testcase_51 AC 171 ms
23,196 KB
testcase_52 AC 25 ms
24,348 KB
testcase_53 AC 25 ms
23,460 KB
testcase_54 AC 25 ms
23,568 KB
testcase_55 AC 110 ms
23,484 KB
testcase_56 AC 94 ms
23,976 KB
testcase_57 AC 67 ms
24,240 KB
testcase_58 AC 43 ms
23,580 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

int main(void)
{
	long long M;
	
	std::cin >> M;
	
	long long x[M];
	long long y[M];
	
	for(long long i = 0; i < M; i ++)
	{
		std::cin >> x[i] >> y[i];
	}

	long long a, b, c, d, e, f, buff_x, buff_y;
	
	std::cout << "? 0 0" << std::endl;
	std::cin >> c >> f;
	
	std::cout << "? 0 1" << std::endl;
	std::cin >> buff_x >> buff_y;
	b = buff_x - c;
	e = buff_y - f;
	
	std::cout << "? 1 0" << std::endl;
	std::cin >> buff_x >> buff_y;
	a = buff_x - c;
	d = buff_y - f;
	
	std::cout << "!" << std::endl;
	
	for(long long i = 0; i < M; i ++)
	{
		buff_x = a * x[i] + b * y[i] + c;
		buff_y = d * x[i] + e * y[i] + f;
	
		std::cout << buff_x << " " << buff_y << std::endl;
	}

	return 0;
}








0