Submission #5436783
Source Code Expand
#h,w=map(int,input().split()) n=int(input()) ans=[0]*(n+1) a=[0]+[int(i) for i in input().split()] an=0 for i in range(1,n+1): r=a[i] ans[i]=r if ans[r]==i: an+=1 print(an)
Submission Info
Submission Time | |
---|---|
Task | B - Friendly Rabbits |
User | keroru |
Language | PyPy3 (2.4.0) |
Score | 200 |
Code Size | 208 Byte |
Status | AC |
Exec Time | 212 ms |
Memory | 53680 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 | 168 ms | 38256 KB |
0_01.txt | AC | 162 ms | 38256 KB |
0_02.txt | AC | 166 ms | 38256 KB |
1_00.txt | AC | 163 ms | 38256 KB |
1_01.txt | AC | 204 ms | 53676 KB |
1_02.txt | AC | 212 ms | 53676 KB |
1_03.txt | AC | 206 ms | 53676 KB |
1_04.txt | AC | 209 ms | 53676 KB |
1_05.txt | AC | 207 ms | 53680 KB |
1_06.txt | AC | 205 ms | 53680 KB |
1_07.txt | AC | 205 ms | 53676 KB |
1_08.txt | AC | 182 ms | 43888 KB |
1_09.txt | AC | 198 ms | 51952 KB |
1_10.txt | AC | 199 ms | 49520 KB |
1_11.txt | AC | 176 ms | 40432 KB |