# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
346629 |
2021-01-10T13:05:17 Z |
Alexandra |
Poi (IOI09_poi) |
Python 3 |
|
2000 ms |
35112 KB |
(n, t, p) = input().split()
(n, t , p) = int (n), int(t), int (p)
problems_solved = []
grading = []
scores=[]
empates=[]
PorEncima=0
TieBreak1=[]
TieBreak2=[]
for i in range (n):
a = input().split()
a = list(map(int, a))
problems_solved.append(a)
for i in range (t):
a = 0
for j in range (n):
a += problems_solved[j][i]
grading.append(n - a)
for i in range(n):
a = 0
for j in range(t):
if problems_solved[i][j]==1:
a += grading[j]
scores.append(a)
score_Philip = scores[p-1]
for i in range(n):
if (i+1)==p:
continue
else:
if score_Philip == scores[i]:
empates.append(i+1)
a = 0
for j in range (t):
a += problems_solved[i][j]
TieBreak1.append(a)
elif score_Philip < scores[i]:
PorEncima += 1
empates.append(p)
a=0
for i in range (t):
a += problems_solved[p-1][i]
TieBreak1.append(a)
for i in range(len(empates)-1):
if TieBreak1[i] == TieBreak1[(len(empates)-1)]:
TieBreak2.append(empates[i])
elif TieBreak1[i] < TieBreak1[len(empates-1)]:
PorEncima += 1
TieBreak2.append(p)
TieBreak2.sort()
a=TieBreak2.index(p)
print (str(score_Philip) + " " + str(1+PorEncima+a))
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
16 ms |
2924 KB |
Output is correct |
2 |
Correct |
16 ms |
2924 KB |
Output is correct |
3 |
Runtime error |
17 ms |
2924 KB |
Execution failed because the return code was nonzero |
4 |
Runtime error |
16 ms |
2924 KB |
Execution failed because the return code was nonzero |
5 |
Runtime error |
18 ms |
2944 KB |
Execution failed because the return code was nonzero |
6 |
Correct |
18 ms |
2924 KB |
Output is correct |
7 |
Runtime error |
21 ms |
2944 KB |
Execution failed because the return code was nonzero |
8 |
Runtime error |
22 ms |
3072 KB |
Execution failed because the return code was nonzero |
9 |
Runtime error |
28 ms |
3072 KB |
Execution failed because the return code was nonzero |
10 |
Correct |
38 ms |
3236 KB |
Output is correct |
11 |
Correct |
102 ms |
3948 KB |
Output is correct |
12 |
Correct |
164 ms |
4736 KB |
Output is correct |
13 |
Runtime error |
466 ms |
7916 KB |
Execution failed because the return code was nonzero |
14 |
Runtime error |
680 ms |
10252 KB |
Execution failed because the return code was nonzero |
15 |
Runtime error |
1159 ms |
16492 KB |
Execution failed because the return code was nonzero |
16 |
Correct |
1327 ms |
17644 KB |
Output is correct |
17 |
Correct |
1932 ms |
24556 KB |
Output is correct |
18 |
Execution timed out |
2080 ms |
27528 KB |
Time limit exceeded |
19 |
Execution timed out |
2040 ms |
35052 KB |
Time limit exceeded |
20 |
Execution timed out |
2088 ms |
35112 KB |
Time limit exceeded |