From 1913a7cef9546f83aa46a405a0b2de0cddbddfb1 Mon Sep 17 00:00:00 2001 From: oncsr Date: Thu, 6 Feb 2025 17:08:33 +0900 Subject: [PATCH] =?UTF-8?q?[20250206]=20BOJ=20/=20=EA=B3=A8=EB=93=9C3=20/?= =?UTF-8?q?=20=EB=8D=B0=EC=8A=A4=EB=85=B8=ED=8A=B8=20/=20=EA=B6=8C?= =?UTF-8?q?=ED=98=81=EC=A4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...60\354\212\244\353\205\270\355\212\270.md" | 90 +++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 "khj20006/202502/06 BOJ G3 \353\215\260\354\212\244\353\205\270\355\212\270.md" diff --git "a/khj20006/202502/06 BOJ G3 \353\215\260\354\212\244\353\205\270\355\212\270.md" "b/khj20006/202502/06 BOJ G3 \353\215\260\354\212\244\353\205\270\355\212\270.md" new file mode 100644 index 00000000..808bb491 --- /dev/null +++ "b/khj20006/202502/06 BOJ G3 \353\215\260\354\212\244\353\205\270\355\212\270.md" @@ -0,0 +1,90 @@ +```java + +import java.util.*; +import java.io.*; + +class Edge{ + int x; + long c; + Edge(int x, long c){ + this.x = x; + this.c = c; + } +} + +class Element { + long dist, cnt; + int node; + Element(long dist, long cnt, int node){ + this.dist = dist; + this.cnt = cnt; + this.node = node; + } +} + +class Main { + + // IO field + static BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); + static BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); + static StringTokenizer st; + + static void nextLine() throws Exception {st = new StringTokenizer(br.readLine());} + static int nextInt() {return Integer.parseInt(st.nextToken());} + static long nextLong() {return Long.parseLong(st.nextToken());} + static void bwEnd() throws Exception {bw.flush();bw.close();} + + // Additional field + static long[] dp; + static int[] A; + static int N, M; + + + public static void main(String[] args) throws Exception { + + ready(); + solve(); + + bwEnd(); + } + + static void ready() throws Exception{ + + nextLine(); + N = nextInt(); + M = nextInt(); + dp = new long[M+1]; + Arrays.fill(dp, -1); + A = new int[N]; + for(int i=0;i