标签:div return set style 序列 map 数据规模 整数 math
#include <iostream> #include <cstdio> #include <algorithm> #include <stack> #include <cstring> #include <iomanip> #include <cmath> #include <map> #include <set> using namespace std; const int N = 1010; int n; int a[N]; int main() { cin >> n; map<int, int> mp; set<int> s; for (int i = 1; i <= n; i ++ ) { int x; cin >> x; mp[x] ++ ; s.insert(x); } for (set<int>::iterator it = s.begin(); it != s.end(); it ++ ) { cout << *it << ‘ ‘ << mp[*it] << endl; } return 0; }
标签:div return set style 序列 map 数据规模 整数 math
原文地址:https://www.cnblogs.com/zbx2000/p/12759609.html