From fc8cb14096eb79fde05471929e4ed73d675b765d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98jminkkk=E2=80=99?= <102847513+jminkkk@users.noreply.github.com> Date: Sat, 27 Jul 2024 16:48:31 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=ED=8C=A8=ED=82=A4=EC=A7=80=20=EC=95=9E?= =?UTF-8?q?=EC=97=90=20prefix=20=EB=B6=99=EB=8F=84=EB=A1=9D=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gal-create-directories.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gal-create-directories.yml b/.github/workflows/gal-create-directories.yml index 4bf2ed6..e8a2873 100644 --- a/.github/workflows/gal-create-directories.yml +++ b/.github/workflows/gal-create-directories.yml @@ -30,11 +30,14 @@ jobs: NUMBERS="${BASH_REMATCH[2]}" IFS=',' read -ra NUM_ARRAY <<< "$NUMBERS" - for NUM in "${NUM_ARRAY[@]}"; do - mkdir -p "${DIRNAME}/${NUM}" + PREFIX=({A..Z}) + for i in "${!NUM_ARRAY[@]}"; do + NUM="${NUM_ARRAY[$i]}" + PREFIX_CHAR="${PREFIX[$i]}" + mkdir -p "${DIRNAME}/${PREFIX_CHAR}_${NUM}" for GID in "${id[@]}"; do - mkdir -p "${DIRNAME}/${NUM}/${GID}" - echo -e "# Info\n[Link](https://boj.kr/${NUM})\n## ๐Ÿ’ก ํ’€์ด ๋ฐฉ๋ฒ• ์š”์•ฝ\n\n## ๐Ÿ‘€ ์‹คํŒจ ์ด์œ \n\n## ๐Ÿ™‚ ๋งˆ๋ฌด๋ฆฌ" > "${DIRNAME}/${NUM}/${GID}/README.md" + mkdir -p "${DIRNAME}/${PREFIX_CHAR}_${NUM}/${GID}" + echo -e "# Info\n[Link](https://boj.kr/${NUM})\n## ๐Ÿ’ก ํ’€์ด ๋ฐฉ๋ฒ• ์š”์•ฝ\n\n## ๐Ÿ‘€ ์‹คํŒจ ์ด์œ \n\n## ๐Ÿ™‚ ๋งˆ๋ฌด๋ฆฌ" > "${DIRNAME}/${PREFIX_CHAR}_${NUM}/${GID}/README.md" done done From cdb340138e88a00d04d31441a8c392b265c6e8e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=98jminkkk=E2=80=99?= <102847513+jminkkk@users.noreply.github.com> Date: Sat, 27 Jul 2024 16:50:33 +0900 Subject: [PATCH 2/2] remove wrong commit file --- week13/17827/jminkkk/BOJ17827.java | 32 ------------------------------ week13/17827/jminkkk/README.md | 14 ------------- 2 files changed, 46 deletions(-) delete mode 100644 week13/17827/jminkkk/BOJ17827.java diff --git a/week13/17827/jminkkk/BOJ17827.java b/week13/17827/jminkkk/BOJ17827.java deleted file mode 100644 index e28ddcb..0000000 --- a/week13/17827/jminkkk/BOJ17827.java +++ /dev/null @@ -1,32 +0,0 @@ -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; - -public class BOJ17827 { - public static void main(String[] args) throws IOException { - BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); - - String[] str = br.readLine().split(" "); - int n = Integer.parseInt(str[0]); - int m = Integer.parseInt(str[1]); - int v = Integer.parseInt(str[2]); // ์‚ฌ์ดํด์ด ์ƒ๊ธด ์ตœ์ดˆ - - str = br.readLine().split(" "); - int[] values = new int[n]; - for (int i = 0; i < n; i++) { - values[i] = Integer.parseInt(str[i]); - } - - for (int i = 0; i < m; i++) { - int k = Integer.parseInt(br.readLine()); - if (k >= n) { - k -= n; - int c = k % (n - v + 1); - System.out.println(values[c + v - 1]); - } else { - int c = k; - System.out.println(values[c]); - } - } - } -} diff --git a/week13/17827/jminkkk/README.md b/week13/17827/jminkkk/README.md index 827a5ad..7a2ae0c 100644 --- a/week13/17827/jminkkk/README.md +++ b/week13/17827/jminkkk/README.md @@ -2,20 +2,6 @@ [Link](https://boj.kr/17827) ## ๐Ÿ’ก ํ’€์ด ๋ฐฉ๋ฒ• ์š”์•ฝ -+ List์— ์—ฐ๊ฒฐ ์ธ๋ฑ์Šค์™€ ๊ฐ’์„ ์ €์žฅ -+ ์ตœ์ดˆ์˜ ์‚ฌ์ดํด(์ด๋ฏธ ๋‚˜์˜จ ๊ฐ’)์ด ์ƒ๊ธฐ๋Š” ์ง€์ ์„ ์ฐพ๊ธฐ - + ์ฐพ์•˜๋‹ค๋ฉด ๊ทธ ๊ฐ’์˜ ์ธ๋ฑ์Šค(cycleIdx)๋ฅผ ๊ธฐ์–ต - -+ ์งˆ๋ฌธ ์ˆœํšŒํ•˜๋ฉด์„œ ๋งŒ์•ฝ ๊ฐ’(i)์ด n๋ณด๋‹ค ์ž‘๋‹ค๋ฉด list.get(i) = value ์ฐพ๊ณ  -+ ๊ฐ’(i)์ด n๋ณด๋‹ค ํฌ๋‹ค๋ฉด, list์˜ ์ธ๋ฑ์Šจ๋Š n + (n-v) * ? ์ฒ˜๋Ÿผ ์ปค์ง - -์˜ˆ์ œ ์˜ˆ์‹œ ๊ฒฝ์šฐ ์•„๋ž˜์ฒ˜๋Ÿผ ๋จ - -0 1 2 3 4 5 6 7 9 (n ๋ฏธ๋งŒ) -2 3 4 5 6 7 8 9 (n ์ด์ƒ) -2 3 4 5 6 7 8 9 -2 3 4 5 6 7 8 9 - ## ๐Ÿ‘€ ์‹คํŒจ ์ด์œ  ## ๐Ÿ™‚ ๋งˆ๋ฌด๋ฆฌ