목록전체 글 (85)
hara
https://www.acmicpc.net/problem/1697 import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class a1697 { public static final int max = 100000; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int s = sc.nextInt(); int y = sc.nextInt(); boolean[] check = new boolean[max+1]; int[] dist = new int[max+1]; check[s] = true; dist[s] = 0; Queu..
https://www.acmicpc.net/problem/1107 import java.util.Scanner; public class a1107 { static boolean[] wNum = new boolean[10]; public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int wCnt = sc.nextInt(); for(int i=0 ; i len + press) { result = len + press; } } } System.out.println(result); } public static int len(int num) { if(num == 0) { if(wNum[0..
https://www.acmicpc.net/problem/1476 import java.util.Scanner; public class a1476 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int E = sc.nextInt(); int S = sc.nextInt(); int M = sc.nextInt(); int e=0, s=0, m=0, count=0; while(true) { if(e == 16) { e = 1; } if(s == 29) { s = 1; } if(m == 20) { m = 1; } if(e == E && s == S && m == M) { System.out.println(count);..
https://www.acmicpc.net/problem/10974 import java.util.Scanner; public class a10974 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int[] arr = new int[num]; for(int i=0 ; i= arr[i]) { i--; } if(i = i && arr[j]
https://www.acmicpc.net/problem/10973 import java.util.Scanner; public class a10973 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = sc.nextInt(); int[] arr = new int[num]; for(int i=0 ; i0 && arr[i-1] = arr[i-1]) { j--; } int temp = arr[i-1]; arr[i-1] = arr[j]; arr[j] = temp; j = num - 1; while(i < j) { temp = arr[i]; arr[i] = arr[j]; arr[j] = temp; i++;..
https://www.acmicpc.net/problem/10972 import java.util.Scanner; public class a10972 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int num = Integer.parseInt(sc.nextLine()); int[] arr = new int[num]; for(int i=0 ; i0 && arr[i-1] >= arr[i]) { i--; } if(i = i && arr[j]