Algorithm(218)
-
[BOJ] 1992번 : 쿼드트리
1. problem :https://www.acmicpc.net/problem/1992 2. solution 1 :#include using namespace std;int N;char picture[65][65]; bool check(int x, int y, int n) { for (int i = x; i > N; for (int i = 0; i > picture[i][j]; } } solve(0, 0, N);} 2. solution 2 :// Authored by : cpprhtn// Co-authored by : -// http://boj.kr/04267bd2251a41109700585bc73a6de2#include using namespace std;int N;const int MAX = 64..
2024.08.16 -
[BOJ] 2630 번 : 색종이 만들기
1. problem : https://www.acmicpc.net/problem/2630 2. solution 1 :#include using namespace std;int paper[129][129];int cnt[2]; int N; bool check(int x, int y, int z) { for (int i = x; i > N; for (int i = 0; i > paper[i][j]; } } solve(0, 0, N); for (int i = 0; i
2024.08.16 -
[BOJ] 1780번 : 종이의 개수
1. problem :https://www.acmicpc.net/problem/1780 2. solution 1 :#include using namespace std;int paper[2188][2188];int cnt[3]; // -1,0,1을 담는 배열; bool check(int x, int y, int n) { for (int i = x; i > N; for (int i = 0; i > paper[i][j]; } } solve(0, 0, N); for (int i = 0; i https://github.com/encrypted-def/basic-algo-lecture/blob/master/0x0B/solutions/1780.cpp > basic-algo-lecture/0x0B/solutions/..
2024.08.15 -
[BOJ] 17478 : 재귀함수가 뭔가요?
1. problem :https://www.acmicpc.net/problem/17478 2. solution 1 :// Authored by : cpprhtn// Co-authored by : -// http://boj.kr/67c805f6167e49bebd8c13e9b0df4493#include using namespace std;int N;void _bar(const char* str, int stk){ for (int j = 0; j > N; cout https://github.com/encrypted-def/basic-algo-lecture/blob/master/0x0B/solutions/17478.cpp> basic-algo-lecture/0x0B/solutions/17478.cpp at ..
2024.08.15 -
[BOJ] 11729번 : 하노이 탑 이동순서
1. problem :https://www.acmicpc.net/problem/11729 2. solution 1 :#include using namespace std;void hanoi(int a, int b, int n) { if (n == 1) { cout > n; cout https://github.com/encrypted-def/basic-algo-lecture/blob/master/0x0B/solutions/11729.cpp> basic-algo-lecture/0x0B/solutions/11729.cpp at master · encrypted-def/basic-algo-lecture바킹독의 실전 알고리즘 강의 자료. Contribute to encrypted-def/basic-algo-lec..
2024.08.15 -
[BOJ] 2206번 : 벽 부수고 이동하기
1. problem :https://www.acmicpc.net/problem/2206 2. solution 1 :#include using namespace std; int row, col;string board[1002];int dist[1002][1002][2]; //벽을 부셨을때와 그렇지 않았을때의 case를 고려 --> 3차원;int dx[4] = { 1,0,-1,0 };int dy[4] = { 0,1,0,-1 };queue> Q; int main(void) { ios::sync_with_stdio(0); cin.tie(0); cin >> row >> col; for (int i = 0; i > board[i]; } for (int i = 0; i = row || ny = col) contin..
2024.08.15