[백준] 2910 빈도 정렬 c++
·
🍞 Algorithm/Baekjoon
https://www.acmicpc.net/problem/2910 2910번: 빈도 정렬 첫째 줄에 메시지의 길이 N과 C가 주어진다. (1 ≤ N ≤ 1,000, 1 ≤ C ≤ 1,000,000,000) 둘째 줄에 메시지 수열이 주어진다. www.acmicpc.net 풀이 과정 #include #include #include #include #include using namespace std; map m; map m1; vector v; bool cmp(pair a, pair b) { if (a.first == b.first) return m1[a.second] b.first; } int main() { ios::sync_with_stdio(f..