結果

問題 No.471 直列回転機
ユーザー koba-e964koba-e964
提出日時 2016-12-21 13:31:05
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 528 ms / 3,141 ms
コード長 749 bytes
コンパイル時間 1,332 ms
コンパイル使用メモリ 62,384 KB
実行使用メモリ 24,420 KB
平均クエリ数 19589.39
最終ジャッジ日時 2023-09-02 03:46:27
合計ジャッジ時間 18,828 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
24,024 KB
testcase_01 AC 25 ms
23,388 KB
testcase_02 AC 24 ms
24,072 KB
testcase_03 AC 25 ms
23,700 KB
testcase_04 AC 24 ms
23,688 KB
testcase_05 AC 27 ms
24,000 KB
testcase_06 AC 25 ms
23,640 KB
testcase_07 AC 26 ms
23,604 KB
testcase_08 AC 66 ms
23,388 KB
testcase_09 AC 65 ms
24,336 KB
testcase_10 AC 48 ms
23,628 KB
testcase_11 AC 205 ms
24,360 KB
testcase_12 AC 408 ms
23,892 KB
testcase_13 AC 422 ms
23,652 KB
testcase_14 AC 459 ms
24,012 KB
testcase_15 AC 399 ms
24,024 KB
testcase_16 AC 27 ms
24,036 KB
testcase_17 AC 24 ms
24,348 KB
testcase_18 AC 25 ms
24,000 KB
testcase_19 AC 24 ms
24,336 KB
testcase_20 AC 476 ms
24,024 KB
testcase_21 AC 111 ms
23,808 KB
testcase_22 AC 406 ms
24,312 KB
testcase_23 AC 396 ms
23,388 KB
testcase_24 AC 242 ms
24,084 KB
testcase_25 AC 87 ms
23,604 KB
testcase_26 AC 484 ms
24,420 KB
testcase_27 AC 234 ms
23,532 KB
testcase_28 AC 282 ms
23,628 KB
testcase_29 AC 313 ms
23,424 KB
testcase_30 AC 136 ms
24,096 KB
testcase_31 AC 513 ms
24,084 KB
testcase_32 AC 415 ms
24,084 KB
testcase_33 AC 346 ms
23,412 KB
testcase_34 AC 528 ms
23,532 KB
testcase_35 AC 130 ms
24,084 KB
testcase_36 AC 215 ms
23,424 KB
testcase_37 AC 72 ms
23,604 KB
testcase_38 AC 118 ms
24,420 KB
testcase_39 AC 173 ms
23,436 KB
testcase_40 AC 333 ms
24,012 KB
testcase_41 AC 486 ms
23,532 KB
testcase_42 AC 311 ms
24,024 KB
testcase_43 AC 435 ms
23,628 KB
testcase_44 AC 61 ms
23,400 KB
testcase_45 AC 303 ms
24,012 KB
testcase_46 AC 344 ms
23,376 KB
testcase_47 AC 446 ms
23,808 KB
testcase_48 AC 378 ms
23,592 KB
testcase_49 AC 363 ms
23,628 KB
testcase_50 AC 445 ms
24,396 KB
testcase_51 AC 187 ms
24,012 KB
testcase_52 AC 32 ms
23,592 KB
testcase_53 AC 30 ms
24,336 KB
testcase_54 AC 29 ms
24,024 KB
testcase_55 AC 118 ms
23,436 KB
testcase_56 AC 105 ms
23,628 KB
testcase_57 AC 81 ms
23,880 KB
testcase_58 AC 45 ms
24,348 KB
権限があれば一括ダウンロードができます

ソースコード

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