목록JAVA/SWEA (JAVA) (3)
천천히 빛나는
본 포스팅에서는 [활주로, 홈 방법서비스, 등산로 조성, 벌꿀채취]를 다룹니다. 4014. (모의 SW) 활주로 import java.io.*; import java.util.*; public class Solution { // 활주로는 높이가 동일한 구간에서 건설 // 높이가 다른 경우 경사로를 설치 static int N, X; // 맵크기, 경사로 높이 static int map[][]; static boolean visited[][]; static int ans; static StringBuilder sb = new StringBuilder(); // 건설 static void construction() { visited = new boolean[N][N]; boolean success; // 가..
이번 포스팅에서는 [Ladder1, 달팽이 숫자, 파리퇴치]를 다룹니다 1210. Ladder1 import java.io.*; import java.util.*; public class Solution { static int[] dx = { 1, 0, 0 }; static int[] dy = { 0, -1, 1 }; static int[][] map = new int[100][100]; static boolean[][] visited; static class Pair { int first; int second; Pair(int first, int second) { this.first = first; this.second = second; } } static boolean ladder(int r, int..
Day 1에서는 [원재의 메모리 복구하기, 농작물 수확하기]를 다룹니다. 1289. 원재의 메모리 복구하기 (D3) import java.io.*; class Solution { static int initCount(String m) { int cnt = m.charAt(0) - '0'; for(int i = 0; i < m.length()-1; i++) { if(m.charAt(i) != m.charAt(i+1)) cnt++; } return cnt; } public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBu..