Submission #890797
Source Code Expand
n=gets.to_i as=gets.chomp.split.map(&:to_i) a=0 n.times{|i| if as[as[i]] == i + 1 a += 1 end } p a
Submission Info
Submission Time | |
---|---|
Task | B - Friendly Rabbits |
User | cympfh |
Language | Ruby (2.3.3) |
Score | 0 |
Code Size | 124 Byte |
Status | WA |
Exec Time | 60 ms |
Memory | 8708 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 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 | WA | 10 ms | 1788 KB |
0_01.txt | WA | 10 ms | 1788 KB |
0_02.txt | AC | 10 ms | 1788 KB |
1_00.txt | WA | 11 ms | 1788 KB |
1_01.txt | WA | 60 ms | 8708 KB |
1_02.txt | AC | 59 ms | 8708 KB |
1_03.txt | WA | 59 ms | 8708 KB |
1_04.txt | WA | 59 ms | 8708 KB |
1_05.txt | WA | 59 ms | 8708 KB |
1_06.txt | WA | 59 ms | 8708 KB |
1_07.txt | AC | 59 ms | 8708 KB |
1_08.txt | WA | 28 ms | 4220 KB |
1_09.txt | AC | 50 ms | 7428 KB |
1_10.txt | WA | 45 ms | 6660 KB |
1_11.txt | AC | 19 ms | 2812 KB |