Task: | Illuminati |
Sender: | esya_rae |
Submission time: | 2024-10-28 16:57:29 +0200 |
Language: | Python3 (PyPy3) |
Status: | READY |
Result: | RUNTIME ERROR |
test | verdict | time | |
---|---|---|---|
#1 | ACCEPTED | 0.04 s | details |
#2 | RUNTIME ERROR | 0.06 s | details |
#3 | RUNTIME ERROR | 0.06 s | details |
#4 | RUNTIME ERROR | 0.06 s | details |
#5 | RUNTIME ERROR | 0.06 s | details |
#6 | RUNTIME ERROR | 0.07 s | details |
#7 | RUNTIME ERROR | 0.06 s | details |
#8 | RUNTIME ERROR | 0.06 s | details |
#9 | RUNTIME ERROR | 0.06 s | details |
#10 | RUNTIME ERROR | 0.07 s | details |
#11 | RUNTIME ERROR | 0.06 s | details |
#12 | RUNTIME ERROR | 0.06 s | details |
#13 | RUNTIME ERROR | 0.07 s | details |
#14 | RUNTIME ERROR | 0.06 s | details |
#15 | RUNTIME ERROR | 0.07 s | details |
#16 | RUNTIME ERROR | 0.07 s | details |
#17 | RUNTIME ERROR | 0.06 s | details |
#18 | RUNTIME ERROR | 0.06 s | details |
#19 | RUNTIME ERROR | 0.06 s | details |
#20 | RUNTIME ERROR | 0.06 s | details |
#21 | RUNTIME ERROR | 0.06 s | details |
#22 | RUNTIME ERROR | 0.07 s | details |
#23 | RUNTIME ERROR | 0.06 s | details |
#24 | RUNTIME ERROR | 0.06 s | details |
#25 | RUNTIME ERROR | 0.06 s | details |
#26 | RUNTIME ERROR | 0.06 s | details |
#27 | RUNTIME ERROR | 0.06 s | details |
#28 | RUNTIME ERROR | 0.06 s | details |
#29 | RUNTIME ERROR | 0.06 s | details |
#30 | RUNTIME ERROR | 0.06 s | details |
#31 | RUNTIME ERROR | 0.06 s | details |
#32 | RUNTIME ERROR | 0.06 s | details |
#33 | RUNTIME ERROR | 0.06 s | details |
#34 | RUNTIME ERROR | 0.06 s | details |
#35 | RUNTIME ERROR | 0.07 s | details |
#36 | RUNTIME ERROR | 0.06 s | details |
#37 | RUNTIME ERROR | 0.06 s | details |
#38 | RUNTIME ERROR | 0.06 s | details |
#39 | RUNTIME ERROR | 0.06 s | details |
#40 | RUNTIME ERROR | 0.06 s | details |
#41 | RUNTIME ERROR | 0.07 s | details |
#42 | RUNTIME ERROR | 0.06 s | details |
#43 | RUNTIME ERROR | 0.06 s | details |
#44 | RUNTIME ERROR | 0.06 s | details |
#45 | RUNTIME ERROR | 0.06 s | details |
#46 | RUNTIME ERROR | 0.07 s | details |
#47 | RUNTIME ERROR | 0.06 s | details |
#48 | RUNTIME ERROR | 0.06 s | details |
#49 | RUNTIME ERROR | 0.07 s | details |
#50 | RUNTIME ERROR | 0.07 s | details |
#51 | RUNTIME ERROR | 0.06 s | details |
#52 | RUNTIME ERROR | 0.06 s | details |
#53 | RUNTIME ERROR | 0.06 s | details |
Code
import sys input = sys.stdin.readline n = int(input()) x = list(map(int, input().split())) y = [(x[i], i) for i in range(len(x))] y.sort() # print(x, y) res = 0 used = [False] * n for i in range(n): cur = 1 if not used[i]: j = i while y[j][1] != i and cur < n: used[j] = True j = y[j][1] cur += 1 # print(cur) used[j] = True # print(used) if cur > 1: res += cur - 1 print(res)
Test details
Test 1
Verdict: ACCEPTED
input |
---|
1 0 |
correct output |
---|
0 |
user output |
---|
0 |
Test 2
Verdict: RUNTIME ERROR
input |
---|
2 01 10 |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 3
Verdict: RUNTIME ERROR
input |
---|
2 01 10 |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 4
Verdict: RUNTIME ERROR
input |
---|
3 011 101 110 |
correct output |
---|
1 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 5
Verdict: RUNTIME ERROR
input |
---|
3 010 101 010 |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 6
Verdict: RUNTIME ERROR
input |
---|
3 000 001 010 |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 7
Verdict: RUNTIME ERROR
input |
---|
3 011 100 100 |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 8
Verdict: RUNTIME ERROR
input |
---|
4 0111 1011 1101 1110 |
correct output |
---|
4 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 9
Verdict: RUNTIME ERROR
input |
---|
4 0011 0010 1100 1000 |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 10
Verdict: RUNTIME ERROR
input |
---|
4 0000 0011 0101 0110 |
correct output |
---|
1 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 11
Verdict: RUNTIME ERROR
input |
---|
4 0101 1010 0100 1000 |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 12
Verdict: RUNTIME ERROR
input |
---|
4 0111 1001 1001 1110 |
correct output |
---|
2 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 13
Verdict: RUNTIME ERROR
input |
---|
4 0001 0010 0100 1000 |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 14
Verdict: RUNTIME ERROR
input |
---|
4 0110 1001 1000 0100 |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 15
Verdict: RUNTIME ERROR
input |
---|
4 0001 0000 0001 1010 |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 16
Verdict: RUNTIME ERROR
input |
---|
4 0101 1001 0000 1100 |
correct output |
---|
1 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 17
Verdict: RUNTIME ERROR
input |
---|
4 0001 0000 0000 1000 |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 18
Verdict: RUNTIME ERROR
input |
---|
5 01111 10111 11010 11101 ... |
correct output |
---|
7 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 19
Verdict: RUNTIME ERROR
input |
---|
5 00111 00000 10010 10100 ... |
correct output |
---|
1 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 20
Verdict: RUNTIME ERROR
input |
---|
5 00001 00110 01000 01000 ... |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 21
Verdict: RUNTIME ERROR
input |
---|
5 01011 10001 00011 10100 ... |
correct output |
---|
1 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 22
Verdict: RUNTIME ERROR
input |
---|
5 01110 10111 11011 11101 ... |
correct output |
---|
7 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 23
Verdict: RUNTIME ERROR
input |
---|
5 00011 00001 00010 10100 ... |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 24
Verdict: RUNTIME ERROR
input |
---|
5 01100 10100 11000 00001 ... |
correct output |
---|
1 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 25
Verdict: RUNTIME ERROR
input |
---|
5 00010 00011 00001 11000 ... |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 26
Verdict: RUNTIME ERROR
input |
---|
5 01010 10101 01010 10100 ... |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 27
Verdict: RUNTIME ERROR
input |
---|
5 00010 00000 00000 10000 ... |
correct output |
---|
0 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 28
Verdict: RUNTIME ERROR
input |
---|
10 0111111110 1011000101 1100001110 1100101100 ... |
correct output |
---|
26 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 29
Verdict: RUNTIME ERROR
input |
---|
10 0011100010 0000000010 1001110011 1010001001 ... |
correct output |
---|
11 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 30
Verdict: RUNTIME ERROR
input |
---|
10 0000111000 0000001100 0000011111 0000001101 ... |
correct output |
---|
7 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 31
Verdict: RUNTIME ERROR
input |
---|
10 0101100111 1001000000 0000010000 1100100010 ... |
correct output |
---|
9 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 32
Verdict: RUNTIME ERROR
input |
---|
10 0111011111 1010010010 1101011001 1010101100 ... |
correct output |
---|
22 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 33
Verdict: RUNTIME ERROR
input |
---|
10 0001100110 0001010100 0001010111 1110000110 ... |
correct output |
---|
11 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 34
Verdict: RUNTIME ERROR
input |
---|
10 0110010000 1011011010 1100110110 0100101011 ... |
correct output |
---|
22 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 35
Verdict: RUNTIME ERROR
input |
---|
10 0001001101 0001010000 0000011110 1100000101 ... |
correct output |
---|
13 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 36
Verdict: RUNTIME ERROR
input |
---|
10 0101010110 1000101001 0001011011 1010101110 ... |
correct output |
---|
8 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 37
Verdict: RUNTIME ERROR
input |
---|
10 0001000000 0000100000 0000000010 1000110111 ... |
correct output |
---|
19 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 38
Verdict: RUNTIME ERROR
input |
---|
100 011111111011000101000111010110... |
correct output |
---|
20807 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 39
Verdict: RUNTIME ERROR
input |
---|
100 001110001000000010111001100100... |
correct output |
---|
21100 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 40
Verdict: RUNTIME ERROR
input |
---|
100 000011100000001100001111100110... |
correct output |
---|
18556 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 41
Verdict: RUNTIME ERROR
input |
---|
100 010110011101000000001000010001... |
correct output |
---|
20091 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 42
Verdict: RUNTIME ERROR
input |
---|
100 011101111110010010101100110110... |
correct output |
---|
21281 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 43
Verdict: RUNTIME ERROR
input |
---|
100 000110011001010100101011100011... |
correct output |
---|
20746 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 44
Verdict: RUNTIME ERROR
input |
---|
100 011001000011011010011011010101... |
correct output |
---|
21793 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 45
Verdict: RUNTIME ERROR
input |
---|
100 000100110101010000001111000010... |
correct output |
---|
19781 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 46
Verdict: RUNTIME ERROR
input |
---|
100 010101011000101001101101110111... |
correct output |
---|
20006 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 47
Verdict: RUNTIME ERROR
input |
---|
100 000100000000100000000001011011... |
correct output |
---|
19161 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 48
Verdict: RUNTIME ERROR
input |
---|
1000 011111111011000101000111010110... |
correct output |
---|
20823418 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 49
Verdict: RUNTIME ERROR
input |
---|
1000 001110001000000010111001100100... |
correct output |
---|
20848491 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 50
Verdict: RUNTIME ERROR
input |
---|
2000 010001011010001100000111100111... |
correct output |
---|
166808034 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 51
Verdict: RUNTIME ERROR
input |
---|
2000 000010011000001011011110111110... |
correct output |
---|
165842024 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 52
Verdict: RUNTIME ERROR
input |
---|
2999 000110011001010001100011110110... |
correct output |
---|
561389670 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range
Test 53
Verdict: RUNTIME ERROR
input |
---|
3000 011111111111111111111111111111... |
correct output |
---|
4495501000 |
user output |
---|
(empty) |
Error:
Traceback (most recent call last): File "input/code.py", line 14, in <module> while y[j][1] != i and cur < n: IndexError: list index out of range