전체 글

전체 글

    달이 차오른다, 가자. - 1194번

    달이 차오른다, 가자. - 1194번

    package com.company; import java.io.*; import java.util.*; public class Main { static int[][] d = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}}; 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 M = Integer.parseInt(st.nex..

    백조의 호수 - 3197번

    백조의 호수 - 3197번

    내 코드 package com.company; import java.io.*; import java.util.*; /** * 먼저 호수가 물로 변하는 시간을 저장 * 백조가 최소로 움직이는 날 구함 */ 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 R = Integer.parseInt(st.nextToken()); int C = Integer.parseInt(st.nex..

    경사로 - 14890번

    경사로 - 14890번

    내 코드 package com.company; import java.io.*; import java.util.*; 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.nextToken()); int[][] arr = new int[N + 1][N + 1]; in..

    가운데를 말해요 - 1655

    가운데를 말해요 - 1655

    내 코드 package com.company; import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringBuilder sb = new StringBuilder(); int N = Integer.parseInt(br.readLine()); PriorityQueue pqRight = new PriorityQueue(); // 중간보다 큰쪽(오른쪽) PriorityQueue pqLeft = new PriorityQue..

    주사위 굴리기 - 14499번

    주사위 굴리기 - 14499번

    내 코드 package com.company; import java.io.*; import java.util.*; public class Main { static int[][] d = {{0}, {0, 1}, {0, -1}, {-1, 0}, {1, 0}}; 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 M = Integer.parse..

    나머지 합 - 10986번

    나머지 합 - 10986번

    내 코드 package com.company; import java.io.*; import java.util.*; 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 M = Integer.parseInt(st.nextToken()); int[] sum = new int[N + 1]; int[] count..

    메시지, 국제화

    목차 메시지, 국제화 소개 스프링 메시지 소스 설정 스프링 메시지 소스 사용 웹 애플리케이션에 메시지 적용하기 웹 애플리케이션에 국제화 적용하기 메시지, 국제화 소개 메시지 악덕? 기획자가 화면에 보이는 문구가 마음에 들지 않는다고, 상품명이라는 단어를 모두 상품이름으로 고쳐달라고 하면 어떻게 해야할까? 여러 화면에 보이는 상품명, 가격, 수량 등, label 에 있는 단어를 변경하려면 다음 화면들을 다 찾아가면서 모두 변경해야 한다. 지금처럼 화면 수가 적으면 문제가 되지 않지만 화면이 수십개 이상이라면 수십개의 파일을 모두 고쳐야 한다. addForm.html , editForm.html , item.html , items.html 왜냐하면 해당 HTML 파일에 메시지가 하드코딩 되어 있기 때문이다...

    로봇 - 1726번

    로봇 - 1726번

    내 코드 package com.company; import java.io.*; import java.util.*; public class Main { // 방향 : 아래, 왼쪽, 위, 오른쪽 static int[][] d = {{1, 0}, {0, -1}, {-1, 0}, {0, 1}}; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()); int M = Integer.parseInt(st.nextToken()); int..

    탈옥 - 9376번

    탈옥 - 9376번

    내 코드 package com.company; import java.io.*; import java.util.*; // 최대한 문이 겹치도록 해야함 // -> 죄수 두명이 만나서 같이 나가도록 해서 문에 겹치도록 함 // 만나서 밖으로 나감 -> 반대로 하면 밖에서 죄수 두명이 만나는 지점까지 이동 // -> 상근이가 밖에서 안으로 들어온다고 생각해서 3명이 만나는 지점을 찾아줌 public class Main { static int[][] d = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}}; static int h, w, answer; static int[][][] route; static int[][] arr; public static void main(String[] args) t..

    욕심쟁이 판다 - 1937번

    욕심쟁이 판다 - 1937번

    내 코드 package com.company; import java.io.*; import java.util.*; public class Main { static int[][] d = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}}; static int[][] arr, dp; static int N, answer; public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = null; N = Integer.parseInt(br.readLine()); arr = new int[N..