結果

問題 No.675 ドットちゃんたち
ユーザー cielciel
提出日時 2018-09-11 00:54:27
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 1,733 ms / 2,000 ms
コード長 324 bytes
コンパイル時間 134 ms
コンパイル使用メモリ 10,828 KB
実行使用メモリ 88,444 KB
最終ジャッジ日時 2023-09-02 08:10:15
合計ジャッジ時間 16,262 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
29,460 KB
testcase_01 AC 130 ms
29,552 KB
testcase_02 AC 132 ms
29,328 KB
testcase_03 AC 130 ms
29,536 KB
testcase_04 AC 132 ms
29,548 KB
testcase_05 AC 1,644 ms
83,636 KB
testcase_06 AC 1,733 ms
88,444 KB
testcase_07 AC 1,562 ms
81,248 KB
testcase_08 AC 1,710 ms
83,596 KB
testcase_09 AC 1,702 ms
87,560 KB
testcase_10 AC 1,728 ms
87,796 KB
testcase_11 AC 1,730 ms
86,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from numpy import*
n,x,y=map(int,input().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 input().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