์ผ | ์ | ํ | ์ | ๋ชฉ | ๊ธ | ํ |
---|---|---|---|---|---|---|
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
- ํ๋ก๊ทธ๋๋จธ์ค
- dialogue state tracking
- MySQL
- ํ์ด์ฌ์ ํ์ด์ฌ๋ต๊ฒ
- ๊ฒ์์์ง
- SUMBT:Slot-Utterance Matching for Universal and Scalable Belief Tracking
- Zero-shot transfer learning with synthesized data for multi-domain dialogue state tracking
- ๋ค์ด๋๋ฏน ํ๋ก๊ทธ๋๋ฐ
- DST zeroshot learning
- From Machine Reading Comprehension to Dialogue State Tracking: Bridging the Gap
- few shot dst
- ๋ชจ๋์๋ฅ๋ฌ๋
- ๋ฐฑ์ค
- ์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌ ์ฑ ์ถ์ฒ
- ์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌ์ ๊ณต์ํฉ๊ฒฉํ๊ธฐ
- classification text
- How Much Knowledge Can You Pack Into the Parameters of a Language Model?
- 2020์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌํ๊ธฐ
- Few Shot Dialogue State Tracking using Meta-learning
- ๋ฅ๋ฌ๋๊ธฐ์ด
- fasttext text classification ํ๊ธ
- ์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌ ์์ ๋น
- ์ ๋ณด์ฒ๋ฆฌ๊ธฐ์ฌ์ ๊ณต์
- DST fewshot learning
- ์์ฐ์ด์ฒ๋ฆฌ ๋ ผ๋ฌธ ๋ฆฌ๋ทฐ
- nlp๋ ผ๋ฌธ๋ฆฌ๋ทฐ
- ๋ฐ์ดํฐ ํฉ์ฑ
- til
- Leveraging Slot Descriptions for Zero-Shot Cross-Domain Dialogue State Tracking
- Python
Archives
- Today
- Total
๐ฒ์๋ผ๋๋์ฒญ๋
Q 2667 ๋จ์ง๋ฒํธ ๋ถ์ด๊ธฐ JAVA ๋ณธ๋ฌธ
๋ฐ์ํ
dfs ๋ฅผ ์ด๋ป๊ฒ ์ฐ๋๊ฑด๊ฐ ๊ณ ๋ฏผํ์๋๋ฐ ๊ตฌ๊ธ๋ง์ ํ๋ค๋ณด๋ dfs๋ฅผ ์๋ ์ ์ ์ ์ด๋ ๊ฒ ๋ค ๋ฐฉํฅ์ผ๋ก ์ฌ์ฉํ๋ ๋ฌธ์ ์ธ ๊ฒ์ ์๊ฒ ๋์๋ค.
package graph;
import java.util.*;
public class Q2667 {
static int[][]arr;
static int[][]visit;
static int[] di = {-1,0,1,0};
static int[] dj = {0 ,-1,0,1};
static int num, cnt;
public static void main(String[] args) {
Scanner scan =new Scanner(System.in);
num = Integer.parseInt(scan.nextLine());
arr = new int[num][num];
visit = new int[num][num];
ArrayList cnts = new ArrayList<Integer>();
for(int i=0; i<num; i++) {
String s = new String();
s= scan.nextLine();
for(int j=0; j<num; j++) {
if(s.charAt(j)=='0')
arr[i][j]=0;
else
arr[i][j]=1;
}
}
for(int i=0; i<num; i++) {
for(int j=0; j<num; j++) {
if(arr[i][j]==1 && visit[i][j]==0) {
cnt=0;
find(i,j);
cnts.add(cnt);
}
}
}
Collections.sort(cnts);
System.out.println(cnts.size());
for(int i=0; i<cnts.size(); i++) {
System.out.println(cnts.get(i));
}
}
//๋ฐฉ๋ฌธํ๋ค๋ฉด find =1
public static void find(int i, int j) {
visit[i][j]=1;
cnt++;
for(int k=0; k<4; k++) {
int ni = i + di[k];
int nj = j + dj[k];
if(ni>=0 && nj>=0 && ni<num && nj<num && arr[ni][nj]==1 && visit[ni][nj]==0) {
find(ni, nj);
}
}
}
}
๋ฐ์ํ
'์๊ณ ๋ฆฌ์ฆ ๋ฌธ์ ํ์ด' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Q9496 ํ ํ๋ก์ ํธ(์๊ฐ์ด๊ณผ๋ก ์คํจ) (0) | 2019.05.07 |
---|---|
Q4963 ์ฌ์ ๊ฐ์ JAVA (0) | 2019.05.07 |
array list์ Dfs, bfs(java) (0) | 2019.04.02 |
array list๋ก ๊ตฌํํ graph (0) | 2019.04.02 |
์ธ์ array๋ก ๊ทธ๋ํ ๊ตฌํ(์๋ฐ) (0) | 2019.04.02 |