Submission #3246077
Source Code Expand
R=[] n,*a=`dd`.split.split.map &:to_i n.times{R<<1;(1..n).map{|i| a[i-1]>a[i]&&(R<<n-1;a[i-1],a[i]=a[i],a[i-1]) R<<1 }} p R.size,*R
Submission Info
Submission Time | |
---|---|
Task | B - Many Swaps Sorting |
User | leafmoon |
Language | Ruby (2.3.3) |
Score | 0 |
Code Size | 137 Byte |
Status | RE |
Exec Time | 18 ms |
Memory | 4092 KB |
Compile Error
./Main.rb:2: warning: `&' interpreted as argument prefix
Judge Result
Set Name | Sample | Subtask1 | Subtask2 | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 300 | 0 / 400 | 0 / 200 | ||||||||
Status |
|
|
|
|
Set Name | Test Cases |
---|---|
Sample | 00_example_01.txt, 00_example_02.txt |
Subtask1 | 00_example_01.txt, s1_01.txt, s1_02.txt, s1_03.txt, s1_04.txt, s1_05.txt, s1_06.txt |
Subtask2 | 00_example_01.txt, 00_example_02.txt, s1_01.txt, s1_02.txt, s1_03.txt, s1_04.txt, s1_05.txt, s1_06.txt, s2_07.txt, s2_08.txt, s2_09.txt, s2_10.txt, s2_11.txt |
All | 00_example_01.txt, 00_example_02.txt, s1_01.txt, s1_02.txt, s1_03.txt, s1_04.txt, s1_05.txt, s1_06.txt, s2_07.txt, s2_08.txt, s2_09.txt, s2_10.txt, s2_11.txt, s3_12.txt, s3_13.txt, s3_14.txt, s3_15.txt, s3_16.txt, s3_17.txt, s3_18.txt, s3_19.txt, s3_20.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
00_example_01.txt | RE | 18 ms | 2292 KB |
00_example_02.txt | RE | 7 ms | 2044 KB |
s1_01.txt | RE | 7 ms | 2044 KB |
s1_02.txt | RE | 7 ms | 2044 KB |
s1_03.txt | RE | 7 ms | 2044 KB |
s1_04.txt | RE | 7 ms | 2044 KB |
s1_05.txt | RE | 7 ms | 2044 KB |
s1_06.txt | RE | 7 ms | 2044 KB |
s2_07.txt | RE | 8 ms | 2044 KB |
s2_08.txt | RE | 8 ms | 2044 KB |
s2_09.txt | RE | 7 ms | 2044 KB |
s2_10.txt | RE | 8 ms | 2044 KB |
s2_11.txt | RE | 8 ms | 2044 KB |
s3_12.txt | RE | 8 ms | 2044 KB |
s3_13.txt | RE | 8 ms | 2044 KB |
s3_14.txt | RE | 8 ms | 4092 KB |
s3_15.txt | RE | 8 ms | 2044 KB |
s3_16.txt | RE | 8 ms | 2044 KB |
s3_17.txt | RE | 8 ms | 2044 KB |
s3_18.txt | RE | 8 ms | 2044 KB |
s3_19.txt | RE | 8 ms | 2044 KB |
s3_20.txt | RE | 8 ms | 2044 KB |