結果
問題 | No.471 直列回転機 |
ユーザー |
|
提出日時 | 2016-12-21 00:25:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 417 ms / 3,141 ms |
コード長 | 621 bytes |
コンパイル時間 | 480 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 31,312 KB |
平均クエリ数 | 19589.39 |
最終ジャッジ日時 | 2024-06-11 10:18:48 |
合計ジャッジ時間 | 15,488 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 58 |
ソースコード
#!/usr/bin/env python3 import sys m = int(input()) x = [ None ] * m y = [ None ] * m for i in range(m): x[i], y[i] = map(int, input().split()) def ask(x, y): print('?', x, y) sys.stdout.flush() fx, fy = map(int, input().split()) return fx, fy # [ x' ] [ a b e ] [ x ] # [ y' ] = [ c d f ] [ y ] # [ 1 ] [ 1 ] [ 1 ] ae, cf = ask(1, 0) aae, ccf = ask(2, 0) a = aae - ae e = ae - a c = ccf - cf f = cf - c be, df = ask(0, 1) b = be - e d = df - f def rotate(x, y): fx = a*x + b*y + e fy = c*x + d*y + f return fx, fy print('!') for i in range(m): print(*rotate(x[i], y[i]))