Submission details
Task:Wario Kart I
Sender:Ranjana
Submission time:2025-09-15 17:01:29 +0300
Language:Python3 (PyPy3)
Status:READY
Result:
Test results
testverdicttime
#1ACCEPTED0.04 sdetails
#20.08 sdetails
#30.08 sdetails
#4ACCEPTED0.04 sdetails
#50.08 sdetails
#60.08 sdetails
#70.08 sdetails
#80.08 sdetails
#90.08 sdetails
#100.08 sdetails
#110.08 sdetails
#120.08 sdetails
#130.08 sdetails
#140.08 sdetails
#150.08 sdetails
#160.08 sdetails
#17ACCEPTED0.04 sdetails
#18ACCEPTED0.04 sdetails
#19ACCEPTED0.04 sdetails
#200.08 sdetails
#210.08 sdetails
#220.08 sdetails
#230.08 sdetails
#240.08 sdetails
#250.08 sdetails
#260.08 sdetails
#27ACCEPTED0.04 sdetails
#28ACCEPTED0.04 sdetails
#29ACCEPTED0.04 sdetails
#300.08 sdetails
#310.08 sdetails
#320.08 sdetails
#330.08 sdetails
#340.08 sdetails
#350.08 sdetails
#360.08 sdetails
#370.08 sdetails
#380.08 sdetails
#390.08 sdetails
#400.08 sdetails
#410.08 sdetails
#420.08 sdetails
#430.08 sdetails
#440.08 sdetails
#450.08 sdetails
#460.08 sdetails
#470.08 sdetails
#480.08 sdetails
#490.08 sdetails
#500.08 sdetails
#510.08 sdetails
#520.08 sdetails
#530.08 sdetails
#540.08 sdetails
#550.08 sdetails
#560.08 sdetails
#570.09 sdetails
#580.08 sdetails
#590.08 sdetails
#600.10 sdetails
#610.10 sdetails
#620.10 sdetails
#630.10 sdetails
#640.11 sdetails
#650.09 sdetails
#660.11 sdetails
#670.09 sdetails
#680.11 sdetails
#690.08 sdetails

Code

n, m, k = map(int, input().split())

if m > 0:
    boost = list(map(int, input().split()))
    boost_pos= set(a * 100 for a in boost)
else:
    boost_positions = set()

track_length = n * 100


def calculate_position(time_limit):
    if time_limit == 0:
        return 0
    
  
    if time_limit <= 2 * track_length // 100: 
        position = 0
        boost_rem = 0
        
        for t in range(time_limit):
            
            if boost_rem > 0:
                speed = 200
                boost_rem -= 1
            else:
                speed = 100
            
            
            position += speed
            position %= track_length
            
            
            if position in boost_positions and boost_rem == 0:
                boost_rem = 1
        
        return position
    

    seen = {}
    position = 0
    boost_rem = 0
    
    for t in range(time_limit):
        state = (position, boost_rem)
        
        if state in seen:
         
            cycle_start = seen[state]
            cycle_length = t - cycle_start
            
            if cycle_length > 0:
                remaining = time_limit - t
                full_cycles = remaining // cycle_length
                t += full_cycles * cycle_length
                
             
                for _ in range(time_limit - t):
                    if boost_rem > 0:
                        speed = 200
                        boost_rem -= 1
                    else:
                        speed = 100
                    
                    position += speed
                    position %= track_length
                    
                    if position in boost_positions and boost_rem == 0:
                        boost_rem = 1
                
                return position
        
        seen[state] = t
       
        if boost_rem > 0:
            speed = 200
            boost_rem -= 1
        else:
            speed = 100
        
        position += speed
        position %= track_length
        
        if position in boost_positions and boost_rem == 0:
            boost_rem = 1
    
    return position

print(calculate_position(k))
#The cars normally move at a speed of 100 m/s, but there are also m boost pads numbered 1,\,2,\,\dots,\,m; the i-th is located a_i \times 100 meters from the starting line. A boost pad doubles a car's speed for one second. While one boost is active, another cannot be picked up. The racing track is circular and has a length of n \times 100 meters. Calculate Maija's position from the starting line k seconds after the race started.
#Input
#The first line contains three integers: n,\,m,\,k.
#The second line contains m distinct integers: a_1,\,a_2,\,\dots,\,a_m.
# modify the logic to have specific integers


