WookjeBlog
    • 블로그
    • 소개
    • 태그
    • 수업/강의
    • 라이브러리
    Main
    • Share to Facebook

    집합

    All Posts in set

    • [codeforces] 1070H : BerOS File Suggestion

      1070H : BerOS File Suggestion 풀이 주어지는 string의 길이가 엄청 짧다. 모든 substring을 다 잘라서 자료구조에 넣어주자. 그럼 쉽게 구현할 수 있다. 코드 #include <iostream> #include <algorithm> #include <map> #include <set> #include <string> using namespace std; int n, q; string a[10001]; map<string, pair<int, int> > m; int main() { ios_base::sync_with_stdio(0); cin.tie(0); cin >> n; for (int k = 0; k < n; k++) { string str; cin >> str; a[k] = str; set<string> s; for...

      codeforces brute-force set map

      wookje.kwon's profile image

      wookje.kwon

      2018-11-14 12:59

    • [BOJ] 7662 : 이중 우선순위 큐

      7662 : 이중 우선순위 큐 풀이 multiset을 써서 풀었는데 map으로 풀어도 될 거 같고 아무튼 그냥 짜면 된다. 코드 #include <iostream> #include <set> using namespace std; int main() { int t; cin >> t; while (t--) { int k; cin >> k; char c; int n; multiset<int> v; while (k--) { cin >> c >> n; if (c == 'I') { v.insert(n); } else if (c == 'D' && v.size() > 0) { if (n...

      boj acm-icpc map set naive

      wookje.kwon's profile image

      wookje.kwon

      2018-09-17 12:19

    • github
    • facebook
    • rss

    Copyright © Wookje Kwon. All rights reserved.