Submission #50396690
Source Code Expand
H,W,N = gets.split.map(&:to_i)
T = gets.chomp.bytes
G = $<.read.tr(".#\n",'10').to_i 2
D = [nil]*256
D[?L.ord] = -1
D[?R.ord] = 1
D[?U.ord] = -W-1
D[?D.ord] = W+1
g,d,t = G,0
while t = T.shift
d += D[t]
g &= G<<d
end
p g.to_s(2).count(?1)
Submission Info
| Submission Time | |
|---|---|
| Task | C - Takahashi Gets Lost |
| User | ds14050 |
| Language | Ruby (ruby 3.2.2) |
| Score | 250 |
| Code Size | 259 Byte |
| Status | AC |
| Exec Time | 66 ms |
| Memory | 49408 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 250 / 250 | ||||
| Status |
|
|
| Set Name | Test Cases |
|---|---|
| Sample | example0.txt, example1.txt |
| All | 000.txt, 001.txt, 002.txt, 003.txt, 004.txt, 005.txt, 006.txt, 007.txt, 008.txt, 009.txt, 010.txt, 011.txt, 012.txt, 013.txt, 014.txt, 015.txt, 016.txt, 017.txt, 018.txt, 019.txt, 020.txt, 021.txt, 022.txt, 023.txt, 024.txt, 025.txt, 026.txt, 027.txt, 028.txt, 029.txt, 030.txt, 031.txt, 032.txt, 033.txt, 034.txt, 035.txt, 036.txt, 037.txt, example0.txt, example1.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 000.txt | AC | 63 ms | 48308 KiB |
| 001.txt | AC | 64 ms | 48152 KiB |
| 002.txt | AC | 64 ms | 49408 KiB |
| 003.txt | AC | 64 ms | 48240 KiB |
| 004.txt | AC | 54 ms | 32828 KiB |
| 005.txt | AC | 64 ms | 48052 KiB |
| 006.txt | AC | 64 ms | 48404 KiB |
| 007.txt | AC | 51 ms | 24600 KiB |
| 008.txt | AC | 52 ms | 24012 KiB |
| 009.txt | AC | 48 ms | 18172 KiB |
| 010.txt | AC | 48 ms | 19616 KiB |
| 011.txt | AC | 50 ms | 20184 KiB |
| 012.txt | AC | 53 ms | 27068 KiB |
| 013.txt | AC | 50 ms | 18820 KiB |
| 014.txt | AC | 52 ms | 26092 KiB |
| 015.txt | AC | 63 ms | 48268 KiB |
| 016.txt | AC | 62 ms | 46292 KiB |
| 017.txt | AC | 51 ms | 21908 KiB |
| 018.txt | AC | 51 ms | 25736 KiB |
| 019.txt | AC | 61 ms | 43740 KiB |
| 020.txt | AC | 50 ms | 18948 KiB |
| 021.txt | AC | 50 ms | 19284 KiB |
| 022.txt | AC | 50 ms | 18396 KiB |
| 023.txt | AC | 49 ms | 18084 KiB |
| 024.txt | AC | 50 ms | 18240 KiB |
| 025.txt | AC | 49 ms | 19404 KiB |
| 026.txt | AC | 50 ms | 20356 KiB |
| 027.txt | AC | 50 ms | 18900 KiB |
| 028.txt | AC | 50 ms | 20400 KiB |
| 029.txt | AC | 64 ms | 48276 KiB |
| 030.txt | AC | 64 ms | 47960 KiB |
| 031.txt | AC | 64 ms | 48960 KiB |
| 032.txt | AC | 66 ms | 48052 KiB |
| 033.txt | AC | 63 ms | 48216 KiB |
| 034.txt | AC | 63 ms | 48336 KiB |
| 035.txt | AC | 64 ms | 48068 KiB |
| 036.txt | AC | 64 ms | 48344 KiB |
| 037.txt | AC | 63 ms | 48316 KiB |
| example0.txt | AC | 46 ms | 17232 KiB |
| example1.txt | AC | 47 ms | 17152 KiB |