結果
問題 |
No.1133 キムワイプイーター
|
ユーザー |
👑 |
提出日時 | 2020-07-30 02:38:25 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 811 ms / 2,000 ms |
コード長 | 163 bytes |
コンパイル時間 | 63 ms |
コンパイル使用メモリ | 7,680 KB |
実行使用メモリ | 93,824 KB |
最終ジャッジ日時 | 2024-07-01 04:26:14 |
合計ジャッジ時間 | 11,951 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 31 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - m Syntax OK
ソースコード
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' '}