Advertisement
edutedu

vr 45 pr 4

Sep 27th, 2020
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. using namespace std;
  4.  
  5. int frecv[100];
  6.  
  7. int main()
  8. {
  9. int n, x;
  10. ifstream f("bac.in");
  11. f>>n;
  12. for(int i=0; i<100; i++)
  13. frecv[i]=0;
  14. for(int i=0; i<n; i++)
  15. {
  16. f>>x;
  17. frecv[x]++;
  18. }
  19. for(int i=0; i<100; i++)
  20. while(frecv[i]>0)
  21. {
  22. cout<<i<<" ";
  23. frecv[i]--;
  24. }
  25. return 0;
  26. }
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement