Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- typedef struct
- {
- int x, y;
- } PUNCT;
- int main()
- {
- PUNCT p[100];
- int fr[100] = {};//il fac pe fr 0
- int n;
- cin >> n;
- for (int i = 0; i < n; i++)
- cin >> p[i].x >> p[i].y;
- int maxi = 0;
- for (int i = 0; i < n; i++)
- {
- fr[p[i].y]++;
- if (maxi < p[i].y)
- maxi = p[i].y;
- }
- int maxifr = 0;
- for (int i = 0; i < maxi; i++)
- if (maxifr < fr[i])
- maxifr = fr[i];
- cout << maxifr;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement