結果

問題 No.471 直列回転機
コンテスト
ユーザー rpy3cpp
提出日時 2017-01-12 01:49:09
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 650 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 775 ms
コンパイル使用メモリ 20,956 KB
実行使用メモリ 39,956 KB
平均クエリ数 1.00
最終ジャッジ日時 2026-03-31 00:14:43
合計ジャッジ時間 28,862 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample RE * 1
other RE * 58
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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