結果

問題 No.1133 キムワイプイーター
ユーザー 👑 hos.lyrichos.lyric
提出日時 2020-07-30 02:38:25
言語 Ruby
(3.3.0)
結果
AC  
実行時間 704 ms / 2,000 ms
コード長 163 bytes
コンパイル時間 517 ms
コンパイル使用メモリ 11,184 KB
実行使用メモリ 86,960 KB
最終ジャッジ日時 2023-09-13 19:53:53
合計ジャッジ時間 11,462 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,188 KB
testcase_01 AC 81 ms
15,256 KB
testcase_02 AC 252 ms
36,328 KB
testcase_03 AC 495 ms
60,720 KB
testcase_04 AC 517 ms
61,156 KB
testcase_05 AC 549 ms
74,024 KB
testcase_06 AC 529 ms
72,200 KB
testcase_07 AC 373 ms
52,808 KB
testcase_08 AC 233 ms
30,748 KB
testcase_09 AC 476 ms
59,544 KB
testcase_10 AC 704 ms
86,960 KB
testcase_11 AC 642 ms
85,436 KB
testcase_12 AC 542 ms
72,948 KB
testcase_13 AC 638 ms
85,416 KB
testcase_14 AC 499 ms
60,288 KB
testcase_15 AC 361 ms
50,628 KB
testcase_16 AC 245 ms
35,608 KB
testcase_17 AC 86 ms
15,616 KB
testcase_18 AC 95 ms
15,796 KB
testcase_19 AC 87 ms
15,408 KB
testcase_20 AC 92 ms
15,864 KB
testcase_21 AC 95 ms
15,824 KB
testcase_22 AC 97 ms
15,848 KB
testcase_23 AC 79 ms
15,164 KB
testcase_24 AC 81 ms
15,096 KB
testcase_25 AC 86 ms
15,432 KB
testcase_26 AC 79 ms
15,160 KB
testcase_27 AC 78 ms
15,196 KB
testcase_28 AC 79 ms
15,064 KB
testcase_29 AC 79 ms
15,136 KB
testcase_30 AC 95 ms
16,108 KB
testcase_31 AC 82 ms
15,124 KB
testcase_32 AC 78 ms
15,308 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - m
Syntax OK

ソースコード

diff #

n,m=gets.split.map &:to_i
f=(0..n).map{[1]*(n+1)}
f[x=n][y=0]=0
gets.chop.chars.map{|c|c<'L'? x+=1:c<'R'? y-=1:c<'U'? y+=1:x-=1;f[x][y]=0}
f.map{|g|puts g.join' '}
0