# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
294986 | Bruteforceman | ACM (COCI19_acm) | Cpython 3 | 108 ms | 4556 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
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... |