結果

問題 No.471 直列回転機
コンテスト
ユーザー obakyan
提出日時 2019-05-05 17:47:00
言語 C++11
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 159 ms / 3,141 ms
コード長 635 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 463 ms
コンパイル使用メモリ 92,500 KB
実行使用メモリ 29,000 KB
平均クエリ数 19588.39
最終ジャッジ日時 2026-03-04 12:17:35
合計ジャッジ時間 7,147 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 58
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <cstdio>
#include <cstdlib>
#include <cstddef>
#include <vector>
#include <algorithm>
#include <cmath>
#include <string>
#include <iostream>
#include <iomanip>
#include <numeric>

static int x[50000];
static int y[50000];

int main(void)
{
  int m;
  scanf("%d", &m);
  for(int i = 0; i < m; i++){
    scanf("%d %d", &x[i], &y[i]);
  }
  int a, b, c, s;
  printf("? 0 0\n"); fflush(stdout);
  scanf("%d %d", &a, &b);
  printf("? 1 0\n"); fflush(stdout);
  scanf("%d %d", &c, &s);
  c -= a;
  s -= b;
  printf("!\n");
  for(int i = 0; i < m; i++){
    printf("%d %d\n", c * x[i] - s * y[i] + a, s * x[i] + c * y[i] + b);
  }
}
0