C++

C++/코드트리 챌린지

[코드트리 챌린지] 8주차 - HashSet / 데이터 비교

https://www.codetree.ai/missions/8/problems/data-comparison/description 코드트리 | 코딩테스트 준비를 위한 알고리즘 정석 국가대표가 만든 코딩 공부의 가이드북 코딩 왕초보부터 꿈의 직장 코테 합격까지, 국가대표가 엄선한 커리큘럼으로 준비해보세요. www.codetree.ai 코드: #include #include using namespace std; int n, m; unordered_set set1; // 수열1의 원소 종류 저장 unordered_set set2; // 수열2의 원소 종류 저장 int arr[100005]; // 수열2의 원소 저장 int main(void) { ios::sync_with_stdio(0); cin.tie(0); ..

C++/코드트리 챌린지

[코드트리 챌린지] 8주차 - HashSet / hashset 기본

https://www.codetree.ai/missions/8/problems/hashset-basic/description 코드트리 | 코딩테스트 준비를 위한 알고리즘 정석 국가대표가 만든 코딩 공부의 가이드북 코딩 왕초보부터 꿈의 직장 코테 합격까지, 국가대표가 엄선한 커리큘럼으로 준비해보세요. www.codetree.ai 코드: #include #include using namespace std; int n; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> n; string s; int x; unordered_set hSet; while (n--) { cin >> s >> x; if (s == "add") { hSet.insert(x); ..

C++/코드트리 챌린지

[코드트리 챌린지] 8주차 - TreeMap / 비율 구하기

https://www.codetree.ai/missions/8/problems/find-proportions/description 코드트리 | 코딩테스트 준비를 위한 알고리즘 정석 국가대표가 만든 코딩 공부의 가이드북 코딩 왕초보부터 꿈의 직장 코테 합격까지, 국가대표가 엄선한 커리큘럼으로 준비해보세요. www.codetree.ai 코드: #include #include using namespace std; int n; map m; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> n; string s; for (int i = 0; i > s; m[s] = m[s] + 1; } map::iterator it; // ..

C++/코드트리 챌린지

[코드트리 챌린지] 8주차 - TreeMap / treemap 기본

https://www.codetree.ai/missions/8/problems/treemap-basic/description 코드트리 | 코딩테스트 준비를 위한 알고리즘 정석 국가대표가 만든 코딩 공부의 가이드북 코딩 왕초보부터 꿈의 직장 코테 합격까지, 국가대표가 엄선한 커리큘럼으로 준비해보세요. www.codetree.ai 코드: #include #include using namespace std; int n; map m; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> n; string order; int k, v; while (n--) { cin >> order; if (order == "add") { cin >> k >> v; m[k]..

tmd1
'C++' 카테고리의 글 목록