Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int n;
- cin>>n;
- bool p [n] [10];
- for(int e=0;e<=n-1;e++){
- for(int q=0;q<=9;q++){
- p [e] [q]=false;
- }
- }
- int stn;
- int schet [n];
- char m [n+1] [50];
- for(int u=0;u<=n-1;u++)
- {
- cin>>m [u];
- }
- for(int i=0;i<=n-1;i++){
- for(int y=0;y<=49;y++){
- int v=m[i] [y];
- if(p [i] [v]==false){
- schet [i]++;
- p [i] [v]=true;
- }
- }
- }
- for(int o;o<=n-1;o++){
- if(o){
- if(schet [o]>schet [o-1]){
- stn=o;
- }
- }else{
- stn=0;
- }
- }
- for(int t=0;t<=49;t++){
- cout<<m [stn] [t];
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement