結果

問題 No.471 直列回転機
ユーザー koyumeishikoyumeishi
提出日時 2016-12-20 10:41:05
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 703 bytes
コンパイル時間 799 ms
コンパイル使用メモリ 86,080 KB
実行使用メモリ 24,528 KB
平均クエリ数 19587.39
最終ジャッジ日時 2023-09-23 11:54:26
合計ジャッジ時間 21,905 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
23,856 KB
testcase_01 AC 27 ms
24,360 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 27 ms
23,544 KB
testcase_05 WA -
testcase_06 AC 27 ms
23,640 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 26 ms
24,276 KB
testcase_20 AC 478 ms
24,420 KB
testcase_21 AC 112 ms
24,420 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 243 ms
24,048 KB
testcase_25 AC 90 ms
23,568 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 AC 302 ms
24,300 KB
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 402 ms
23,424 KB
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 AC 320 ms
24,444 KB
testcase_43 WA -
testcase_44 WA -
testcase_45 WA -
testcase_46 WA -
testcase_47 WA -
testcase_48 WA -
testcase_49 WA -
testcase_50 WA -
testcase_51 WA -
testcase_52 AC 30 ms
23,856 KB
testcase_53 WA -
testcase_54 WA -
testcase_55 WA -
testcase_56 WA -
testcase_57 WA -
testcase_58 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <chrono>
#include <random>
using namespace std;
mt19937 mt(chrono::duration_cast<chrono::nanoseconds>(chrono::steady_clock::now().time_since_epoch()).count());
int cos_t[] = {1,0,-1,0};
int sin_t[] = {0,1,0,-1};
uniform_int_distribution<int> dstr(0,3);

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

  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;
  }
  return 0;
}
0