Please sign in first.
Submission #903840
Source Code Expand
n = input() a = map(int,raw_input().split()) print sum(i == a[a[i]-1]-1 for i in range(n)) / 2
Submission Info
| Submission Time | |
|---|---|
| Task | A - CODEFESTIVAL 2016 |
| User | yzyz |
| Language | Python (2.7.6) |
| Score | 0 |
| Code Size | 98 Byte |
| Status | RE |
| Exec Time | 16 ms |
| Memory | 2568 KiB |
Judge Result
| Set Name | Sample | All | ||||
|---|---|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 0 / 100 | ||||
| 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 |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 0_00.txt | RE | 16 ms | 2568 KiB |
| 0_01.txt | RE | 16 ms | 2568 KiB |
| 0_02.txt | RE | 16 ms | 2568 KiB |
| 1_00.txt | RE | 16 ms | 2568 KiB |
| 1_01.txt | RE | 16 ms | 2568 KiB |
| 1_02.txt | RE | 16 ms | 2568 KiB |