N,M,K=map(int,input().split())
L=[]
G=M*[0]
for i in range (N):
L+=[list(map(int,input().split()))]
G[L[i][0]-1]+=1
n=0
for i in range(M):
if G[i]>G[n]:
n=i
print(n+1)
if n+1==K:
print(0)
else:
p=0
P=[0]
for i in range(100):
p+=1
P+=[n+1]
G=M*[0]
for x in range(N):
for y in range(M):
if L[x][y] in P:
L[x][y]=0
else:
G[L[x][y]-1]+=1
break
print(G)
n=0
for i in range(M):
if G[i]>G[n]:
n=i
if n+1==K:
print(p)
break
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
26 ms |
3428 KB |
Extra information in the output file |
2 |
Incorrect |
26 ms |
3428 KB |
Extra information in the output file |
3 |
Incorrect |
26 ms |
3336 KB |
Extra information in the output file |
4 |
Incorrect |
27 ms |
3336 KB |
Extra information in the output file |
5 |
Incorrect |
27 ms |
3332 KB |
Extra information in the output file |
6 |
Incorrect |
28 ms |
3332 KB |
Extra information in the output file |
7 |
Incorrect |
26 ms |
3428 KB |
Extra information in the output file |
8 |
Incorrect |
27 ms |
3416 KB |
Extra information in the output file |
9 |
Incorrect |
27 ms |
3428 KB |
Extra information in the output file |
10 |
Incorrect |
26 ms |
3428 KB |
Extra information in the output file |
11 |
Correct |
25 ms |
3336 KB |
Output is correct |
12 |
Incorrect |
28 ms |
3336 KB |
Extra information in the output file |
13 |
Incorrect |
27 ms |
3336 KB |
Extra information in the output file |
14 |
Incorrect |
27 ms |
3420 KB |
Extra information in the output file |
15 |
Incorrect |
29 ms |
3336 KB |
Extra information in the output file |
16 |
Incorrect |
27 ms |
3428 KB |
Extra information in the output file |
17 |
Incorrect |
31 ms |
3428 KB |
Extra information in the output file |
18 |
Incorrect |
27 ms |
3340 KB |
Extra information in the output file |
19 |
Incorrect |
27 ms |
3428 KB |
Extra information in the output file |
20 |
Incorrect |
28 ms |
3336 KB |
Extra information in the output file |