Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // In the name of Allah.
- // We're nothing and you're everything.
- // Ya Ali!
- /*
- , \ / ,
- / \ )\__/( / \
- / \ (_\ /_) / \
- ____/_____\__\@ @/___/_____\____
- | |\../| |
- | \VV/ |
- | ------___------- |
- |__________Chuta Dragon___________|
- | /\ / \\ \ /\ |
- | / V )) V \ |
- |/ ` // ' \|
- ` V '
- */
- #include<bits/stdc++.h>
- using namespace std;
- typedef long long ll;
- typedef pair<ll,ll>pll;
- #define fastread() (ios_base:: sync_with_stdio(false),cin.tie(NULL))
- #define fi first
- #define se second
- #define pb push_back
- ll const MOD=1000000007;
- ///-------------------------------------------------------------------------------------------------///
- /// KARMA IS LIKE 69,,, YOU GET WHAT YOU GIVE ///
- ///-------------------------------------------------------------------------------------------------///
- void input(ll ara[],ll n){ for(ll i=0; i<n; i++)cin>>ara[i];}
- #define eb emplace_back
- typedef struct{ll x,y;string name;}node;
- bool compare(node &a,node &b){
- if(a.x==b.x)return a.y<b.y;
- return a.x<b.x;
- }
- int main()
- {
- ll n;
- cin>>n;
- /// vector<node>v;
- vector<node>v(n);
- for(ll i=0;i<n;i++)
- {
- cin>>v[i].x>>v[i].y>>v[i].name;
- ///ll a,b; string c;cin>>a>>b>>c;v.push_back(node{a,b,c});
- }
- sort(v.begin(),v.end(),compare);
- for(ll i=0;i<n;i++)
- {
- cout<<v[i].x<<" "<<v[i].y<<" "<<v[i].name<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement