রবিবার, ২৮ আগস্ট, ২০১৬

UVA 484 - The Department of Redundancy Department

///...................SUBHASHIS MOLLICK....................///
///.....DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING....///
///.............ISLAMIC UNIVERSITY,BANGLADESH.............///
///.....................SESSION-(14-15)....................///
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
#include<ctype.h>
#include<bits/stdc++.h>
using namespace std;
main()
{
      map<long long ,long long>mp;
      vector<long long>vec;
      long long a;
      while(cin>>a)
      {
            if(mp[a]>0)
            {
                  mp[a]++;
            }
            else
            {
                  vec.push_back(a);
                  mp[a]=1;
            }

      }for(long  i=0;i<vec.size();i++)
      {
            printf("%ld %ld\n", vec[i], mp[vec[i]]);
      }
}

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

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

Factory Pattern

Factory Method  is a creational design pattern that provides an interface for creating objects in a superclass but allows subclasses to alte...