Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- ios_base::sync_with_stdio(false);
- int n;
- cin>>n;
- bool rodendeni[31][12]={{false}};
- int brojac[12]={0};
- int maks=0;
- for(int j=0;j<n;j++)
- {
- int temp,temp2;
- cin>>temp>>temp2;
- temp--;
- temp2--;
- if(!rodendeni[temp][temp2])
- brojac[temp2]++;
- rodendeni[temp][temp2]=true;
- }
- for(int j=0;j<12;j++)
- maks=max(maks,brojac[j]);
- for(int j=0;j<12;j++)
- if(maks==brojac[j])
- cout<<j+1<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement