Advertisement
Guest User

Untitled

a guest
Apr 20th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int n;
  7. cin>>n;
  8. bool p [n] [10];
  9. for(int e=0;e<=n-1;e++){
  10. for(int q=0;q<=9;q++){
  11. p [e] [q]=false;
  12. }
  13. }
  14. int stn;
  15. int schet [n];
  16. char m [n+1] [50];
  17. for(int u=0;u<=n-1;u++)
  18. {
  19. cin>>m [u];
  20. }
  21. for(int i=0;i<=n-1;i++){
  22. for(int y=0;y<=49;y++){
  23. int v=m[i] [y];
  24. if(p [i] [v]==false){
  25. schet [i]++;
  26. p [i] [v]=true;
  27. }
  28. }
  29. }
  30.  
  31. for(int o;o<=n-1;o++){
  32. if(o){
  33. if(schet [o]>schet [o-1]){
  34. stn=o;
  35. }
  36. }else{
  37. stn=0;
  38. }
  39. }
  40.  
  41. for(int t=0;t<=49;t++){
  42. cout<<m [stn] [t];
  43. }
  44.  
  45. return 0;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement