結果

問題 No.471 直列回転機
ユーザー hirokazu1020hirokazu1020
提出日時 2016-12-21 22:47:17
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 422 ms / 3,141 ms
コード長 1,028 bytes
コンパイル時間 1,824 ms
コンパイル使用メモリ 91,572 KB
実行使用メモリ 24,336 KB
平均クエリ数 19589.39
最終ジャッジ日時 2023-09-02 03:50:19
合計ジャッジ時間 15,779 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
23,232 KB
testcase_01 AC 23 ms
24,096 KB
testcase_02 AC 20 ms
23,220 KB
testcase_03 AC 21 ms
23,532 KB
testcase_04 AC 22 ms
24,180 KB
testcase_05 AC 24 ms
23,340 KB
testcase_06 AC 25 ms
24,156 KB
testcase_07 AC 24 ms
23,460 KB
testcase_08 AC 56 ms
23,880 KB
testcase_09 AC 59 ms
23,628 KB
testcase_10 AC 34 ms
23,208 KB
testcase_11 AC 178 ms
23,328 KB
testcase_12 AC 348 ms
23,652 KB
testcase_13 AC 355 ms
23,244 KB
testcase_14 AC 387 ms
23,844 KB
testcase_15 AC 358 ms
23,184 KB
testcase_16 AC 25 ms
24,000 KB
testcase_17 AC 22 ms
23,628 KB
testcase_18 AC 24 ms
23,412 KB
testcase_19 AC 23 ms
23,184 KB
testcase_20 AC 401 ms
23,184 KB
testcase_21 AC 99 ms
23,868 KB
testcase_22 AC 360 ms
23,184 KB
testcase_23 AC 335 ms
23,832 KB
testcase_24 AC 193 ms
24,156 KB
testcase_25 AC 77 ms
24,132 KB
testcase_26 AC 405 ms
24,192 KB
testcase_27 AC 193 ms
24,336 KB
testcase_28 AC 240 ms
24,096 KB
testcase_29 AC 268 ms
23,208 KB
testcase_30 AC 119 ms
23,652 KB
testcase_31 AC 403 ms
23,220 KB
testcase_32 AC 337 ms
23,364 KB
testcase_33 AC 258 ms
23,436 KB
testcase_34 AC 405 ms
24,324 KB
testcase_35 AC 99 ms
23,616 KB
testcase_36 AC 173 ms
24,216 KB
testcase_37 AC 47 ms
23,544 KB
testcase_38 AC 84 ms
23,472 KB
testcase_39 AC 140 ms
23,628 KB
testcase_40 AC 279 ms
23,808 KB
testcase_41 AC 422 ms
23,220 KB
testcase_42 AC 266 ms
23,400 KB
testcase_43 AC 381 ms
24,024 KB
testcase_44 AC 55 ms
24,216 KB
testcase_45 AC 252 ms
24,228 KB
testcase_46 AC 299 ms
23,376 KB
testcase_47 AC 385 ms
24,024 KB
testcase_48 AC 315 ms
24,192 KB
testcase_49 AC 320 ms
24,192 KB
testcase_50 AC 375 ms
23,184 KB
testcase_51 AC 163 ms
23,796 KB
testcase_52 AC 25 ms
24,192 KB
testcase_53 AC 25 ms
23,544 KB
testcase_54 AC 24 ms
24,024 KB
testcase_55 AC 107 ms
23,868 KB
testcase_56 AC 88 ms
23,364 KB
testcase_57 AC 74 ms
23,400 KB
testcase_58 AC 40 ms
24,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _CRT_SECURE_NO_WARNINGS
#include<sstream>
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<cmath>
#include<string>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<numeric>
#include<functional>
#include<algorithm>
#include<bitset>
#include<tuple>
#include<unordered_set>
#include<random>
using namespace std;
#define INF (1<<29)
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define all(v) v.begin(),v.end()
#define uniq(v) v.erase(unique(all(v)),v.end())


int m;
int x[50000], y[50000];

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0);

	cin >> m;
	rep(i,m) {
		cin >> x[i] >> y[i];
	}
	int cx, cy;
	cout << "? 0 0" << endl;
	cin >> cx >> cy;
	int mxx, mxy;
	int myx, myy;
	cout << "? 1 0" << endl;
	cin >> mxx >> mxy;
	mxx -= cx;
	mxy -= cy;
	cout << "? 0 1" << endl;
	cin >> myx >> myy;
	myx -= cx;
	myy -= cy;

	cout << "!" << endl;
	rep(i,m) {
		cout << mxx*x[i] + myx*y[i] + cx << ' ' << mxy*x[i] + myy*y[i] + cy << endl;
	}
	
	return 0;
}
0