자바

· Dev/PS
import java.io.*; import java.util.*; public class Laboratory { static int[] dx = {-1, 1, 0, 0}; static int[] dy = {0, 0, -1, 1}; static BufferedReader br; static StringTokenizer st; static int n, m; static int res = Integer.MIN_VALUE; static int[][] map, copyMap, virusMap; public static void main(String[] args) throws IOException{ input(); solve(0); System.out.println(res); } static void input(..
· Dev/PS
import java.io.*; import java.util.*; public class SalePizza { static BufferedReader br; static StringTokenizer st; static int orderNum, m, n, ans; static int[] mPizzaPieces, nPizzaPieces; static List left, right; public static void main(String[] args) throws IOException{ /* 1. 피자 A의 부분합을 구한다. 2. 피자 B의 부분합을 구한다. 3. 두 배열의 합 중 정답과 일치하는 것을 고른다. 유의할 점은 피자는 원형이기 때문에 부분합을 구할 때 신경써준다. */ input(); getSu..
· Dev/PS
import java.io.*; import java.util.*; public class FourIntegersWithSumOfZero { static BufferedReader br; static StringTokenizer st; static int n; static long ans; static int[] a, b, c, d; static long[] left, right; public static void main(String[] args) throws IOException{ input(); calculate(); Arrays.sort(left); Arrays.sort(right); getSum(); System.out.println(ans); } static void input() throws..
· Dev/PS
import java.io.*; import java.util.*; public class Main { static BufferedReader br; static StringTokenizer st; static int n, s; static int[] arr; static List left; static List right; static long ans; public static void main(String[] args) throws IOException{ input(); dfs(left, arr.length/2, 0, 0); dfs(right, n, arr.length/2, 0); Collections.sort(left); Collections.sort(right); System.out.println..
· Dev/PS
import java.io.*; import java.util.*; class Point_1 { int x; int y; Point_1(int x, int y) { this.x = x; this.y = y; } } public class AlgoSpot { static int[] dx = {-1, 1, 0, 0}; static int[] dy = {0, 0, -1, 1}; static BufferedReader br; static StringTokenizer st; static int n, m; static int[][] board; static int[][] dp; public static void main(String[] args) throws IOException{ input(); System.ou..
· Dev/PS
import java.io.*; import java.util.*; public class SubTotal { static BufferedReader br; static StringTokenizer st; static int[] nums; static int n, s, ans; public static void main(String[] args) throws IOException{ input(); solve(); System.out.println(ans); } static void input() throws IOException { br = new BufferedReader(new InputStreamReader(System.in)); st = new StringTokenizer(br.readLine()..
· Dev/PS
import java.io.*; import java.util.*; class EmptyPoint { int x; int y; EmptyPoint(int x, int y) { this.x = x; this.y = y; } } public class Sudoku { private static final int N = 9; private static final int[] dx = {-1, 1, 0, 0}; private static final int[] dy = {0, 0, -1, 1}; static BufferedReader br; static StringTokenizer st; static int[][] board; static ArrayList emptyPoints; static StringBuilde..
· Dev/PS
import java.io.*; import java.util.*; class Floor { int num; int cnt; Floor(int num, int cnt) { this.num = num; this.cnt = cnt; } } public class StartLink { static BufferedReader br; static StringTokenizer st; static int f, s, g, u, d; static Floor ans; static boolean[] checked; public static void main(String[] args) throws IOException{ input(); bfs(); if(ans == null) System.out.println("use the..
· Dev/PS
import java.io.*; import java.util.*; class Rect { int x1; int y1; int x2; int y2; Rect(int x1, int y1, int x2, int y2) { this.x1 = x1; this.y1 = y1; this.x2 = x2; this.y2 = y2; } } public class Logo { static BufferedReader br; static StringTokenizer st; static int n; static int ans; static boolean[] checked; static Rect[] rectArr; static Queue q; public static void main(String[] args) throws IO..
· Dev/PS
import java.io.*; import java.util.*; public class MakingPassword { static BufferedReader br; static StringTokenizer st; static int l, c; static char[] arr; static StringBuilder sb; static Set gather; static boolean[] checked; public static void main(String[] args) throws IOException { input(); dfs(0, 0, ""); System.out.print(sb); } static void input() throws IOException{ br = new BufferedReader..
풋데브
'자바' 태그의 글 목록 (6 Page)