結果

問題 No.471 直列回転機
ユーザー FF256grhyFF256grhy
提出日時 2016-12-21 01:06:15
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 355 ms / 3,141 ms
コード長 2,168 bytes
コンパイル時間 1,231 ms
コンパイル使用メモリ 143,928 KB
実行使用メモリ 24,300 KB
平均クエリ数 19589.39
最終ジャッジ日時 2023-09-02 03:40:34
合計ジャッジ時間 13,883 ms
ジャッジサーバーID
(参考情報)
judge16 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
24,276 KB
testcase_01 AC 25 ms
23,424 KB
testcase_02 AC 27 ms
23,712 KB
testcase_03 AC 28 ms
23,352 KB
testcase_04 AC 27 ms
23,880 KB
testcase_05 AC 26 ms
24,204 KB
testcase_06 AC 26 ms
24,072 KB
testcase_07 AC 27 ms
23,592 KB
testcase_08 AC 47 ms
24,300 KB
testcase_09 AC 53 ms
23,448 KB
testcase_10 AC 36 ms
23,868 KB
testcase_11 AC 156 ms
23,808 KB
testcase_12 AC 286 ms
23,424 KB
testcase_13 AC 296 ms
23,676 KB
testcase_14 AC 316 ms
23,592 KB
testcase_15 AC 355 ms
23,628 KB
testcase_16 AC 27 ms
23,988 KB
testcase_17 AC 28 ms
23,568 KB
testcase_18 AC 24 ms
24,288 KB
testcase_19 AC 25 ms
24,216 KB
testcase_20 AC 327 ms
23,520 KB
testcase_21 AC 96 ms
23,364 KB
testcase_22 AC 296 ms
23,580 KB
testcase_23 AC 271 ms
24,264 KB
testcase_24 AC 179 ms
23,412 KB
testcase_25 AC 78 ms
23,448 KB
testcase_26 AC 320 ms
23,424 KB
testcase_27 AC 167 ms
24,288 KB
testcase_28 AC 205 ms
23,436 KB
testcase_29 AC 217 ms
24,288 KB
testcase_30 AC 110 ms
23,700 KB
testcase_31 AC 327 ms
24,192 KB
testcase_32 AC 280 ms
24,276 KB
testcase_33 AC 212 ms
23,496 KB
testcase_34 AC 310 ms
24,060 KB
testcase_35 AC 93 ms
23,376 KB
testcase_36 AC 146 ms
23,424 KB
testcase_37 AC 45 ms
24,228 KB
testcase_38 AC 77 ms
23,472 KB
testcase_39 AC 128 ms
24,000 KB
testcase_40 AC 238 ms
23,460 KB
testcase_41 AC 330 ms
24,000 KB
testcase_42 AC 217 ms
23,592 KB
testcase_43 AC 302 ms
23,508 KB
testcase_44 AC 57 ms
24,072 KB
testcase_45 AC 204 ms
23,424 KB
testcase_46 AC 239 ms
23,688 KB
testcase_47 AC 297 ms
23,388 KB
testcase_48 AC 258 ms
24,276 KB
testcase_49 AC 248 ms
24,228 KB
testcase_50 AC 285 ms
24,012 KB
testcase_51 AC 135 ms
23,700 KB
testcase_52 AC 27 ms
23,616 KB
testcase_53 AC 27 ms
24,288 KB
testcase_54 AC 30 ms
23,388 KB
testcase_55 AC 96 ms
24,288 KB
testcase_56 AC 82 ms
23,628 KB
testcase_57 AC 64 ms
23,700 KB
testcase_58 AC 37 ms
23,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

typedef long long   signed int LL;
typedef long long unsigned int LU;

#define incID(i, l, r) for(int i = (l)    ; i <  (r); i++)
#define incII(i, l, r) for(int i = (l)    ; i <= (r); i++)
#define decID(i, l, r) for(int i = (r) - 1; i >= (l); i--)
#define decII(i, l, r) for(int i = (r)    ; i >= (l); i--)
#define inc( i, n) incID(i, 0, n)
#define inc1(i, n) incII(i, 1, n)
#define dec( i, n) decID(i, 0, n)
#define dec1(i, n) decII(i, 1, n)

#define inII(v, l, r) ((l) <= (v) && (v) <= (r))
#define inID(v, l, r) ((l) <= (v) && (v) <  (r))

#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define UB upper_bound
#define LB lower_bound
#define PQ priority_queue

#define  ALL(v)  v.begin(),  v.end()
#define RALL(v) v.rbegin(), v.rend()
#define  FOR(i, v) for(auto i =  v.begin(); i !=  v.end(); ++i)
#define RFOR(i, v) for(auto i = v.rbegin(); i != v.rend(); ++i)

template<typename T> bool setmin(T & a, T b) { if(a <= b) { return false; } else { a = b; return true; } }
template<typename T> bool setmax(T & a, T b) { if(b <= a) { return false; } else { a = b; return true; } }
template<typename T> T gcd(T a, T b) { return (b == 0 ? a : gcd(b, a % b)); }
template<typename T> T lcm(T a, T b) { return a / gcd(a, b) * b; }

template<typename T> ostream & operator<<(ostream & os, const vector<T> & v) {
	os << "[";
	FOR(it, v) {
		if(it != v.begin()) { os << ", "; }
		os << *it;
	}
	os << "]";
	return os;
}
template<typename F, typename S> ostream & operator<<(ostream & os, const pair<F, S> & p) {
	os << "<" << p.FI << ", " << p.SE << ">";
	return os;
}

// ---- ----

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

int xx[3], yy[3];

int main() {
	cin >> m;
	inc(i, m) { cin >> x[i] >> y[i]; }
	
	cout << "? 0 0" << endl;
	cin >> xx[0] >> yy[0];
	
	cout << "? 1 0" << endl;
	cin >> xx[1] >> yy[1];
	
	cout << "? 0 1" << endl;
	cin >> xx[2] >> yy[2];
	
	cout << "!\n";
	inc(i, m) {
		cout
			<< ( x[i] * (xx[1] - xx[0]) + y[i] * (xx[2] - xx[0]) + xx[0] )
			<< " "
			<< ( x[i] * (yy[1] - yy[0]) + y[i] * (yy[2] - yy[0]) + yy[0] )
			<< "\n"
		;
	}
	cout << flush;
	
	return 0;
}
0