| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1363463 | FZ_Laabidi | PPP (EGOI23_ppp) | C++20 | 0 ms | 0 KiB |
#include <bits/stdc++.h>
#define F first
#define S second
using namespace std;
signed main(){
int n; cin >> n;
int m; cin >> m;
vector<pair<int, int>> xi(m);
for(int i=0; i<m; i++)cin >> xi[i].F >> xi[i].S;
vector<int> freq0(m, 0);
for(int i=0; i<m; i++){
if(x[i].F==0){
for(int j = 0; j<=i; j++)freq0[j]++;
}
}
int f = 0;
for(int i=0; i<m; i++){
if(freq0[i]>=(m+1)/2)f++;
}
cout << f << " "<< m-f << endl;
}