Problem Solving/SWEA14 SWEA-1210 Ladder 1 이동 기준 설정이 헷갈리는 문제.. import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Scanner; public class Ladder_1 { //구해야할것: 출발점의 x좌표 //가는방향: 왼쪽 오른쪽 위쪽 static int[] dr = {0,0,-1}; static int[] dc = {-1,1,0}; public static void main(String[] args) throws FileNotFoundException { System.setIn(new FileInputStream("input/ladder_1.txt")); Scanner sc = new Scanner(System.in); //.. 2021. 2. 6. [SWEA] 1289 원재의 메모리 복구하기 두번 풀었는데 첫번째 풀이방법이 좀 더 쉬웠어서 당황했던 문제 첫번째 코드 import java.io.FileInputStream; import java.io.FileNotFoundException; import java.util.Scanner; public class Solution { public static void main(String[] args) throws FileNotFoundException { //System.setIn(new FileInputStream("input/swea_1289.txt")); Scanner sc = new Scanner(System.in); int T = sc.nextInt(); for (int tc = 1; tc 2021. 2. 6. 이전 1 2 3 다음