Notice
Recent Posts
Recent Comments
Link
목록datastructure (2)
Little Jay
[C++] 백준 1302번 - 베스트셀러
map을 활용한 기본적인 문제 #include #include using namespace std; int n; map m; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cin >> n; while (n--) { string s; cin >> s; ++(m[s]); } pair p; int max = 0; for (auto s : m) { if (s.second > max) { max = s.second; p = s; } } cout
알고리즘/BOJ
2022. 1. 11. 15:19