90132024-02-12 10:19:55IgnácKert (75 pont)cpp17Wrong answer 0/75300ms22680 KiB
// Source: https://usaco.guide/general/io

#include <bits/stdc++.h>
using namespace std;

int main() {
	int m, n, k;
	cin >> m >> n >> k;
	int db = 0, maxi = 0;
	for (int i = 0; i < m; i++) {
		map<int, int> a;
		int last = 0, crdb = 0, crmaxi = 0;
		for (int j = 0; j < n; j++) {
			int b;
			cin >> b;
			if (b == last) crdb++;
			else {
				crdb = 1;
				last = b;
			}
			if (crdb > maxi) maxi = crdb;
			a[b]++;
			if (a[b] > crmaxi) crmaxi = a[b];
		}
		
		if (crmaxi > n / 2) db++;
	}

	cout << db << " " << maxi;
}
SubtaskSumTestVerdictTimeMemory
base0/75
1Wrong answer0/03ms1808 KiB
2Wrong answer0/0280ms6200 KiB
3Wrong answer0/43ms6304 KiB
4Wrong answer0/43ms6452 KiB
5Wrong answer0/43ms6668 KiB
6Wrong answer0/43ms6860 KiB
7Wrong answer0/43ms7200 KiB
8Wrong answer0/43ms7292 KiB
9Wrong answer0/43ms7428 KiB
10Wrong answer0/48ms7816 KiB
11Wrong answer0/64ms7956 KiB
12Wrong answer0/614ms8476 KiB
13Wrong answer0/637ms9156 KiB
14Wrong answer0/6268ms12432 KiB
15Wrong answer0/6252ms15864 KiB
16Wrong answer0/6300ms20196 KiB
17Wrong answer0/7172ms22680 KiB