-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSolution_17070.java
More file actions
56 lines (56 loc) · 1.72 KB
/
Solution_17070.java
File metadata and controls
56 lines (56 loc) · 1.72 KB
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
//package baekjoon_17070;
//
//import java.util.*;
//import java.io.*;
//
//public class Solution_17070 {
// static int N;
// static int[][] status;
// static int[][] arr;
// static int count = 0;
//
// public static void main(String[] args) throws IOException {
// BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
// N = Integer.parseInt(br.readLine());
//
// status = new int[N][N]; // 파이프의 상태(가로: 1, 세로: 2, 대각선: 3)
// status[0][0] = status[0][1] = 1;
//
// arr = new int[N][N]; // 집의 상태
// for (int i = 0; i < N; i++) {
// StringTokenizer st = new StringTokenizer(br.readLine());
// for (int j = 0; j < N; j++) {
// arr[i][j] = Integer.parseInt(st.nextToken());
// }
// }
//
// dfs(0, 1, 1);
// System.out.println(count);
// }
//
// public static void dfs(int x, int y, int stat) {
// if (x == N - 1 && y == N - 1) {
// count++;
// return;
// }
//
// // 파이프 상태가 가로이거나 대각선일 경우,
// if (stat == 1 || stat == 3) {
// if (y + 1 < N && arr[x][y + 1] != 1) {
// dfs(x, y+1, 1);
// }
// }
//
// // 파이프 상태가 세로이거 대각선일 경우,
// if (stat == 2 || stat == 3) {
// if (x + 1 < N && arr[x + 1][y] != 1) {
// dfs(x+1, y, 2);
// }
// }
//
// // 파이프 상태가 대각선일 경우,
// if (x + 1 < N && y + 1 < N && arr[x + 1][y + 1] != 1 && arr[x][y + 1] != 1 && arr[x + 1][y] != 1) {
// dfs(x+1, y+1, 3);
// }
// }
//}