Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
5f103e6
boj20040 추가
wuchangb Jul 9, 2023
61e7e22
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 9, 2023
0cf73c8
boj16195 추가
wuchangb Jul 10, 2023
1e3c45f
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 10, 2023
0b1762a
boj7511, 15918 추가
wuchangb Jul 11, 2023
c1658b9
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 11, 2023
d0a6985
boj 20208 추가
wuchangb Jul 12, 2023
2d4f5d2
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 12, 2023
1bcb680
boj15724, 21924 추가
wuchangb Jul 12, 2023
bc8d661
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 12, 2023
70c852a
boj7490, 16926, 7662, 2115
wuchangb Jul 13, 2023
23da6cf
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 13, 2023
8568f59
boj17175, 5427, 5547 추가
wuchangb Jul 17, 2023
d0d0571
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 17, 2023
43278c1
boj9613, 17951 추가
wuchangb Jul 17, 2023
07d04b5
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 17, 2023
bee3c41
boj5430, 12865
wuchangb Jul 18, 2023
eabeb49
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 19, 2023
f8b8c30
boj13305, 1487, 16168 추가
wuchangb Jul 19, 2023
a22680a
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 19, 2023
13fe847
boj2073, 20007, 19949
wuchangb Jul 21, 2023
0ad3fbe
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 21, 2023
ee99319
boj21919, 4811 추가
wuchangb Jul 22, 2023
1480e22
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 22, 2023
fdbe0a6
boj21923 추가
wuchangb Jul 23, 2023
63b4a3a
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 23, 2023
300e938
boj12933, 14284 추가
wuchangb Jul 24, 2023
347deb1
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 24, 2023
b68af8d
boj18513, 15810 추가
wuchangb Jul 25, 2023
6b50583
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 25, 2023
a0b8645
boj3980, 2565 추가
wuchangb Jul 26, 2023
f5ea0c7
boj1166, 2469, 1922 추가
wuchangb Jul 27, 2023
ef8be4a
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 27, 2023
0d91477
boj 2470 추가
wuchangb Jul 28, 2023
7bb019f
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 28, 2023
b7e1b86
boj20546 추가
wuchangb Jul 29, 2023
0b94dce
boj 21922, 1956 추가
wuchangb Jul 30, 2023
1af5445
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Jul 30, 2023
e2b2a89
boj15270, 2293 ã추가
wuchangb Jul 31, 2023
e99fce5
boj 2110, 요격시스템 추가
wuchangb Aug 2, 2023
b09638e
fix
wuchangb Aug 2, 2023
008553e
Merge branch 'main' of https://github.com/wuchangb/TeamCodingTest int…
wuchangb Aug 2, 2023
98906d3
programmers 문제 추가
wuchangb Aug 4, 2023
c82b4c5
programmers 추가
wuchangb Aug 5, 2023
f65a496
boj14503 추가
wuchangb Aug 6, 2023
37dbb41
programmers 추가
wuchangb Aug 8, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
3 changes: 3 additions & 0 deletions out/production/JAVA3690/programmers/.idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions out/production/JAVA3690/programmers/.idea/.name

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions out/production/JAVA3690/programmers/.idea/aws.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions out/production/JAVA3690/programmers/.idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions out/production/JAVA3690/programmers/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions out/production/JAVA3690/programmers/.idea/modules.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions out/production/JAVA3690/programmers/.idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions out/production/JAVA3690/programmers/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions out/production/JAVA3690/programmers/JAVA3690.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
65 changes: 65 additions & 0 deletions src/Baekjoon/boj14503/Main.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package Baekjoon.boj14503;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;

public class Main {

static int graph[][];
static boolean visited[][];
static int N, M, answer;
static int[] dm = {0, 1, 0, -1};
static int[] dn = {-1, 0, 1, 0};

public static void main(String[] args) throws IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
StringTokenizer st = new StringTokenizer(br.readLine());
N = Integer.parseInt(st.nextToken());
M = Integer.parseInt(st.nextToken());
graph = new int[N][M];
visited = new boolean[N][M];

st = new StringTokenizer(br.readLine());
int startN = Integer.parseInt(st.nextToken());
int startM = Integer.parseInt(st.nextToken());
int startD = Integer.parseInt(st.nextToken());

for (int i = 0; i < N; i++) {
st = new StringTokenizer(br.readLine());
for (int j = 0; j < M; j++) {
graph[i][j] = Integer.parseInt(st.nextToken());
}
}
answer++;
dfs(startN, startM, startD);
System.out.println(answer);
}

static void dfs(int n, int m, int d) {
visited[n][m] = true;

for (int i = 0; i < 4; i++) {
d = getDir(d);
int nn = n + dn[d];
int mm = m + dm[d];
if (nn>=0 && nn<N && mm>=0 && mm<M && graph[nn][mm] == 0 && !visited[nn][mm]) {
answer++;
dfs(nn, mm, d);
return;
}
}

int nn = n - dn[d];
int mm = m - dm[d];
if (nn >= 0 && nn < N && mm >= 0 && mm < M && graph[nn][mm] == 0) {
dfs(nn, mm, d);
}
}

static int getDir(int d) {
if (d == 0) return 3;
else return d - 1;
}
}
2 changes: 1 addition & 1 deletion src/programmers
Submodule programmers updated from 287646 to 9e8886