Advertisement
Guest User

Untitled

a guest
Dec 14th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <iostream>
  2. #include <algorithm>
  3. using namespace std;
  4. int n;
  5. struct el{int s,t,b;}a[102];
  6. bool operator<(el &a,el &b)
  7. {
  8. return a.s<b.s;
  9. }
  10. int main()
  11. {
  12. cin>>n;
  13. for(int i=0;i<n;i++)
  14. cin>>a[i].s>>a[i].t>>a[i].b;
  15. sort(a,a+n);
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement