CS(Computer Science)지식/[C++][코딩 테스트] 자료구조 및 알고리즘60 [C++] 백준 2309번 : 일곱 난쟁이 #include using namespace std;vector man;int sum;int arr[2] = { 0, };bool find_man;int main(void) { ios::sync_with_stdio(0); cin.tie(0); int height; for (int i = 0; i > height; man.push_back(height); sum += height; } sort(man.begin(), man.end()); int temp_sum = sum; for (int i = 0; i 2025. 3. 1. [C++] 백준 2576번 : 홀수 // Authored by : pha-ran (soft18)// Co-authored by : -// http://boj.kr/c2a05cf9d222441dba79bba4e9ac5b6e#include using namespace std;int main(void){ ios::sync_with_stdio(0); cin.tie(0); int x, odd = 0, sum = 0, min = 100; for (int i = 0; i > x; if (x & 1) { odd += 1; sum += x; if (x 2025. 3. 1. [C++] 백준 2576번 : 홀수 // Authored by : pha-ran (soft18)// Co-authored by : -// http://boj.kr/c2a05cf9d222441dba79bba4e9ac5b6e#include using namespace std;int main(void){ ios::sync_with_stdio(0); cin.tie(0); int x, odd = 0, sum = 0, min = 100; for (int i = 0; i > x; if (x & 1) { odd += 1; sum += x; if (x 2025. 2. 23. [C++] 백준 2490번 : 윷놀이 #include using namespace std;int main(void) { ios::sync_with_stdio(0); cin.tie(0); int arr[2] = { 0, }; for (int i = 0; i > num; if (num == 0) arr[0]++; if (num == 1) arr[1]++; } if (arr[0] == 1 && arr[1] == 3) cout 2025. 2. 22. 이전 1 2 3 4 ··· 15 다음