Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*in the name of Allah */
- # include <list>
- # include <deque>
- # include <bitset>
- # include <algorithm>
- # include <functional>
- # include <numeric>
- # include <utility>
- # include <sstream>
- # include <iostream>
- # include <iomanip>
- # include <cstdio>
- # include <cmath>
- # include <cstdlib>
- # include <ctime>
- # include <set>
- # include <map>
- # include <cmath>
- # include <queue>
- # include <limits>
- # include <stack>
- # include <vector>
- # include <cstring>
- # include <cstdio>
- using namespace std;
- # define MEM(array,w) memset(array,w,sizeof array)
- # define ULL unsigned long long
- # define eps 1e-9
- # define SS stringstream
- # define FOR(i, a, b) for (int i=a; i<b; i++)
- # define REP(i, a) FOR(i, 0, a)
- # define rive(s) reverse(s.begin(),s.end())
- # define PII pair<int , int>
- # define MPSS map<string, string>
- # define MPIS map<int, string>
- # define MPSI map<string, int>
- # define MPII map<int, int>
- # define MPIC map<int,char>
- # define MPCI map<char, int>
- # define all(c) (c).begin(), (c).end()
- # define VS vector<string>
- # define VI vector<int>
- # define VC vector<char>
- # define VB vector<bool>
- # define sz(x) x.size()
- # define pb push_back
- # define STI set<int>
- # define STC set<char>
- # define STS set<string>
- # define OK(R,C) if(i<0 && j<0 && j==C && i==R)
- template<class T> string toString(T n){ostringstream ost;ost<<n;ost.flush();return ost.str();}
- int toInt(string s){int r=0;istringstream sin(s);sin>>r;return r;}
- bool isprime(int n){if( n<2) return 0;for( int i=2; i*i<=n ; i++)if(n%i==0)return 0; return 1;return 0;}
- int pel(string s){string t;t=s;reverse(t.begin(),t.end());if(s==t)return 1;return 0;}
- char graph[100][100];
- bool visited[100][100];
- int row,col;
- int dr[]={0,0,1,-1};
- int dc[]={1,-1,0,0};
- int rchange[] = {-1,0,1,-1,0,1};
- int cchange[] = {-1,-1,0,0,1,1};
- int main()
- {
- int n;
- map<int,int> mpi;
- vector<bool>fol(0);
- vector<int>pos;
- while(cin>>n)
- {
- mpi[n]++;
- if(fol[n]!=1)pos.pb(n);fol[n]=1;
- }
- for(int i=0;i<pos.size();i++)
- cout<<pos[i]<<" "<<mpi[pos[i]]<<endl;
- mpi.clear();pos.clear();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement