結果

問題 No.471 直列回転機
ユーザー koba-e964
提出日時 2016-12-21 13:31:05
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 529 ms / 3,141 ms
コード長 749 bytes
コンパイル時間 660 ms
コンパイル使用メモリ 61,992 KB
実行使用メモリ 25,592 KB
平均クエリ数 19589.39
最終ジャッジ日時 2024-06-11 10:27:24
合計ジャッジ時間 17,441 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 58
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <iostream>
#include <vector>

#define REP(i,s,n) for(int i=(int)(s);i<(int)(n);i++)

using namespace std;
typedef long long int ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef pair<int, int> PI;
const ll mod = 1e9 + 7;



int main(void){
  int m;
  cin >> m;
  VL x(m), y(m);
  REP(i, 0, m) {
    cin >> x[i] >> y[i];
  }
  ll ox, oy;
  cout << "? 0 0" << endl;
  cin >> ox >> oy;
  ll kx, ky;
  cout << "? 1 0" << endl;
  cin >> kx >> ky;
  kx -= ox;
  ky -= oy;
  ll lx, ly;
  cout << "? 0 1" << endl;
  cin >> lx >> ly;
  lx -= ox;
  ly -= oy;
  cout << "!" << endl;
  REP(i, 0, m) {
    cout << ox + kx * x[i] + lx * y[i];
    cout << " ";
    cout << oy + ky * x[i] + ly * y[i];
    cout << endl;
  }
}
0