結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
29,484 KB
testcase_01 AC 138 ms
29,640 KB
testcase_02 AC 140 ms
29,480 KB
testcase_03 AC 140 ms
29,556 KB
testcase_04 AC 141 ms
29,540 KB
testcase_05 AC 1,503 ms
83,720 KB
testcase_06 AC 1,563 ms
87,644 KB
testcase_07 AC 1,418 ms
82,608 KB
testcase_08 AC 1,574 ms
83,680 KB
testcase_09 AC 1,535 ms
86,544 KB
testcase_10 AC 1,574 ms
88,596 KB
testcase_11 AC 1,533 ms
85,900 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])
sys.stdout.writelines(' '.join(map(str,dot(e,[x,y,1])[:2]))+'\n' for e in a)
0