Programming 썸네일형 리스트형 [C++] 백준 5063번 : TGN https://www.acmicpc.net/problem/5063 #include using namespace std;void Ad(int n);int main() {int n;cin >> n; int *T_c = new int[n];int r, e, c;for (int i = 0; i > r >> e >> c;T_c[i] = r - (e - c);} for (int i = 0; i 0)cout 더보기 [C++] 백준 2884번 : 알람 시계 https://www.acmicpc.net/problem/2884 #include using namespace std;int main() {int h, m;cin >> h >> m;if (m < 45){if (!h)h = 23;elseh--;m = m + 15;}elsem = m - 45;cout 더보기 [C++] 백준 2563번 : 색종이 https://www.acmicpc.net/problem/2563 #include using namespace std;int main() {int Paper[100][100] = {0,};int Area = 0;int n;cin >> n; int x, y;int L_x=0, L_y=0;// 효율을 높이기 위해 가장 큰 x,y 범위 파악for (int i = 0; i > x >> y;if (x > L_x)L_x = x;if (y > L_y)L_y = y; for (int i = x; i < x + 10; i++) for (int j = y; j < y + 10; j++) Paper[i][j]++;} // 가장 큰x,y까지 탐색for (int i = 0; i < L_x + 10;.. 더보기 [C++] 백준 1789번 : 수들의 합 https://www.acmicpc.net/problem/1789 #include using namespace std;int main() {long long n,k = 1;cin >> n;while (k*(k + 1) / 2 더보기 [C++] 백준 3053번 : 택시 기하학 https://www.acmicpc.net/problem/3053 #define _USE_MATH_DEFINES#include #include using namespace std;int main() {cout.setf(ios::fixed);cout.precision(6);double n;cin >> n; cout 더보기 [C++] 백준 5585번 : 거스름돈 https://www.acmicpc.net/problem/5585 #include using namespace std;int main() {cin.tie(NULL);ios::sync_with_stdio(false);int n;cin >> n;n = 1000 - n; int cnt = 0; while (n) {if (n >= 500){cnt++;n = n - 500;}else if (n >= 100){cnt++;n = n - 100;}else if (n >= 50){cnt++;n = n - 50;}else if (n >= 10){cnt++;n = n - 10;}else if (n >= 5){cnt++;n = n - 5;}else{cnt++;n = n - 1;}} cout 더보기 [C++] 백준 10886번 : 0 = not cute / 1 = cute https://www.acmicpc.net/problem/10886 #include using namespace std;int main() { int n;cin >> n; int k,cnt=0;for (int i = 0; i > k;k == 1 ? cnt++ : 0;}if (cnt > n / 2)cout 더보기 [C++] 백준 2960번 : 에라토스테네스의 체 https://www.acmicpc.net/problem/2960 #include using namespace std;int main() {int n,k;cin >> n >> k; int *ary = new int[n];fill_n(ary, n, 1);int P=2,cnt=0,output;while (k!=cnt) {while (1) {if (ary[P - 1])break;P++;}for (int i = P; i 더보기 이전 1 ··· 23 24 25 26 27 28 29 ··· 38 다음