Baekjoon(C++) 썸네일형 리스트형 [C++]백준 알고리즘 8393번 풀이는 아래와 같다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 #include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; cout 더보기 [C++]백준 알고리즘 10950번 풀이는 아래와 같다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 #include // #include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; int* a = new int[n]; int* b = new int[n]; for(int i=0; i> a[i] >> b[i]; } for(int i=0; i 더보기 [C++]백준 알고리즘 13458번 풀이는 아래와 같다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 #include // #include using namespace std; int a[1000000]; int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; // int* a = new int[n]; int b, c; cin >> n; for( int i=0; i> a[i]; } cin >> b >> c; // int sum = 0; long long su.. 더보기 [C++]백준 알고리즘 2839번 풀이는 아래와 같다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 #include using namespace std; int sugar(int); int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); int n; cin >> n; cout 더보기 [C++]백준 알고리즘 15719번 풀이는 아래와 같다. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 #include using namespace std; int main(){ int n,m; ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); cin >> n; bool* counter = new bool[n]; int j; for(int i=0; i> j; if (counter[j]){ m = j; break; }else{ counter[j] = true; } } cout 더보기 이전 1 2 3 4 5 6 다음