結果

問題 No.675 ドットちゃんたち
ユーザー cielciel
提出日時 2018-09-11 01:06:43
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,586 ms / 2,000 ms
コード長 361 bytes
コンパイル時間 386 ms
コンパイル使用メモリ 10,924 KB
実行使用メモリ 87,784 KB
最終ジャッジ日時 2023-09-02 08:36:57
合計ジャッジ時間 13,296 ms
ジャッジサーバーID
(参考情報)
judge12 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
29,600 KB
testcase_01 AC 139 ms
29,492 KB
testcase_02 AC 140 ms
29,496 KB
testcase_03 AC 136 ms
29,592 KB
testcase_04 AC 143 ms
29,568 KB
testcase_05 AC 1,530 ms
83,596 KB
testcase_06 AC 1,544 ms
87,668 KB
testcase_07 AC 1,416 ms
81,512 KB
testcase_08 AC 1,522 ms
83,736 KB
testcase_09 AC 1,530 ms
87,532 KB
testcase_10 AC 1,586 ms
87,784 KB
testcase_11 AC 1,555 ms
86,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
from numpy import*
n,x,y=map(int,sys.stdin.readline().split())
a=[[[1,0,c[1]],[0,1,0],[0,0,1]]if c[0]<2 else [[1,0,0],[0,1,c[1]],[0,0,1]]if c[0]<3 else[[0,1,0],[-1,0,0],[0,0,1]]for c in[[int(e)for e in sys.stdin.readline().split()]for _ in[0]*n]]
for i in range(n-2,-1,-1):a[i]=dot(a[i+1],a[i])
for e in a:print(' '.join(map(str,dot(e,[x,y,1])[:2])))
0