結果

問題 No.471 直列回転機
ユーザー nebukuro09nebukuro09
提出日時 2016-12-25 16:26:21
言語 D
(dmd 2.107.1)
結果
AC  
実行時間 376 ms / 3,141 ms
コード長 737 bytes
コンパイル時間 683 ms
コンパイル使用メモリ 106,332 KB
実行使用メモリ 25,720 KB
平均クエリ数 19588.39
最終ジャッジ日時 2023-09-03 00:09:22
合計ジャッジ時間 14,192 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
24,168 KB
testcase_01 AC 26 ms
23,664 KB
testcase_02 AC 27 ms
24,156 KB
testcase_03 AC 26 ms
23,400 KB
testcase_04 AC 27 ms
23,424 KB
testcase_05 AC 27 ms
24,012 KB
testcase_06 AC 26 ms
23,424 KB
testcase_07 AC 26 ms
24,120 KB
testcase_08 AC 53 ms
23,424 KB
testcase_09 AC 58 ms
24,144 KB
testcase_10 AC 40 ms
23,424 KB
testcase_11 AC 157 ms
24,120 KB
testcase_12 AC 309 ms
23,460 KB
testcase_13 AC 312 ms
23,184 KB
testcase_14 AC 336 ms
23,868 KB
testcase_15 AC 376 ms
24,556 KB
testcase_16 AC 27 ms
24,120 KB
testcase_17 AC 26 ms
23,808 KB
testcase_18 AC 25 ms
23,304 KB
testcase_19 AC 25 ms
23,832 KB
testcase_20 AC 339 ms
23,316 KB
testcase_21 AC 97 ms
23,652 KB
testcase_22 AC 314 ms
23,640 KB
testcase_23 AC 297 ms
23,628 KB
testcase_24 AC 187 ms
24,276 KB
testcase_25 AC 79 ms
23,808 KB
testcase_26 AC 346 ms
24,840 KB
testcase_27 AC 185 ms
23,544 KB
testcase_28 AC 212 ms
23,652 KB
testcase_29 AC 235 ms
24,264 KB
testcase_30 AC 107 ms
23,832 KB
testcase_31 AC 345 ms
24,312 KB
testcase_32 AC 294 ms
24,180 KB
testcase_33 AC 232 ms
24,036 KB
testcase_34 AC 336 ms
24,156 KB
testcase_35 AC 97 ms
23,652 KB
testcase_36 AC 151 ms
23,796 KB
testcase_37 AC 54 ms
23,316 KB
testcase_38 AC 88 ms
23,676 KB
testcase_39 AC 133 ms
24,156 KB
testcase_40 AC 256 ms
23,604 KB
testcase_41 AC 346 ms
25,720 KB
testcase_42 AC 223 ms
23,316 KB
testcase_43 AC 311 ms
24,032 KB
testcase_44 AC 59 ms
23,808 KB
testcase_45 AC 224 ms
23,628 KB
testcase_46 AC 254 ms
23,400 KB
testcase_47 AC 320 ms
24,456 KB
testcase_48 AC 283 ms
23,316 KB
testcase_49 AC 268 ms
23,844 KB
testcase_50 AC 309 ms
25,412 KB
testcase_51 AC 137 ms
23,532 KB
testcase_52 AC 28 ms
24,168 KB
testcase_53 AC 30 ms
24,168 KB
testcase_54 AC 29 ms
23,148 KB
testcase_55 AC 102 ms
24,168 KB
testcase_56 AC 87 ms
23,652 KB
testcase_57 AC 71 ms
23,436 KB
testcase_58 AC 41 ms
23,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop;


void main() {
    auto M = readln.chomp.to!int;
    auto P = M.iota.map!(_ => readln.split.map!(to!int).array).array;

    writeln("? 0 0");
    stdout.flush;
    auto dxdy = readln.split.map!(to!int).array;

    writeln("? 1 0");
    stdout.flush;
    auto C = readln.split.map!(to!int).array;

    auto cos = C[0] - dxdy[0];
    auto sin = C[1] - dxdy[1];

    writeln("!");
    foreach (p; P) {
        auto x = p[0] * cos - p[1] * sin + dxdy[0];
        auto y = p[0] * sin + p[1] * cos + dxdy[1];
        writeln(x, " ", y);
    }
    stdout.flush;
}
0