Submission #1123452
Source Code Expand
n,s=`dd`.split;n=n.to_i;%w(SS SW WS WW).find{|_|a=_.bytes;2.upto(n+1){|i|a[i]=a[i-2]^((a[i-1]==87)^(s[~-i%n]==?o)?0:4)};a[0,2]==a[n,2]&&$><<a[0..-3].map(&:chr)*''}||(p -1)
Submission Info
Submission Time | |
---|---|
Task | D - Menagerie |
User | leafmoon |
Language | Ruby (2.3.3) |
Score | 500 |
Code Size | 171 Byte |
Status | AC |
Exec Time | 214 ms |
Memory | 8032 KB |
Compile Error
./Main.rb:1: warning: ambiguous first argument; put parentheses or a space even after `-' operator
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 500 / 500 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt |
All | 00_example_01.txt, 00_example_02.txt, 00_example_03.txt, 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | AC | 10 ms | 2040 KB |
00_example_02.txt | AC | 8 ms | 2044 KB |
00_example_03.txt | AC | 8 ms | 3964 KB |
01.txt | AC | 106 ms | 5788 KB |
02.txt | AC | 45 ms | 4816 KB |
03.txt | AC | 13 ms | 2044 KB |
04.txt | AC | 8 ms | 2044 KB |
05.txt | AC | 157 ms | 7548 KB |
06.txt | AC | 78 ms | 7428 KB |
07.txt | AC | 34 ms | 2692 KB |
08.txt | AC | 28 ms | 2820 KB |
09.txt | AC | 11 ms | 2044 KB |
10.txt | AC | 40 ms | 2696 KB |
11.txt | AC | 214 ms | 8016 KB |
12.txt | AC | 214 ms | 8020 KB |
13.txt | AC | 162 ms | 8032 KB |