์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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 |
Tags
- ๋ฐ์ดํฐ ํฉ์ฑ
- ์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌ์ ๊ณต์ํฉ๊ฒฉํ๊ธฐ
- From Machine Reading Comprehension to Dialogue State Tracking: Bridging the Gap
- SUMBT:Slot-Utterance Matching for Universal and Scalable Belief Tracking
- Zero-shot transfer learning with synthesized data for multi-domain dialogue state tracking
- ๋ฅ๋ฌ๋๊ธฐ์ด
- fasttext text classification ํ๊ธ
- DST fewshot learning
- ์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌ ์ฑ ์ถ์ฒ
- Leveraging Slot Descriptions for Zero-Shot Cross-Domain Dialogue State Tracking
- nlp๋ ผ๋ฌธ๋ฆฌ๋ทฐ
- ๋ฐฑ์ค
- ๋ค์ด๋๋ฏน ํ๋ก๊ทธ๋๋ฐ
- ํ๋ก๊ทธ๋๋จธ์ค
- dialogue state tracking
- ๋ชจ๋์๋ฅ๋ฌ๋
- Few Shot Dialogue State Tracking using Meta-learning
- classification text
- DST zeroshot learning
- ํ์ด์ฌ์ ํ์ด์ฌ๋ต๊ฒ
- few shot dst
- ์์ฐ์ด์ฒ๋ฆฌ ๋ ผ๋ฌธ ๋ฆฌ๋ทฐ
- 2020์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌํ๊ธฐ
- ๊ฒ์์์ง
- ์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌ์ ๊ณต์
- til
- MySQL
- Python
- How Much Knowledge Can You Pack Into the Parameters of a Language Model?
- ์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌ ์์ ๋น
Archives
- Today
- Total
๐ฒ์๋ผ๋๋์ฒญ๋
[๋ฐฑ์ค] Q10026 ์ ๋ก์์ฝ(java) ๋ณธ๋ฌธ
๋ฐ์ํ
dfs์๊ณ ๋ฆฌ์ฆ์ ์ด์ฉํด ํ์๋ค.
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
public class Q10026_1{
static char[][] map;
static int[][] visit1;
static int[][] visit2;
static int[] x = {-1,0,1,0};
static int[] y = {0,1,0,-1};
static int N;
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
N = Integer.parseInt(scan.nextLine());
map = new char[N][N];
for(int i=0; i<N; i++){
String temp = scan.nextLine();
for(int j=0; j<N; j++){
map[i][j] = temp.charAt(j);
}
}
int part1 =0;
int part2 =0;
visit1 = new int[N][N];
visit2 = new int[N][N];
for(int i=0 ;i<N; i++){
for(int j=0; j<N; j++){
if(visit1[i][j] == 0){
dfs1(i,j);
part1++;
}
}
}
for(int i=0 ;i<N; i++){
for(int j=0; j<N; j++){
if(visit2[i][j] == 0){
dfs2(i,j);
part2++;
}
}
}
System.out.println(part1);
System.out.println(part2);
}
public static void dfs1(int i, int j){
char c = map[i][j];
for(int k=0; k<4; k++){
int ni = i +x[k];
int nj = j + y[k];
if(ni>=0 && ni<N && nj>=0 && nj<N){
if(c == map[ni][nj] && visit1[ni][nj]==0){
visit1[ni][nj] = 1;
dfs1(ni,nj);
}
}
}
}
//red-green blind
public static void dfs2(int i, int j){
char c = map[i][j];
for(int k=0; k<4; k++){
int ni = i +x[k];
int nj = j + y[k];
if(ni>=0 && ni<N && nj>=0 && nj<N){
if(c == 'B'){
if(c == map[ni][nj] && visit2[ni][nj]==0){
visit2[ni][nj] = 1;
dfs2(ni,nj);
}
}else{
if((map[ni][nj] == 'R' || map[ni][nj] == 'G') && visit2[ni][nj]==0){
visit2[ni][nj] = 1;
dfs2(ni,nj);
}
}
}
}
}
}
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs |
๋ฐ์ํ
'์๊ณ ๋ฆฌ์ฆ ๋ฌธ์ ํ์ด' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[ํ๋ก๊ทธ๋๋จธ์ค] ์์ฃผํ์ง ๋ชปํ ์ ์(์๋ฐ, ํด์ฌ๋งต) (0) | 2019.09.28 |
---|---|
[๋ฐฑ์ค]Q2667 ๋จ์ง๋ฒํธ ๋ถ์ด๊ธฐ(java, DFS์๊ณ ๋ฆฌ์ฆ) (0) | 2019.09.27 |
Q1463 1๋ก ๋ง๋ค๊ธฐ(java) (0) | 2019.09.19 |
Q11650 ์ขํ์ ๋ ฌํ๊ธฐ(java) (0) | 2019.09.15 |
Q1181 ๋จ์ด ์ ๋ ฌ(java) (0) | 2019.09.15 |