結果

問題 No.471 直列回転機
ユーザー tubo28tubo28
提出日時 2016-12-12 13:47:45
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 442 ms / 3,141 ms
コード長 795 bytes
コンパイル時間 2,427 ms
コンパイル使用メモリ 168,872 KB
実行使用メモリ 24,372 KB
平均クエリ数 19588.39
最終ジャッジ日時 2023-09-02 03:34:01
合計ジャッジ時間 16,987 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
23,616 KB
testcase_01 AC 21 ms
24,360 KB
testcase_02 AC 22 ms
23,640 KB
testcase_03 AC 23 ms
24,324 KB
testcase_04 AC 22 ms
23,652 KB
testcase_05 AC 23 ms
24,372 KB
testcase_06 AC 23 ms
23,376 KB
testcase_07 AC 23 ms
23,640 KB
testcase_08 AC 50 ms
24,000 KB
testcase_09 AC 53 ms
23,820 KB
testcase_10 AC 41 ms
23,388 KB
testcase_11 AC 191 ms
24,336 KB
testcase_12 AC 364 ms
24,012 KB
testcase_13 AC 364 ms
23,532 KB
testcase_14 AC 400 ms
23,652 KB
testcase_15 AC 382 ms
23,652 KB
testcase_16 AC 25 ms
23,376 KB
testcase_17 AC 21 ms
23,364 KB
testcase_18 AC 21 ms
23,604 KB
testcase_19 AC 22 ms
23,400 KB
testcase_20 AC 420 ms
23,976 KB
testcase_21 AC 103 ms
23,400 KB
testcase_22 AC 375 ms
23,388 KB
testcase_23 AC 367 ms
23,628 KB
testcase_24 AC 220 ms
23,532 KB
testcase_25 AC 80 ms
24,312 KB
testcase_26 AC 442 ms
23,544 KB
testcase_27 AC 203 ms
23,364 KB
testcase_28 AC 251 ms
23,412 KB
testcase_29 AC 269 ms
23,412 KB
testcase_30 AC 116 ms
23,544 KB
testcase_31 AC 418 ms
24,024 KB
testcase_32 AC 357 ms
24,312 KB
testcase_33 AC 275 ms
23,976 KB
testcase_34 AC 426 ms
23,640 KB
testcase_35 AC 106 ms
23,352 KB
testcase_36 AC 162 ms
23,520 KB
testcase_37 AC 56 ms
23,412 KB
testcase_38 AC 94 ms
24,012 KB
testcase_39 AC 142 ms
24,336 KB
testcase_40 AC 302 ms
23,628 KB
testcase_41 AC 440 ms
24,372 KB
testcase_42 AC 276 ms
23,412 KB
testcase_43 AC 395 ms
24,000 KB
testcase_44 AC 55 ms
23,388 KB
testcase_45 AC 268 ms
23,400 KB
testcase_46 AC 322 ms
24,360 KB
testcase_47 AC 404 ms
23,424 KB
testcase_48 AC 345 ms
23,400 KB
testcase_49 AC 331 ms
23,400 KB
testcase_50 AC 386 ms
24,240 KB
testcase_51 AC 159 ms
23,808 KB
testcase_52 AC 25 ms
23,976 KB
testcase_53 AC 26 ms
23,808 KB
testcase_54 AC 27 ms
24,348 KB
testcase_55 AC 112 ms
24,372 KB
testcase_56 AC 101 ms
24,360 KB
testcase_57 AC 73 ms
23,628 KB
testcase_58 AC 44 ms
23,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
#define all(c) begin(c), end(c)
#define dump(x) cerr << __LINE__ << ":\t" #x " = " << x << endl

using ld = long double;
using cpl = complex<ld>;
int M;
vector<cpl> ps;

int main() {
    cin >> M;
    ps.resize(M);
    for (int i = 0; i < M; i++) {
        int x, y;
        cin >> x >> y;
        ps[i] = cpl(x, y);
    }
    cout << "? 0 0" << endl;
    int ox, oy, ex, ey;
    cin >> ox >> oy;
    cout << "? 1 0" << endl;
    cin >> ex >> ey;
    cpl c(ox, oy), r(ex - ox, ey - oy);
    dump(c);
    dump(r);
    cout << "!" << endl;
    for (int i = 0; i < M; i++) {
        auto p = ps[i] * r + c;
        cout << (int)p.real() << ' ' << (int)p.imag() << endl;
    }
}
0