Submission #3449625
Source Code Expand
n = int(input()) a = [int(input())-1 for x in range(n)] ans = 1 ok = False i = a.index(1) for x in range(n): if i == 0: ok = True break i = a.index(i) ans += 1 print([-1, ans][ok])
Submission Info
Submission Time | |
---|---|
Task | B - Trained? |
User | oyassan |
Language | Python (3.4.3) |
Score | 0 |
Code Size | 221 Byte |
Status | RE |
Exec Time | 2104 ms |
Memory | 7084 KB |
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | s1.txt, s2.txt, s3.txt |
All | 01.txt, 02.txt, 03.txt, 04.txt, 05.txt, 06.txt, 07.txt, 08.txt, 09.txt, 10.txt, 11.txt, 12.txt, 13.txt, 14.txt, 15.txt, 16.txt, 17.txt, 18.txt, 19.txt, 20.txt, 21.txt, 22.txt, s1.txt, s2.txt, s3.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
01.txt | RE | 171 ms | 7084 KB |
02.txt | RE | 175 ms | 7084 KB |
03.txt | RE | 166 ms | 7084 KB |
04.txt | TLE | 2104 ms | 7084 KB |
05.txt | TLE | 2104 ms | 7060 KB |
06.txt | TLE | 2104 ms | 7064 KB |
07.txt | TLE | 2104 ms | 7064 KB |
08.txt | TLE | 2104 ms | 7064 KB |
09.txt | TLE | 2104 ms | 7064 KB |
10.txt | TLE | 2104 ms | 7084 KB |
11.txt | RE | 179 ms | 7064 KB |
12.txt | RE | 175 ms | 7064 KB |
13.txt | RE | 170 ms | 7064 KB |
14.txt | RE | 237 ms | 7084 KB |
15.txt | AC | 203 ms | 7056 KB |
16.txt | TLE | 2104 ms | 7056 KB |
17.txt | AC | 163 ms | 7056 KB |
18.txt | TLE | 2104 ms | 7056 KB |
19.txt | AC | 17 ms | 2940 KB |
20.txt | RE | 17 ms | 3060 KB |
21.txt | AC | 16 ms | 3064 KB |
22.txt | AC | 17 ms | 2940 KB |
s1.txt | AC | 17 ms | 3060 KB |
s2.txt | AC | 17 ms | 3060 KB |
s3.txt | AC | 17 ms | 3064 KB |