백준 :: BOJ :: 15685 :: 드래곤 커브 출처 : https://www.acmicpc.net/problem/15685 #include using namespace std; struct dc {int x, y, d, s;};int N, ans, arr[101][101]; dc p;int dx[] = {1,0,-1,0}, dy[] = {0,-1,0,1};bool visited[101][101];vector v; vector dir; inline bool check(int x, int y) { return arr[y][x] && arr[y + 1][x] && arr[y][x + 1] && arr[y + 1][x + 1] ? true : false; } void cal() {dir.push_back(..
[업데이트 중...] 최신 문제들 풀이 : https://2heedu.tistory.com/16919 하반기, 19 상반기, 18 하반기, 18 상반기 관련 문제 : https://2heedu.tistory.com/169 옛날 코드들은 코드를 작성한지 꽤 시간이 지나서 좋지않은 코드가 많습니다. 참고해주세요.다시 풀면서 수정해나가겠습니다. 삼성 SW 테스트 (S직군 인적성) 관련 알고리즘 문제들을 정리하였다. 백준 사이트에 있는 기출 문제와 SWEA에 있는 모의 SW 테스트 문제를 정리하였다. 문제의 분류는 직접 푼 방법으로 나누어 보았고, 난이도는 주관적인 기준이다. 문제 정리 [완전탐색]시험 감독 (기출) / 백준 13458 / 난이도 1보물상자 비밀번호 (모의 기출) / SWEA 5658 / 난이도..
백준 :: BOJ :: 14499 :: 주사위 굴리기 출처 : https://www.acmicpc.net/problem/14499 #include using namespace std; int N, M, x, y, K;int arr[20][20];vectordice = { 0,0,0,0,0,0 };int dx[] = {0,1,-1,0,0}, dy[] = {0,0,0,-1,1}; inline bool check(int i, int j) { return i >= 0 && j >= 0 && i < N && j < M ? true : false; } void Rolling(int d) {vectortmp(dice);if (d == 1) {dice[0] = tmp[3]; dice[2] = tmp[0]; dice[3..
백준 :: BOJ :: 7576 :: 토마토 출처 : https://www.acmicpc.net/problem/7576 #include using namespace std; struct a {int i, j;};int N, M, ans, result;int arr[1000][1000];int di[] = { 0,0,1,-1 }, dj[] = {1,-1,0,0};bool visited[1000][1000];queue q; inline bool check(int i, int j) { return (i >= 0 && j >= 0 && i < N && j < M) ? true : false; } int bfs() {if (ans == 0) return 0;while (!q.empty()) {int t = q.s..
백준 :: BOJ :: 2178 :: 미로탐색 출처 : https://www.acmicpc.net/problem/2178 #include using namespace std; struct a {int i, j, c;};int N, M, ans;int arr[101][101];int di[] = { 0,0,1,-1 }, dj[] = {1,-1,0,0};bool visited[101][101]; inline bool check(int i, int j) { return (i > 0 && j > 0 && i N >> M; ans = 0;for (int i = 1; i
백준 :: BOJ :: 2468 :: 안전 영역 출처 : https://www.acmicpc.net/problem/2468 #include #include #include #include using namespace std; int N, maxH, cnt, ans;int map[100][100];bool visited[100][100];int dir[4][2] = { {-1,0},{0,1},{1,0},{0,-1} };queue q; inline bool check(int i, int j, int h) { return ((i>=0 && j>=0 && i> N; maxH = 0; ans = 1;for (int i = 0; i >..
백준 :: BOJ :: 2589 :: 보물섬 출처 : https://www.acmicpc.net/problem/2589 #include #include #include #include using namespace std; int N, M, ans;int map[50][50];int depth[50][50];bool visited[50][50];int dir[4][2] = { {-1,0},{0,1},{1,0},{0,-1} };queue q; inline bool check(int i, int j) { return ((i>=0 && j>=0 && i N >> M; ans = 0;char c;for (int i = 0; i > c..
BOJ :: 백준 :: 2174 :: 로봇 시뮬레이션 출처 : https://www.acmicpc.net/problem/2174 #include #include using namespace std; struct R {int i, j, d;int r, c, n;};int N, M, n1, n2, map[101][101];int dd[4][2] = { {-1,0},{0,1},{1,0},{0,-1} };R ro[101], co[101]; int main() {std::ios::sync_with_stdio(false); cin.tie(0); cin >> M >> N; cin >> n1 >> n2; char tmp;for (int i = 1; i > ro[i].j >> ro[i].i >> tmp;if (tmp =..
BOJ :: 백준 :: 1103 :: 게임 출처 : https://www.acmicpc.net/problem/1103 #include #include using namespace std; int N, M;int map[51][51], dp[51][51];bool visited[51][51];int dir[4][2] = { {1,0},{-1,0},{0,1},{0,-1} }; inline bool check(int i, int j) { return ((i >= 0 && j >= 0 && i < N && j < M) ? true : false); } int dfs(int i, int j) {if (!check(i, j) || map[i][j] == 999) return 0;if (visited[i][j]) {..
BOJ :: 백준 :: 1937 :: 욕심쟁이 판다 출처 : https://www.acmicpc.net/problem/1937 #include #include using namespace std; int N, ans;int map[501][501], dp[501][501];int dir[4][2] = { {1,0},{-1,0},{0,1},{0,-1} }; inline bool check(int i, int j) { return ((i >= 0 && j >= 0 && i < N && j < N) ? true : false); } int dfs(int i, int j) {if (dp[i][j]) return dp[i][j];dp[i][j] = 1;for (int d = 0; d < 4; d++) {int n..
- Total
- Today
- Yesterday
- 새로운 게임 2
- 17144
- scanf
- 트렌드
- 이차원 배열과 연산
- hackerrank
- 미세먼지 안녕!
- STL
- 17140
- 2018 카카오 블라인드 채용
- 시간 복잡도
- 팁
- SW Expert Academy
- 알고리즘
- string
- 2018 KAKAO BLIND RECRUITMENT
- 17779
- 게리맨더링 2
- DP
- boj
- SWEA
- 입출력
- 역량 테스트
- 백준
- DFS
- 삼성
- 17837
- 17142
- 연구소 3
- 17143
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |