61 lines
1.1 KiB
C++
61 lines
1.1 KiB
C++
#include <bits/stdc++.h>
|
|
#include <iostream>
|
|
using namespace std;
|
|
|
|
int returnVecMax(vector<int> a) {
|
|
int out = a[0];
|
|
int index = 0;
|
|
for (int i =1; i < a.size(); i++) {
|
|
if (a[i] > out) {
|
|
out = a[i];
|
|
index = i;
|
|
}
|
|
}
|
|
return index;
|
|
}
|
|
|
|
int main() {
|
|
int o, n, m, t, h;
|
|
cin >> o >> n >> m >> t >> h;
|
|
n +=1;
|
|
m +=1;
|
|
int ts, tts, nap, ora;
|
|
|
|
vector <vector <bool>> tan (m, vector<bool>(n));
|
|
vector <int> legtobb(m);
|
|
|
|
|
|
for (int i = 1; i <= o; i++) {
|
|
cin >> ts >> tts >> nap >> ora;
|
|
|
|
tan[tts][ts] = 1;
|
|
|
|
}
|
|
|
|
for (int i = 0; i < n; i++) {
|
|
for (int j = 0 ; j < m; j++) {
|
|
if (tan[i][j]) {
|
|
legtobb[i] += 1;
|
|
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
//debug
|
|
// for (int i = 0 ; i < m; i++) {
|
|
// for (int j = 0; j < n; j++) {
|
|
// cout<<tan[i][j]<<' ';
|
|
// }
|
|
// cout<<endl;
|
|
// }
|
|
|
|
// cout<<endl;
|
|
|
|
// for (int i = 0 ; i < m; i++) {
|
|
// cout<<legtobb[i]<< ' ';
|
|
// }
|
|
// cout<<endl;
|
|
|
|
cout<<returnVecMax(legtobb);
|
|
} |