結果
| 問題 |
No.471 直列回転機
|
| コンテスト | |
| ユーザー |
tubo28
|
| 提出日時 | 2016-12-12 13:47:45 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 514 ms / 3,141 ms |
| コード長 | 795 bytes |
| コンパイル時間 | 1,806 ms |
| コンパイル使用メモリ | 169,560 KB |
| 実行使用メモリ | 25,592 KB |
| 平均クエリ数 | 19588.39 |
| 最終ジャッジ日時 | 2024-06-11 10:12:42 |
| 合計ジャッジ時間 | 19,081 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 58 |
ソースコード
#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;
}
}
tubo28