結果

問題 No.471 直列回転機
ユーザー yuppe19 😺
提出日時 2016-12-21 13:42:07
言語 Python2
(2.7.18)
結果
RE  
実行時間 -
コード長 766 bytes
コンパイル時間 141 ms
コンパイル使用メモリ 6,912 KB
実行使用メモリ 30,584 KB
平均クエリ数 9097.08
最終ジャッジ日時 2024-07-16 11:48:06
合計ジャッジ時間 20,734 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 12 WA * 14 RE * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python2
# -*- coding: utf-8 -*-
# †
import sys
from collections import namedtuple
P = namedtuple('P', 'x, y')

def nya(mes):
    print mes
    sys.stdout.flush()


M = int(raw_input())
points = [P(*map(int, raw_input().split())) for _ in xrange(M)]

nya('? 0 0')
p00 = P(*map(int, raw_input().split()))
nya('? 1 0')
p10 = P(*map(int, raw_input().split()))
nya('? 1 1')
p11 = P(*map(int, raw_input().split()))

assert p00.y == p10.y and abs(p00.x - p10.x) == 1
assert p10.x == p11.x and abs(p10.y - p11.y) == 1

#xminus = p00.x > p10.x
#yminus = p10.y > p11.y
xminus = True
yminus = True

print '!'
for p in points:
    x = p00.x + p.x * (-1 if xminus else 1)
    y = p00.y + p.y * (-1 if yminus else 1)
    print '{} {}'.format(x, y)
sys.stdout.flush()
0