Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- backjoon 16173
- baekjoon 2667
- 백준 2667 java
- beakjoon 1697
- baekjoon
- 코테스터디
- BFS
- 백준 현수막
- baekjoon 4963
- dfs
- baekjoon 14714
- 단지 번호붙이기
- 점프왕 쩰리
- bytebuddyinterceptor
- baekjoon 3187
- 코테
- baekjoon 16953
- baekjoon1012
- 백준 섬의갯수
- CodingTest
- java.lang.nosuchmethoderror
- beakjoon11725
- 양치기 꿍
- baekjoon 2468
- 안전영역 java
- websecurityconfiguration
- coding test
- jsonignore
- beakjoon
- springboot
Archives
- Today
- Total
목록단지 번호붙이기 (1)
NOT FOUND
[코테] 백준 2667 단지 번호붙이기: DFS Java
https://www.acmicpc.net/problem/2667 이전 것들이랑 비슷하다.그런데 출력시 '단지의 갯수'와 '단지 별 집 갯수'를 출력해야되서 그 부분만 저장하면 된다.나는 Map을 사용했다. 1) 입력 부분 static int N; static int[][] map; static boolean[][] visit; static Map houseCount = new HashMap(); static int count = 0; // 단지 수 static int[] dx = { 0, -1, 0, 1 }; static int[] dy = { 1, 0, -1, 0 }; public static void main(String[] args) throws Numb..
coding test
2025. 5. 7. 22:49