Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
347 B
0
Indexable
Never
int n, m, o, t;
	cin >> n >> m;
	vector<int>a;
	vector<int>med;
	for (int i = 0; i < n; i++)
	{
		for (int i = 0; i < m; i++)
		{
			int r;
			cin >> r;
			a.push_back(r);

		}
		sort(a.begin(), a.end());
		t = (a.size() - 1) / 2;
		med.push_back(t);
	}
	sort(med.begin(), med.end());
	o = (med.size() - 1) / 2;
	cout << med[o];