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