結果

問題 No.675 ドットちゃんたち
ユーザー cielciel
提出日時 2018-09-11 01:05:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,710 ms / 2,000 ms
コード長 355 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 10,824 KB
実行使用メモリ 88,636 KB
最終ジャッジ日時 2023-09-02 08:34:48
合計ジャッジ時間 14,510 ms
ジャッジサーバーID
(参考情報)
judge14 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 133 ms
29,508 KB
testcase_01 AC 132 ms
29,500 KB
testcase_02 AC 134 ms
29,552 KB
testcase_03 AC 135 ms
29,504 KB
testcase_04 AC 133 ms
29,600 KB
testcase_05 AC 1,602 ms
83,612 KB
testcase_06 AC 1,703 ms
88,636 KB
testcase_07 AC 1,540 ms
81,452 KB
testcase_08 AC 1,645 ms
83,556 KB
testcase_09 AC 1,681 ms
87,588 KB
testcase_10 AC 1,694 ms
88,584 KB
testcase_11 AC 1,710 ms
86,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
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])
sys.stdout.writelines(' '.join(map(str,dot(e,[x,y,1])[:2]))+'\n'for e in a)
0