Saleh127

Untitled

May 5th, 2020
131
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4. int main()
  5. {
  6. int n,i,j,k,l;
  7. pair<int,int>a[200000];
  8. cin>>n;
  9. for(i=0;i<n;i++)
  10. {
  11. cin>>a[i].first>>a[i].second;
  12. }
  13. for(i=100;i>=0;i--)
  14. {
  15. for(j=0;j<n;j++)
  16. {
  17. if(i==a[j].second)
  18. {
  19. printf("%d %d\n",a[j].first,a[j].second);
  20. }
  21. }
  22. }
  23. return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment