This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
total_time = 0
n, m, r, t, k = [2, 4, 3, 15, 4]
problem_pair = [[1,1],[2,3],[1,4],[1,3]]
users = {}
time = {}
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]))
time[a] += r
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()))
for task in new_tuples:
print(*task)
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |