Submission #891792


Source Code Expand

N = int(input())
A = map(int, input().split())

pairs = []

for i in range(len(A)):
    if A[A[i] - 1] == i + 1:
        pairs.append(1)

print(len(pairs) // 2)

Submission Info

Submission Time
Task B - Friendly Rabbits
User choushishi
Language Python (3.4.3)
Score 0
Code Size 169 Byte
Status RE
Exec Time 37 ms
Memory 10548 KB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 200
Status
RE × 3
RE × 15
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 RE 23 ms 3064 KB
0_01.txt RE 22 ms 3064 KB
0_02.txt RE 22 ms 3064 KB
1_00.txt RE 22 ms 3064 KB
1_01.txt RE 37 ms 10548 KB
1_02.txt RE 37 ms 10548 KB
1_03.txt RE 37 ms 10548 KB
1_04.txt RE 36 ms 9976 KB
1_05.txt RE 36 ms 9976 KB
1_06.txt RE 36 ms 9976 KB
1_07.txt RE 36 ms 9976 KB
1_08.txt RE 27 ms 5704 KB
1_09.txt RE 34 ms 8640 KB
1_10.txt RE 32 ms 7768 KB
1_11.txt RE 25 ms 4212 KB