About Me

About Me : I have been working as a Software Engineer for various international companies for four years.Currently, I am working as a full stack Javascript developer in Petronas(Malaysia).

Skills

Skills • Javascript •Typescript •Python •C •Java •ReactJs • Redux • VueJs • NestJs • React Testing Library • Django• PostgreSQL • MySQL • NodeJs • Git • Docker • Jira • Visual Studio Code • Slack

মঙ্গলবার, ২৩ জুন, ২০১৫

UVA :482 - Permutation Arrays

#include<bits/stdc++.h>
#include<stdio.h>
#include<string.h>

using namespace std;


int main()
{

   // freopen("in.txt","r",stdin);
   // freopen("out.txt","w",stdout);
    int test;
    cin>>test;
    vector <pair<int,string> > vi;
    int in;
    string ss;
    char str[100];
    getchar();
    for(int cas=1; cas<=test; cas++)
    {

        getchar();


        string a,b;
        vi.clear();
        getline (cin,a);
        getline (cin,b);
        stringstream x (a);
        stringstream y(b);
        while(x>>in)
        {
            y>>ss;
            vi.push_back(make_pair(in,ss));

        }

        sort(vi.begin(),vi.end());


        if(cas>1) printf("\n");
        for(int i=0; i<vi.size(); i++)     cout<<vi[i].second<<endl;

    }



    return 0;
}

কোন মন্তব্য নেই:

একটি মন্তব্য পোস্ট করুন