結果

問題 No.471 直列回転機
ユーザー rpy3cpprpy3cpp
提出日時 2017-01-12 01:52:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 390 ms / 3,141 ms
コード長 652 bytes
コンパイル時間 488 ms
コンパイル使用メモリ 10,832 KB
実行使用メモリ 30,744 KB
平均クエリ数 19588.39
最終ジャッジ日時 2023-09-02 03:54:35
合計ジャッジ時間 15,103 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
23,668 KB
testcase_01 AC 38 ms
23,520 KB
testcase_02 AC 38 ms
24,216 KB
testcase_03 AC 36 ms
23,532 KB
testcase_04 AC 34 ms
23,420 KB
testcase_05 AC 39 ms
23,948 KB
testcase_06 AC 37 ms
23,832 KB
testcase_07 AC 37 ms
24,336 KB
testcase_08 AC 77 ms
25,064 KB
testcase_09 AC 83 ms
24,616 KB
testcase_10 AC 57 ms
24,396 KB
testcase_11 AC 186 ms
26,852 KB
testcase_12 AC 332 ms
29,368 KB
testcase_13 AC 339 ms
29,220 KB
testcase_14 AC 353 ms
30,252 KB
testcase_15 AC 390 ms
30,248 KB
testcase_16 AC 40 ms
24,196 KB
testcase_17 AC 37 ms
23,448 KB
testcase_18 AC 37 ms
23,832 KB
testcase_19 AC 36 ms
23,544 KB
testcase_20 AC 363 ms
30,252 KB
testcase_21 AC 120 ms
25,232 KB
testcase_22 AC 328 ms
29,200 KB
testcase_23 AC 293 ms
29,312 KB
testcase_24 AC 209 ms
26,952 KB
testcase_25 AC 95 ms
24,720 KB
testcase_26 AC 362 ms
30,744 KB
testcase_27 AC 190 ms
27,128 KB
testcase_28 AC 218 ms
27,560 KB
testcase_29 AC 253 ms
27,628 KB
testcase_30 AC 139 ms
25,656 KB
testcase_31 AC 362 ms
30,452 KB
testcase_32 AC 316 ms
29,548 KB
testcase_33 AC 239 ms
28,284 KB
testcase_34 AC 352 ms
30,484 KB
testcase_35 AC 117 ms
24,960 KB
testcase_36 AC 183 ms
26,828 KB
testcase_37 AC 74 ms
24,984 KB
testcase_38 AC 103 ms
24,724 KB
testcase_39 AC 160 ms
25,484 KB
testcase_40 AC 283 ms
28,420 KB
testcase_41 AC 380 ms
30,156 KB
testcase_42 AC 258 ms
28,020 KB
testcase_43 AC 336 ms
30,328 KB
testcase_44 AC 75 ms
24,800 KB
testcase_45 AC 240 ms
27,912 KB
testcase_46 AC 277 ms
28,828 KB
testcase_47 AC 343 ms
30,060 KB
testcase_48 AC 302 ms
28,828 KB
testcase_49 AC 281 ms
29,096 KB
testcase_50 AC 336 ms
30,120 KB
testcase_51 AC 167 ms
26,436 KB
testcase_52 AC 39 ms
24,204 KB
testcase_53 AC 38 ms
24,048 KB
testcase_54 AC 39 ms
24,152 KB
testcase_55 AC 126 ms
25,332 KB
testcase_56 AC 115 ms
24,788 KB
testcase_57 AC 88 ms
24,308 KB
testcase_58 AC 56 ms
24,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

M = int(input())
xys = []
for m in range(M):
    x, y = map(int, input().split())
    xys.append((x, y))

print("? 0 0")
x0, y0 = map(int, input().split())
print("? 1 0")
x1, y1 = map(int, input().split())
xx = x1 - x0
yy = y1 - y0
if xx == 1 and yy == 0:
    d = 0
elif xx == 0 and yy == 1:
    d = 90
elif xx == -1 and yy == 0:
    d = 180
elif xx == 0 and yy == -1:
    d = 270
else:
    raise RuntimeError('unexpected result!')

print("!")
for x, y in xys:
    if d == 0:
        print(x0 + x, y0 + y)
    elif d == 90:
        print(x0 - y, y0 + x)
    elif d == 180:
        print(x0 - x, y0 - y)
    elif d == 270:
        print(x0 + y, y0 - x)
0