Submission #7094230
Source Code Expand
N = int(input()) L = list(map(lambda x: int(x) - 1, input().split())) count = 0 for i in range(N): if i == L[L[i]]: count += 1 print(int(count / 2))
Submission Info
Submission Time | |
---|---|
Task | B - Friendly Rabbits |
User | Cyberdog90 |
Language | Python (3.4.3) |
Score | 200 |
Code Size | 168 Byte |
Status | AC |
Exec Time | 77 ms |
Memory | 13880 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 | 17 ms | 2940 KB |
0_01.txt | AC | 18 ms | 2940 KB |
0_02.txt | AC | 17 ms | 2940 KB |
1_00.txt | AC | 18 ms | 2940 KB |
1_01.txt | AC | 77 ms | 13812 KB |
1_02.txt | AC | 74 ms | 13880 KB |
1_03.txt | AC | 72 ms | 13880 KB |
1_04.txt | AC | 73 ms | 13880 KB |
1_05.txt | AC | 74 ms | 13880 KB |
1_06.txt | AC | 74 ms | 13812 KB |
1_07.txt | AC | 70 ms | 13880 KB |
1_08.txt | AC | 37 ms | 7148 KB |
1_09.txt | AC | 61 ms | 12008 KB |
1_10.txt | AC | 52 ms | 10564 KB |
1_11.txt | AC | 26 ms | 4724 KB |