From 5ef8df02d815dc84b4af2b16497319594c2f061f Mon Sep 17 00:00:00 2001 From: oncsr Date: Wed, 5 Mar 2025 15:24:36 +0900 Subject: [PATCH] =?UTF-8?q?[20250305]=20BOJ=20/=20S1=20/=20BOJ=20=EA=B1=B0?= =?UTF-8?q?=EB=A6=AC=20/=20=EA=B6=8C=ED=98=81=EC=A4=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...05 BOJ S1 BOJ \352\261\260\353\246\254.md" | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 "khj20006/202503/05 BOJ S1 BOJ \352\261\260\353\246\254.md" diff --git "a/khj20006/202503/05 BOJ S1 BOJ \352\261\260\353\246\254.md" "b/khj20006/202503/05 BOJ S1 BOJ \352\261\260\353\246\254.md" new file mode 100644 index 00000000..8f9e9072 --- /dev/null +++ "b/khj20006/202503/05 BOJ S1 BOJ \352\261\260\353\246\254.md" @@ -0,0 +1,62 @@ +```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 int[] dp; + static char[] A; + static final int INF = (int)1e9; + + public static void main(String[] args) throws Exception { + + ready(); + solve(); + + bwEnd(); + + } + + static void ready() throws Exception{ + + N = Integer.parseInt(br.readLine()); + A = br.readLine().toCharArray(); + dp = new int[N]; + Arrays.fill(dp, INF); + + } + + static void solve() throws Exception{ + + dp[0] = 0; + for(int i=1;i