Submission #891401
Source Code Expand
N = input() ans = 0 ls = map(int,raw_input().split(" ")) for i in range(N): v = ls[i]-1 if i < v and ls[v] == i+1: ans += 1 print ans
Submission Info
Submission Time | |
---|---|
Task | B - Friendly Rabbits |
User | niyarin |
Language | Python (2.7.6) |
Score | 200 |
Code Size | 160 Byte |
Status | AC |
Exec Time | 88 ms |
Memory | 11328 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 | 16 ms | 2568 KB |
0_01.txt | AC | 16 ms | 2568 KB |
0_02.txt | AC | 16 ms | 2568 KB |
1_00.txt | AC | 16 ms | 2568 KB |
1_01.txt | AC | 88 ms | 11328 KB |
1_02.txt | AC | 85 ms | 11328 KB |
1_03.txt | AC | 87 ms | 11328 KB |
1_04.txt | AC | 87 ms | 11328 KB |
1_05.txt | AC | 83 ms | 11328 KB |
1_06.txt | AC | 85 ms | 11328 KB |
1_07.txt | AC | 85 ms | 11328 KB |
1_08.txt | AC | 40 ms | 5804 KB |
1_09.txt | AC | 73 ms | 9768 KB |
1_10.txt | AC | 62 ms | 8560 KB |
1_11.txt | AC | 26 ms | 3972 KB |