# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
294986 | Bruteforceman | ACM (COCI19_acm) | Cpython 3 | 108 ms | 4556 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
import re
def process(s):
return re.split(r'[/:\s]\s*', s)
def getPenalty(s):
a = [int(i) for i in s[1:]]
submission = 0
if len(s[0]) > 1:
submission = ord(s[0][1]) - ord('0') - 1
penalty = a[0] * 60 * 60 + a[1] * 60 + a[2]
penalty += submission * 20 * 60
return penalty
n, m = map(int, input().split())
ranklist = []
for i in range(n + 1):
arr = input().split()
team = arr[0]
solve, penalty = 0, 0
for j in arr[1:]:
if j[0] == '-':
continue
solve += 1
penalty += getPenalty(process(j))
if i < n and team == 'NijeZivotJedanACM':
continue
if team == 'NijeZivotJedanACM':
team = ''
ranklist.append((-solve, penalty, team))
ranklist.sort()
for i in range(0, len(ranklist)):
if ranklist[i][2] == '':
print(i + 1)
exit(0)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |