結果
| 問題 |
No.471 直列回転機
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-12-21 13:24:40 |
| 言語 | Python2 (2.7.18) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 715 bytes |
| コンパイル時間 | 246 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 30,200 KB |
| 平均クエリ数 | 9097.08 |
| 最終ジャッジ日時 | 2024-07-16 11:45:08 |
| 合計ジャッジ時間 | 30,410 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 26 RE * 32 |
ソースコード
#!/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
nya('!')
for p in points:
x = p00.x + p.x * (-1 if xminus else 1)
y = p00.y + p.y * (-1 if yminus else 1)
nya('{} {}'.format(x, y))