結果
問題 | No.565 回転拡大 |
ユーザー | tubo28 |
提出日時 | 2017-09-08 23:05:49 |
言語 | Ruby (3.3.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 740 bytes |
コンパイル時間 | 47 ms |
コンパイル使用メモリ | 11,376 KB |
実行使用メモリ | 15,416 KB |
最終ジャッジ日時 | 2023-08-07 03:17:19 |
合計ジャッジ時間 | 4,138 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 90 ms
15,116 KB |
testcase_01 | RE | - |
testcase_02 | RE | - |
testcase_03 | RE | - |
testcase_04 | RE | - |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | AC | 82 ms
15,292 KB |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | AC | 81 ms
15,040 KB |
testcase_11 | AC | 81 ms
15,228 KB |
testcase_12 | RE | - |
testcase_13 | AC | 80 ms
15,156 KB |
testcase_14 | AC | 82 ms
15,096 KB |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | RE | - |
testcase_18 | AC | 81 ms
15,168 KB |
testcase_19 | AC | 86 ms
15,240 KB |
testcase_20 | AC | 80 ms
15,296 KB |
testcase_21 | RE | - |
testcase_22 | AC | 82 ms
15,224 KB |
testcase_23 | RE | - |
testcase_24 | RE | - |
testcase_25 | RE | - |
testcase_26 | RE | - |
testcase_27 | AC | 80 ms
15,040 KB |
testcase_28 | AC | 83 ms
15,232 KB |
testcase_29 | RE | - |
testcase_30 | AC | 81 ms
15,048 KB |
testcase_31 | RE | - |
testcase_32 | RE | - |
コンパイルメッセージ
Syntax OK
ソースコード
$i = $<.read.split while !$i.empty? do r, k, h, w = $i.shift(4).map(&:to_i) raise if r != 90 g = $i.shift(h).map { |l| l.split("") } n = [h, w].max if h < w while g.size < n g << ["*"] * n end h = n else while g[0].size < n h.times do |i| g[i] << "*" end end w = n end (r / 90).times do g = g.transpose n.times do |i| g[i].reverse! end end ans = Array.new(n*k) { Array.new(w*k, '.') } n.times do |i| n.times do |j| k.times do |ii| k.times do |jj| ans[i*k + ii][j*k + jj] = g[i][j] end end end end ans.each do |row| row.delete("*") if row.size > 0 puts row.join end end end