BOJ
-
boj)1459 - 걷기PS/boj 2020. 8. 31. 19:34
import java.io.*; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); long X = Long.parseLong(st.nextToken()); // ~10억 long Y = Long.parseLong(st.nextToken()); // ~10억 long W = Long.parseLong(st.nextToken(..
-
boj)12018 - Yonsei TOTOPS/boj 2020. 8. 31. 18:06
import java.io.*; import java.util.Arrays; import java.util.Collections; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int ans = 0; StringTokenizer st = new StringTokenizer(br.readLine()); int n = Integer.parseInt(st.nextToken()); // 과목 수 int m = Integer.p..
-
boj)2012 - 등수 매기기PS/boj 2020. 8. 31. 17:14
import java.io.*; import java.util.Arrays; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int N = Integer.parseInt(br.readLine()); int[] arr = new int[N]; long ans = 0; for (int i = 0; i < arr.length; i++) { arr[i] = Integer.parseInt(br.readLine()); } Arrays.sort(arr); for (int i = 0; i < a..
-
boj)1911 - 흙길 보수하기PS/boj 2020. 8. 31. 16:42
import java.io.*; import java.util.Arrays; import java.util.Comparator; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int N = Integer.parseInt(st.nextToken()); // 웅덩이 갯수 int L = Integer.parseInt(st.n..
-
boj)8958PS/boj 2020. 8. 29. 21:19
import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int N = Integer.parseInt(br.readLine()); for (int i = 0; i < N; i++) { String str = br.readLine(); int point = 0; int ans = 0; for (int j = 0; j < str..
-
boj)4344PS/boj 2020. 8. 29. 20:55
import java.io.*; import java.util.StringTokenizer; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int N = Integer.parseInt(br.readLine()); for (int i = 0; i < N; i++) { StringTokenizer st = new StringTokenizer(br.r..
-
boj)10996PS/boj 2020. 8. 29. 19:10
import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int N = Integer.parseInt(br.readLine()); for (int i = 1; i
-
boj)2446PS/boj 2020. 8. 29. 18:27
import java.io.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); int N = Integer.parseInt(br.readLine()); int line = (2*N)-1; for (int i = 1; i