Submission #890742
Source Code Expand
#!/usr/bin/ruby n,*a=`dd`.split.map(&:to_i) p n.times.count{|i| j=a[i]-1 i==a[j]-1 }/2
Submission Info
Submission Time | |
---|---|
Task | B - Friendly Rabbits |
User | leafmoon |
Language | Ruby (2.3.3) |
Score | 200 |
Code Size | 93 Byte |
Status | AC |
Exec Time | 358 ms |
Memory | 8968 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 200 | ||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_00.txt, 0_01.txt, 0_02.txt |
All | 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 1_04.txt, 1_05.txt, 1_06.txt, 1_07.txt, 1_08.txt, 1_09.txt, 1_10.txt, 1_11.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_00.txt | AC | 358 ms | 3444 KB |
0_01.txt | AC | 12 ms | 2044 KB |
0_02.txt | AC | 12 ms | 2040 KB |
1_00.txt | AC | 12 ms | 2044 KB |
1_01.txt | AC | 69 ms | 8968 KB |
1_02.txt | AC | 69 ms | 8964 KB |
1_03.txt | AC | 69 ms | 8964 KB |
1_04.txt | AC | 69 ms | 8960 KB |
1_05.txt | AC | 69 ms | 8960 KB |
1_06.txt | AC | 68 ms | 8956 KB |
1_07.txt | AC | 69 ms | 8960 KB |
1_08.txt | AC | 33 ms | 4356 KB |
1_09.txt | AC | 58 ms | 7684 KB |
1_10.txt | AC | 52 ms | 6908 KB |
1_11.txt | AC | 22 ms | 2944 KB |