Test details

Test 1

Verdict: ACCEPTED

input
1 0 1 

correct output
0

user output
0

Test 2

Verdict:

input
1 1 4 

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 3

Verdict:

input
2 1 9 

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 4

Verdict: ACCEPTED

input
3 0 7 

correct output
100

user output
100

Test 5

Verdict:

input
3 2 14 
0 2 

correct output
100

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 6

Verdict:

input
3 2 9 
1 2 

correct output
100

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 7

Verdict:

input
4 4 19 
0 1 2 3 

correct output
200

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 8

Verdict:

input
4 1 18 

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 9

Verdict:

input
4 4 9 
0 1 2 3 

correct output
200

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 10

Verdict:

input
5 3 15 
2 3 4 

correct output
400

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 11

Verdict:

input
5 2 25 
3 4 

correct output
100

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 12

Verdict:

input
5 2 4 
0 4 

correct output
100

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 13

Verdict:

input
5 3 1 
1 3 4 

correct output
100

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 14

Verdict:

input
5 5 23 
0 1 2 3 4 

correct output
100

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 15

Verdict:

input
5 1 1 

correct output
100

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 16

Verdict:

input
5 5 24 
0 1 2 3 4 

correct output
300

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 17

Verdict: ACCEPTED

input
5 0 5 

correct output
0

user output
0

Test 18

Verdict: ACCEPTED

input
5 5 0 
0 1 2 3 4 

correct output
0

user output
0

Test 19

Verdict: ACCEPTED

input
5 0 9 

correct output
400

user output
400

Test 20

Verdict:

input
10 6 30 
3 4 5 6 7 8 

correct output
200

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 21

Verdict:

input
10 4 50 
0 1 7 9 

correct output
100

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 22

Verdict:

input
10 4 9 
0 4 5 9 

correct output
200

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 23

Verdict:

input
10 6 3 
1 2 4 5 7 8 

correct output
400

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 24

Verdict:

input
10 10 45 
0 1 2 3 4 5 6 7 8 9 

correct output
0

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 25

Verdict:

input
10 2 2 
2 8 

correct output
200

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 26

Verdict:

input
10 9 48 
0 1 2 3 4 5 6 8 9 

correct output
600

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 27

Verdict: ACCEPTED

input
10 0 11 

correct output
100

user output
100

Test 28

Verdict: ACCEPTED

input
10 9 0 
0 2 3 4 5 6 7 8 9 

correct output
0

user output
0

Test 29

Verdict: ACCEPTED

input
10 0 18 

correct output
800

user output
800

Test 30

Verdict:

input
100 55 297 
1 2 5 7 8 10 11 13 14 18 21 26...

correct output
6900

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 31

Verdict:

input
100 42 499 
0 2 3 8 9 12 14 18 19 20 22 23...

correct output
400

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 32

Verdict:

input
100 44 92 
2 6 7 9 10 11 12 13 15 17 18 2...

correct output
3200

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 33

Verdict:

input
100 55 35 
1 2 4 5 9 12 14 15 20 21 22 24...

correct output
5400

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 34

Verdict:

input
100 97 451 
0 1 2 3 4 5 6 7 8 9 10 11 12 1...

correct output
8300

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 35

Verdict:

input
100 22 27 
8 18 20 24 29 35 36 39 44 48 5...

correct output
3200

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 36

Verdict:

input
100 90 474 
0 2 3 4 5 6 8 9 10 11 12 13 14...

correct output
1200

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 37

Verdict:

input
100 7 113 
30 31 43 45 72 77 97 

correct output
1900

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 38

Verdict:

input
100 88 5 
0 1 2 3 5 6 7 9 10 11 12 13 14...

correct output
900

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 39

Verdict:

input
100 1 182 
50 

correct output
8400

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 40

Verdict:

