結果

問題 No.675 ドットちゃんたち
ユーザー cielciel
提出日時 2018-04-18 20:26:04
言語 Ruby
(3.3.0)
結果
AC  
実行時間 1,898 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 11,160 KB
実行使用メモリ 64,088 KB
最終ジャッジ日時 2023-09-09 11:26:14
合計ジャッジ時間 15,811 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
15,584 KB
testcase_01 AC 91 ms
15,716 KB
testcase_02 AC 91 ms
15,704 KB
testcase_03 AC 90 ms
15,672 KB
testcase_04 AC 90 ms
15,864 KB
testcase_05 AC 1,802 ms
64,088 KB
testcase_06 AC 1,898 ms
50,500 KB
testcase_07 AC 1,743 ms
55,616 KB
testcase_08 AC 1,860 ms
50,564 KB
testcase_09 AC 1,882 ms
51,392 KB
testcase_10 AC 1,878 ms
50,484 KB
testcase_11 AC 1,887 ms
52,284 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

require 'matrix'
n,x,y=gets.split.map &:to_i
a=n.times.map{
	c=gets.split.map &:to_i
	c[0]==1?Matrix[[1,0,c[1]],[0,1,0],[0,0,1]]:
	c[0]==2?Matrix[[1,0,0],[0,1,c[1]],[0,0,1]]:
	Matrix[[0,1,0],[-1,0,0],[0,0,1]]
}
(n-2).downto(0){|i|a[i]=a[i+1]*a[i]}
n.times{|i|puts (a[i]*Vector[x,y,1])[0..1]*' '}
0