전체

import java.util.Scanner; public class Main { static int[] coin; static int N; static int K; public static void main(String[] args) { Scanner sc = new Scanner(System.in); N = sc.nextInt(); K = sc.nextInt(); coin = new int[N]; for (int i = 0; i = 0; i--) { if (coin[i]
import java.util.Arrays; import java.util.Scanner; public class Main { static int[] p; static int N; public static void main(String[] args) { Scanner sc = new Scanner(System.in); N = sc.nextInt(); p = new int[N]; for (int i = 0; i < p.length; i++) p[i] = sc.nextInt(); Arrays.sort(p); int result = p[0]; for (int i = 1; i < p.length; i++) { p[i] = p[i-1] + p[i]; result += p[i]; } System.out.printl..
이번 글에서는 스프링에서 타일즈을 설정하는 방법을 알아보겠습니다. 1. [pom.xml] -> 타일즈 관련 dependency 추가 다른 디펜던시들~ ~~ ~~ org.apache.tiles tiles-core 2.2.2 org.apache.tiles tiles-extras 2.2.2 org.apache.tiles tiles-servlet 2.2.2 org.apache.tiles tiles-jsp 2.2.2 org.apache.tiles tiles-api 2.2.2 2. [servlet-context.xml] -> 타일즈 관련 설정 - 이 설정은 웹 요청이 들어올 때, 뷰리졸버로 요청에 맞는 페이지를 호출하는 설정입니다. - 지금 뷰리졸버에 대한 설정을 1번으로 해줬는데, 이는 기존의 뷰리졸버에 의한 작..
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static Queue q = new LinkedList(); static int[][] map; static boolean[][] visited; static int[] dx = {-1,1,0,0}; static int[] dy = {0,0,-1,1}; static int N; static int M; public static class Point { int x; int y; Point(int x, int y) { this.x = x; this.y = y; } } public static void bfs(Queue q) { wh..
import java.util.ArrayList; import java.util.Collections; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static int[][] map; static boolean[][] visited; static ArrayList list = new ArrayList(); static int[] dx = {-1,1,0,0}; static int[] dy = {0,0,-1,1}; static int N; public static class Point { int x; int y; Point(int x, int y) { this.x = x; th..
import java.util.Arrays; import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static int[] Min = new int[100005]; static int N; static int K; public static int bfs(int n, int k, int[] min) { Queue q = new LinkedList(); q.add(n); int move[] = new int[3]; Min[n] = 0; int next = n; while(!q.isEmpty() && next != k) { next = q.poll(); move[0] = next - 1; ..
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static int[][] arr; static boolean visited[][]; static int[] dx = {-1, 0, 1, 0}; static int[] dy = {0, -1, 0, 1}; static int N; static int M; static class Point { int x; int y; Point(int x, int y) { this.x = x; this.y = y; } } public static void bfs(int x, int y) { Queue q = new LinkedList(); q.add..
import java.util.LinkedList; import java.util.Queue; import java.util.Scanner; public class Main { static int[][] graph; static boolean visited[]; static int N; static int M; static int start; public static void dfs(int i) { visited[i] = true; System.out.print(i + " "); for (int j = 1; j
iron_jin
'분류 전체보기' 카테고리의 글 목록 (18 Page)