input
200 110 593 
2 3 4 7 11 12 14 17 19 20 21 2...

correct output
14100

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 41

Verdict:

input
200 83 998 
0 3 5 6 7 11 14 16 17 18 19 20...

correct output
19600

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 42

Verdict:

input
200 87 185 
5 13 15 16 19 21 23 25 26 29 3...

correct output
6600

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 43

Verdict:

input
200 110 70 
3 4 5 8 10 12 13 14 15 17 18 2...

correct output
11000

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 44

Verdict:

input
200 194 901 
0 1 2 3 4 5 6 7 8 9 10 11 12 1...

correct output
16700

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 45

Verdict:

input
200 44 55 
2 16 17 18 22 23 31 37 40 41 4...

correct output
6800

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 46

Verdict:

input
200 179 948 
0 1 2 3 4 5 6 7 8 9 10 11 12 1...

correct output
17200

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 47

Verdict:

input
200 15 227 
3 14 17 52 53 61 63 83 87 91 1...

correct output
4400

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 48

Verdict:

input
200 175 11 
0 1 2 4 5 6 7 8 9 10 11 12 13 ...

correct output
2100

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 49

Verdict:

input
200 2 364 
99 100 

correct output
16600

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 50

Verdict:

input
1000 549 2964 
0 4 9 11 12 13 15 16 18 19 20 ...

correct output
60800

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 51

Verdict:

input
1000 417 4986 
0 2 4 8 9 11 12 13 15 18 19 21...

correct output
6600

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 52

Verdict:

input
1000 436 925 
0 1 2 4 5 8 9 10 13 16 18 25 2...

correct output
31700

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 53

Verdict:

input
1000 551 353 
0 2 4 6 9 12 13 18 20 21 22 23...

correct output
54500

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 54

Verdict:

input
1000 967 4504 
0 1 2 3 4 5 6 7 8 9 10 11 12 1...

correct output
83100

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 55

Verdict:

input
1000 222 275 
1 2 5 12 14 20 22 24 29 35 51 ...

correct output
33200

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 56

Verdict:

input
1000 893 4738 
0 2 3 4 5 7 8 10 11 12 13 14 1...

correct output
90500

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 57

Verdict:

input
1000 76 1136 
15 24 65 72 83 86 100 133 142 ...

correct output
22200

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 58

Verdict:

input
1000 874 55 
0 1 2 3 4 5 6 7 8 9 10 11 13 1...

correct output
10200

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 59

Verdict:

input
1000 10 1822 
7 13 133 142 218 316 495 499 5...

correct output
84100

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 60

Verdict:

input
100000 54882 296454 
0 2 3 4 5 6 7 9 15 16 18 20 21...

correct output
5941200

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 61

Verdict:

input
100000 41702 498646 
4 5 6 7 9 11 14 17 18 23 24 29...

correct output
755600

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 62

Verdict:

input
100000 43600 92551 
2 4 7 10 12 17 18 30 34 35 36 ...

correct output
3319100

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 63

Verdict:

input
100000 55080 35366 
1 2 3 4 6 7 8 12 13 14 15 17 2...

correct output
5465700

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 64

Verdict:

input
100000 96704 450359 
0 1 2 3 4 5 6 8 9 10 11 12 13 ...

correct output
8642700

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 65

Verdict:

input
100000 22199 27593 
6 14 28 38 39 45 46 48 49 50 5...

correct output
3364900

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 66

Verdict:

input
100000 89287 473789 
0 1 2 3 4 5 6 7 8 9 10 12 13 1...

correct output
9652600

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 67

Verdict:

input
100000 7630 113681 
0 8 18 24 27 64 69 85 92 102 1...

correct output
2231400

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 68

Verdict:

input
100000 87344 5557 
0 1 2 3 4 5 7 8 9 10 11 13 14 ...

correct output
1043700

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...

Test 69

Verdict:

input
100000 1037 182250 
34 264 299 412 456 495 653 655...

correct output
8414700

user output
(empty)

Error:
Traceback (most recent call last):
  File "input/code.py", line 90, in <module>
    print(...