結果

問題 No.471 直列回転機
ユーザー koyumeishikoyumeishi
提出日時 2016-12-20 10:51:11
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 742 bytes
コンパイル時間 1,752 ms
コンパイル使用メモリ 86,376 KB
実行使用メモリ 35,264 KB
平均クエリ数 0.36
最終ジャッジ日時 2023-09-23 11:54:03
合計ジャッジ時間 8,397 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 TLE -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
testcase_45 -- -
testcase_46 -- -
testcase_47 -- -
testcase_48 -- -
testcase_49 -- -
testcase_50 -- -
testcase_51 -- -
testcase_52 -- -
testcase_53 -- -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <chrono>
#include <random>
using namespace std;
int cos_t[] = {1,0,-1,0};
int sin_t[] = {0,1,0,-1};

int main(){

  int m;
  cin >> m;
  vector<int> px(m), py(m);
  for(int i=0; i<m; i++){
    cin >> px[i] >> py[i];
  }

  mt19937 mt(chrono::duration_cast<chrono::nanoseconds>(chrono::steady_clock::now().time_since_epoch()).count());
  uniform_int_distribution<int> dstr(0,3);

  cout << "? 0 0" << endl;
  int dx, dy;
  cin >> dx >> dy;
  int t = dstr(mt);

  cout << "!" << endl;

  for(int i=0; i<m; i++){
    int x = px[i]*cos_t[t] - py[i]*sin_t[t] + dx;
    int y = px[i]*sin_t[t] + py[i]*cos_t[t] + dy;
    cout << x << " " << y << endl;
  }

  string dammy;
  cin >> dammy;
  return 0;
}
0