
백준 9184번 신나는 함수 실행https://www.acmicpc.net/problem/9184 9184번: 신나는 함수 실행입력은 세 정수 a, b, c로 이루어져 있으며, 한 줄에 하나씩 주어진다. 입력의 마지막은 -1 -1 -1로 나타내며, 세 정수가 모두 -1인 경우는 입력의 마지막을 제외하면 없다.www.acmicpc.net 정답 코드#include using namespace std; int w(int a, int b, int c); int dp[21][21][21]; int main() { while (1) { int a, b, c; cin >> a >> b >> c; if (a == -1 && b == -1 && c == -1) break; int len = w(a, b, c); cout

백준 2407번 조합https://www.acmicpc.net/problem/2407 2407번: 조합n과 m이 주어진다. (5 ≤ n ≤ 100, 5 ≤ m ≤ 100, m ≤ n)www.acmicpc.net 정답 코드#include #include #include #define MOD 1000000000000000 using namespace std; int n, m; long long dp1[101][101], dp2[101][101]; int main() { cin >> n >> m; dp1[0][0] = 1; for (int i = 1; i

백준 2133번 타일 채우기https://www.acmicpc.net/problem/2133 2133번: 타일 채우기3×N 크기의 벽을 2×1, 1×2 크기의 타일로 채우는 경우의 수를 구해보자.www.acmicpc.net 정답 코드#include int find(int a); int dp[31]; int main() { int n; scanf("%d", &n); printf("%d", find(n)); } int find(int a) { if(a==0) return 1; if(a==1) return 0; if(a==2) return 3; if (dp[a] != 0) return dp[a]; dp[a] = 3 * find(a - 2); for (int x = 4; x
- Total
- Today
- Yesterday
- 반복문
- 자료구조
- 투 포인터
- 자바스크립트
- 알고리즘 공부
- C++
- HTML5
- 세그먼트 트리
- 유클리드 호제법
- html
- 백준
- 우선순위 큐
- 백준 풀이
- DP
- 스프링 부트 crud 게시판 구현
- 자바
- js
- c++ string
- 알고리즘
- 유니온 파인드
- CSS
- Do it!
- 에라토스테네스의 체
- 카운팅 정렬
- 스택
- BFS
- 이분 매칭
- C++ Stack
- DFS
- java
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |