diff --git "a/khj20006/202503/11 BOJ P5 \353\223\261\354\202\260 \353\247\210\353\213\210\354\225\204.md" "b/khj20006/202503/11 BOJ P5 \353\223\261\354\202\260 \353\247\210\353\213\210\354\225\204.md" new file mode 100644 index 00000000..0f5415dd --- /dev/null +++ "b/khj20006/202503/11 BOJ P5 \353\223\261\354\202\260 \353\247\210\353\213\210\354\225\204.md" @@ -0,0 +1,79 @@ +```java + +import java.util.*; +import java.io.*; + + +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 int N; + static List[] V; + static long[] S; + static long ans = 0; + + public static void main(String[] args) throws Exception { + + ready(); + solve(); + + bwEnd(); + + } + + static void ready() throws Exception{ + + N = Integer.parseInt(br.readLine()); + V = new List[N+1]; + S = new long[N+1]; + for(int i=1;i<=N;i++) V[i] = new ArrayList<>(); + for(int i=1;i