CSES - Aalto Competitive Programming 2024 - wk1 - Wed - Results
Submission details
Task:Entrepreneur
Sender:aalto2024a_003
Submission time:2024-09-04 17:47:16 +0300
Language:CPython3
Status:READY
Result:
Test results
testverdicttime
#10.02 sdetails
#20.02 sdetails
#30.02 sdetails
#40.02 sdetails
#50.02 sdetails
#60.02 sdetails
#70.02 sdetails
#80.02 sdetails
#90.04 sdetails
#100.04 sdetails
#110.02 sdetails
#120.02 sdetails
#130.02 sdetails
#140.02 sdetails
#150.02 sdetails

Code

n = input()
t = int(n[1])
n = int(n[0])

mach = input().split(" ")
time = []

for i in range(n):
    mach[i] = int(mach[i])
    time[i] = 0

for i in range(t):
    min = 100000000000000
    n_mach = 0
    for j in range(n):
        this = time[j] + mach[j]
        if min > this:
            min = this
            n_mach = j
    time[n_mach] += mach[n_mach]
max = 0
for i in range(n):
    if time[i] > max:
        max = time[i]

print(max)


Test details

Test 1

Verdict:

input
10 10
6 5 1 2 1 5 10 4 6 6

correct output
4

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 10, in <module>
    time[i] = 0
IndexError: list assignment index out of range

Test 2

Verdict:

input
10 10
6 6 4 3 4 9 3 2 6 10

correct output
6

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 10, in <module>
    time[i] = 0
IndexError: list assignment index out of range

Test 3

Verdict:

input
10 10
5 4 10 7 8 4 1 8 9 2

correct output
5

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 10, in <module>
    time[i] = 0
IndexError: list assignment index out of range

Test 4

Verdict:

input
1 1000000000
1

correct output
1000000000

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 2, in <module>
    t = int(n[1])
ValueError: invalid literal for int() with base 10: ' '

Test 5

Verdict:

input
1 1000000000
1000000000

correct output
1000000000000000000

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 2, in <module>
    t = int(n[1])
ValueError: invalid literal for int() with base 10: ' '

Test 6

Verdict:

input
1000 1000
271 687 392 992 11 410 702 870...

correct output
223

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 10, in <module>
    time[i] = 0
IndexError: list assignment index out of range

Test 7

Verdict:

input
1000 1000
598 523 703 794 737 689 724 26...

correct output
282

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 10, in <module>
    time[i] = 0
IndexError: list assignment index out of range

Test 8

Verdict:

input
200000 1000000000
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 ...

correct output
5000

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 10, in <module>
    time[i] = 0
IndexError: list assignment index out of range

Test 9

Verdict:

input
200000 1
760045594 599341056 300698860 ...

correct output
8214

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 10, in <module>
    time[i] = 0
IndexError: list assignment index out of range

Test 10

Verdict:

input
200000 1000000000
33941840 210038922 596070148 7...

correct output
371045814100

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 10, in <module>
    time[i] = 0
IndexError: list assignment index out of range

Test 11

Verdict:

input
25 1000000000
1000000000 1 1 1 1 1 1 1 1 1 1...

correct output
41666667

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 10, in <module>
    time[i] = 0
IndexError: list assignment index out of range

Test 12

Verdict:

input
12 1000000000
1 1 1 1 1 1 1 1 1 1 1 10000000...

correct output
90909091

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 10, in <module>
    time[i] = 0
IndexError: list assignment index out of range

Test 13

Verdict:

input
23 1000000000
1000000000 1000000000 10000000...

correct output
43478261000000000

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 10, in <module>
    time[i] = 0
IndexError: list assignment index out of range

Test 14

Verdict:

input
23 1000000000
1000000000 1000000000 10000000...

correct output
43478261000000000

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 10, in <module>
    time[i] = 0
IndexError: list assignment index out of range

Test 15

Verdict:

input
3 3
10 11 12

correct output
12

user output
(empty)

Error:
Traceback (most recent call last):
  File "/box/input/code.py", line 2, in <module>
    t = int(n[1])
ValueError: invalid literal for int() with base 10: ' '