Submission #754379

# Submission time Handle Problem Language Result Execution time Memory
754379 2023-06-07T15:32:07 Z komalrajputtrootech Programming Contest (POI11_pro) Python 3
0 / 100
1000 ms 63776 KB
import sys
n, m, r, t, k = map(int, sys.stdin.readline().split())
problem_pair = []
for i in range(k):
    problem_pair.append(map(int, sys.stdin.readline().split()))

users = {}
time = {}
total_time = r
for idx,(a,b) in enumerate(problem_pair):
    if a not in users.keys():
        users[a] = []
        time[a] = 0
        users[a].append((b, time[a]))
    else:
        users[a].append((b, time[a]))
    time[a] += r

user_list = []
user_task = set()

for task in range(1,1+m):
    for key, c in users.items():
        for tsk in c:
            tsk = (key, ) + tsk
            user_task.add(tsk)


user_task = list(user_task)
user_task.sort(key = lambda x: x[2])


seen = {}
new_tuples = []

for tup in user_task:
    if tup[1] not in seen:
        new_tuples.append(tup)
        seen[tup[1]] = True

print(len(new_tuples), sum(time.values())-r)
for task in new_tuples:
    print(*task)
# Verdict Execution time Memory Grader output
1 Incorrect 42 ms 3284 KB It was possible to get penalty of 20418000 points and you received 55468900.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 29 ms 3032 KB It was possible to get penalty of 55643980 points and you received 106518476.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 75 ms 4072 KB It was possible to get penalty of 72329760 points and you received 1920355128.
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1049 ms 10700 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1076 ms 52240 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1061 ms 38708 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1045 ms 63776 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1071 ms 11272 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1065 ms 44664 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1070 ms 16812 KB Time limit exceeded
2 Halted 0 ms 0 KB -