Skip to content

Commit

Permalink
Merge branch 'main' into 23-alstjr7437
Browse files Browse the repository at this point in the history
  • Loading branch information
tgyuuAn authored May 10, 2024
2 parents 31c44f4 + a13af6f commit cd17ca4
Show file tree
Hide file tree
Showing 12 changed files with 266 additions and 29 deletions.
27 changes: 15 additions & 12 deletions SeongHoonC/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,19 @@
| 4์ฐจ์‹œ | 2024.01.24 | ๊ตฌํ˜„ | <a href="https://school.programmers.co.kr/learn/courses/30/lessons/148653#">๋งˆ๋ฒ•์˜ ์—˜๋ฆฌ๋ฒ ์ดํ„ฐ</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/11 |
| 5์ฐจ์‹œ | 2024.01.27 | ๊ทธ๋ฆฌ๋”” | <a href="https://school.programmers.co.kr/learn/courses/30/lessons/172927">๊ด‘๋ฌผ ์บ๊ธฐ</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/13 |
| 6์ฐจ์‹œ | 2024.02.05 | ํ/์Šคํƒ | <a href="https://school.programmers.co.kr/learn/courses/30/lessons/42587"></a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/20 |
| 7์ฐจ์‹œ | 2024.02.08 | DP | <a href="https://www.acmicpc.net/problem/1932"></a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/23 |
| 8์ฐจ์‹œ | 2024.02.14 | ์ •๋ ฌ | <a href="https://www.acmicpc.net/problem/18870"></a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/26 |
| 9์ฐจ์‹œ | 2024.02.21 | bfs | <a href="https://www.acmicpc.net/problem/21736"></a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/35 |
| 10์ฐจ์‹œ | 2024.02.23 | ๊ทธ๋ฆฌ๋”” | <a href="https://www.acmicpc.net/problem/1931"></a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/38 |
| 11์ฐจ์‹œ | 2024.02.26 | ์žฌ๊ท€ | <a href="https://www.acmicpc.net/problem/1074"></a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/40 |
| 12์ฐจ์‹œ | 2024.02.29 | ๋ถ„ํ• ์ •๋ณต | <a href="https://www.acmicpc.net/problem/2630"></a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/45 |
| 13์ฐจ์‹œ | 2024.03.03 | bfs | <a href="https://www.acmicpc.net/problem/14940"></a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/49 |
| 14์ฐจ์‹œ | 2024.03.06 | dfs | <a href="https://school.programmers.co.kr/learn/courses/30/lessons/64064"></a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/50 |
| 15์ฐจ์‹œ | 2024.03.09 | ๋ถ„ํ• ์ •๋ณต | <a href="https://www.acmicpc.net/problem/1629"></a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/55 |
| 16์ฐจ์‹œ | 2024.03.14 | ๋ˆ„์ ํ•ฉ | <a href="https://www.acmicpc.net/problem/11659"></a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/60 |
| 17์ฐจ์‹œ | 2024.03.17 | ํŠน์ •ํ•œ ์ตœ๋‹จ ๊ฒฝ๋กœ | <a href="https://www.acmicpc.net/problem/1504"></a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/62 |
| 18์ฐจ์‹œ | 2024.03.28 | ๊ตฌํ˜„ | <a href="https://www.acmicpc.net/problem/16234"></a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/70 |
| 7์ฐจ์‹œ | 2024.02.08 | DP | <a href="https://www.acmicpc.net/problem/1932">์ •์ˆ˜ ์‚ผ๊ฐํ˜•</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/23 |
| 8์ฐจ์‹œ | 2024.02.14 | ์ •๋ ฌ | <a href="https://www.acmicpc.net/problem/18870">์ขŒํ‘œ ์••์ถ•</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/26 |
| 9์ฐจ์‹œ | 2024.02.21 | bfs | <a href="https://www.acmicpc.net/problem/21736">ํ—Œ๋‚ด๊ธฐ๋Š” ์นœ๊ตฌ๊ฐ€ ํ•„์š”ํ•ด</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/35 |
| 10์ฐจ์‹œ | 2024.02.23 | ๊ทธ๋ฆฌ๋”” | <a href="https://www.acmicpc.net/problem/1931">ํšŒ์˜์‹ค ๋ฐฐ์ •</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/38 |
| 11์ฐจ์‹œ | 2024.02.26 | ์žฌ๊ท€ | <a href="https://www.acmicpc.net/problem/1074">Z</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/40 |
| 12์ฐจ์‹œ | 2024.02.29 | ๋ถ„ํ• ์ •๋ณต | <a href="https://www.acmicpc.net/problem/2630">์ƒ‰์ข…์ด ๋งŒ๋“ค๊ธฐ</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/45 |
| 13์ฐจ์‹œ | 2024.03.03 | bfs | <a href="https://www.acmicpc.net/problem/14940">์‰ฌ์šด ์ตœ๋‹จ๊ฑฐ๋ฆฌ</a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/49 |
| 14์ฐจ์‹œ | 2024.03.06 | dfs | <a href="https://school.programmers.co.kr/learn/courses/30/lessons/64064">๋ถˆ๋Ÿ‰ ์‚ฌ์šฉ์ž</a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/50 |
| 15์ฐจ์‹œ | 2024.03.09 | ๋ถ„ํ• ์ •๋ณต | <a href="https://www.acmicpc.net/problem/1629">๊ณฑ์…ˆ</a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/55 |
| 16์ฐจ์‹œ | 2024.03.14 | ๋ˆ„์ ํ•ฉ | <a href="https://www.acmicpc.net/problem/11659">๊ตฌ๊ฐ„ ํ•ฉ ๊ตฌํ•˜๊ธฐ 4</a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/60 |
| 17์ฐจ์‹œ | 2024.03.17 | ๋‹ค์ต์ŠคํŠธ๋ผ | <a href="https://www.acmicpc.net/problem/1504">ํŠน์ •ํ•œ ์ตœ๋‹จ ๊ฒฝ๋กœ</a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/62 |
| 18์ฐจ์‹œ | 2024.03.28 | ๊ตฌํ˜„ | <a href="https://www.acmicpc.net/problem/16234">์ธ๊ตฌ์ด๋™</a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/70 |
| 19์ฐจ์‹œ | 2024.04.04 | ๊ทธ๋ฆฌ๋”” | <a href="https://www.acmicpc.net/problem/16496">ํฐ ์ˆ˜ ๋งŒ๋“ค๊ธฐ</a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/72 |
| 20์ฐจ์‹œ | 2024.04.07 | DP | <a href="https://www.acmicpc.net/problem/7579">์•ฑ</a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/75 |
| 21์ฐจ์‹œ | 2024.04.11 | DP | <a href="https://www.acmicpc.net/problem/1149">RGB๊ฑฐ๋ฆฌ</a> |https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/77 |
---
27 changes: 27 additions & 0 deletions SeongHoonC/dp/RGB๊ฑฐ๋ฆฌ.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import java.io.BufferedReader
import java.io.InputStreamReader

const val MAX = 987_654_321
val colors = 1..3
fun main() {
val br = BufferedReader(InputStreamReader(System.`in`))
val n = br.readLine().toInt()
val graph = Array(4) { Array(n + 1) { 0 } }
val dp = Array(4) { Array(n + 1) { 0 } }
for (i in 0 until n) {
val line = br.readLine().split(" ").map { it.toInt() }
for (j in 0..2) {
graph[j + 1][i + 1] = line[j]
}
}

// ๊ฐ ์ง‘๋งˆ๋‹ค ํ˜„์žฌ ์ด ์ƒ‰์„ ์น ํ•  ๋•Œ ์ตœ์†Œ๊ฐ’์„ ๊ตฌํ•œ๋‹ค
for (houseIndex in 1..n) {
for (colorIndex in colors) {
dp[colorIndex][houseIndex] = colors.minOf {
if (it == colorIndex) MAX else dp[it][houseIndex - 1] + graph[colorIndex][houseIndex]
}
}
}
println(colors.minOf { dp[it][n] })
}
34 changes: 34 additions & 0 deletions SeongHoonC/dp/์•ฑ.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import java.io.BufferedReader
import java.io.InputStreamReader
import kotlin.math.max
import kotlin.math.min

const val MAX_COST = 10_000
fun main() {
val br = BufferedReader(InputStreamReader(System.`in`))
val (n, m) = br.readLine().split(" ").map { it.toInt() }

// ๋น„์šฉ์˜ ์ตœ๋Œ€๋Š” 100 * 100 ์ด๋‹ค
val dp = Array(n + 1) { Array(MAX_COST + 1) { 0 } }
val bytes = listOf(0) + br.readLine().split(" ").map { it.toInt() }
val cost = listOf(0) + br.readLine().split(" ").map { it.toInt() }

var minCost = Int.MAX_VALUE
for (i in 1..n) {
for (j in 0..MAX_COST) {
// ๋‹ด์„ ์ˆ˜ ์—†๋‹ค๋ฉด ์ด์ „์— i-1 ๊นŒ์ง€ ๋‹ด์•„๋†“์€ ๊ฒƒ ๊ทธ๋Œ€๋กœ
if (j - cost[i] < 0) {
dp[i][j] = dp[i - 1][j]
continue
}
// ๋‹ด์„ ์ˆ˜ ์žˆ๋‹ค๋ฉด ํ˜„์žฌ ๋น„์šฉ - ์•ฑ์˜ ๋น„์šฉ ์ตœ์ ๊ฐ’์— ์–ป์„ ์ˆ˜ ์žˆ๋Š” ์šฉ๋Ÿ‰ ๋”ํ•˜๊ธฐ
dp[i][j] = max(dp[i - 1][j], dp[i - 1][j - cost[i]] + bytes[i])

// ๋ชฉํ‘œ ์šฉ๋Ÿ‰์„ ๋„˜์—ˆ๋‹ค๋ฉด ์ •๋‹ต ์ตœ์†Œ๊ฐ’ ์—…๋ฐ์ดํŠธ
if (dp[i][j] >= m) {
minCost = min(minCost, j)
}
}
}
println(minCost)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import java.io.BufferedReader
import java.io.InputStreamReader
import java.util.PriorityQueue

fun main() {
val br = BufferedReader(InputStreamReader(System.`in`))
val n = br.readLine().toInt()
val numbers = br.readLine().split(" ")
val queue = PriorityQueue<Target>()
numbers.forEach {
queue.add(Target(it))
}
val stringBuilder = StringBuilder()
while (queue.isNotEmpty()) {
stringBuilder.append(queue.poll().number)
}
if (stringBuilder.all { it == '0' }) {
println(0)
return
}
println(stringBuilder.toString())
}

data class Target(val number: String) : Comparable<Target> {
override fun compareTo(other: Target): Int {
return if (number + other.number > other.number + number) -1 else 1
}
}
3 changes: 2 additions & 1 deletion alstjr7437/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
| 17์ฐจ์‹œ | 2024.03.16 | DP | <a href="https://www.acmicpc.net/problem/2228">๊ตฌ๊ฐ„ ๋‚˜๋ˆ„๊ธฐ</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/61 |
| 18์ฐจ์‹œ | 2024.03.23 | ๋‹ค์ต์ŠคํŠธ๋ผ | <a href="https://www.acmicpc.net/problem/1753">์ตœ๋‹จ ๊ฒฝ๋กœ</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/66 |
| 19์ฐจ์‹œ | 2024.03.27 | ๋ฌธ์ž์—ด | <a href="https://www.acmicpc.net/problem/5525">IOIOI</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/67 |
| 20์ฐจ์‹œ | 2024.04.03 | BFS | <a href="https://www.acmicpc.net/problem/1697">์ˆจ๋ฐ”๊ผญ์งˆ</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/70 |
| 22์ฐจ์‹œ | 2024.04.13 | BFS | <a href="https://www.acmicpc.net/problem/11724">์—ฐ๊ฒฐ ์š”์†Œ์˜ ๊ฐœ์ˆ˜</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/78 |
| 21์ฐจ์‹œ | 2024.04.06 | ๋น„ํŠธ๋งˆ์Šคํ‚น | <a href="https://www.acmicpc.net/problem/11723">์ง‘ํ•ฉ</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/74 |
| 22์ฐจ์‹œ | 2024.04.13 | BFS | <a href="https://www.acmicpc.net/problem/11724">์—ฐ๊ฒฐ ์š”์†Œ์˜ ๊ฐœ์ˆ˜</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/78 |
| 23์ฐจ์‹œ | 2024.05.01 | ํ | <a href="https://school.programmers.co.kr/learn/courses/30/lessons/42587">ํ”„๋กœ์„ธ์Šค</a> | https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/79 |
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

for _ in range(m):
cmd = input().split()
print(result)

if cmd[0] == "add":
result |= (1 << int(cmd[1]))
Expand Down
19 changes: 19 additions & 0 deletions wkdghdwns199/ACM-25192.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import sys
input = sys.stdin.readline
N = int(input())
emoji_using_users = set()
time_for_emoji_use = False
emoji_use_count = 0
for _ in range(N):
chat_string = input().rstrip()
if chat_string == 'ENTER' :
if time_for_emoji_use :
emoji_use_count += len(emoji_using_users)
else :
time_for_emoji_use = True
emoji_using_users = set()
else :
emoji_using_users.add(chat_string)

emoji_use_count+=len(emoji_using_users)
print(emoji_use_count)
25 changes: 25 additions & 0 deletions wkdghdwns199/ACM-26069.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import sys
input = sys.stdin.readline
N = int(input())
dancingCheck = {}
dancingCheck['ChongChong'] = True
for _ in range(N):
left_rabbit, right_rabbit = map(str, input().split())
try :
if dancingCheck[left_rabbit]:
dancingCheck[right_rabbit] = True
except :
dancingCheck[left_rabbit] = False

try :
if dancingCheck[right_rabbit] :
dancingCheck[left_rabbit] = True
except :
dancingCheck[right_rabbit] = False

count=0
for key in dancingCheck.keys():
if dancingCheck[key] == True:
count+=1

print(count)
35 changes: 19 additions & 16 deletions wkdghdwns199/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,23 @@

| ์ฐจ์‹œ | ๋‚ ์งœ | ๋ฌธ์ œ์œ ํ˜• | ๋งํฌ | ํ’€์ด |
|:----:|:---------:|:----:|:-----:|:----:|
| 1์ฐจ์‹œ | 2024.01.22 | ์ง‘ํ•ฉ๊ณผ ๋งต | <a href="https://www.acmicpc.net/problem/11478">์„œ๋กœ ๋‹ค๋ฅธ ๋ถ€๋ถ„ ๋ฌธ์ž์—ด์˜ ๊ฐœ์ˆ˜</a> | <a href="">2024.01.22</a> |
| 2์ฐจ์‹œ | 2024.01.24 | ์ง‘ํ•ฉ๊ณผ ๋งต | <a href="https://www.acmicpc.net/problem/1620">๋‚˜๋Š”์•ผ ํฌ์ผ“๋ชฌ ๋งˆ์Šคํ„ฐ ์ด๋‹ค์†œ</a> | <a href="">2024.01.24</a> |
| 3์ฐจ์‹œ | 2024.01.28 | ์•ฝ์ˆ˜, ๋ฐฐ์ˆ˜์™€ ์†Œ์ˆ˜ | <a href="https://www.acmicpc.net/problem/2485">๊ฐ€๋กœ์ˆ˜</a> | <a href="">2024.01.28</a> |
| 4์ฐจ์‹œ | 2024.01.30 | ์•ฝ์ˆ˜, ๋ฐฐ์ˆ˜์™€ ์†Œ์ˆ˜ | <a href="https://www.acmicpc.net/problem/4134">๋‹ค์Œ ์†Œ์ˆ˜</a> | <a href="">2024.01.30</a> |
| 5์ฐจ์‹œ | 2024.02.14 | ์•ฝ์ˆ˜, ๋ฐฐ์ˆ˜์™€ ์†Œ์ˆ˜ | <a href="https://www.acmicpc.net/problem/17103">๋‹ค์Œ ์†Œ์ˆ˜</a> | <a href="">2024.02.14</a> |
| 6์ฐจ์‹œ | 2024.02.16 | ์•ฝ์ˆ˜, ๋ฐฐ์ˆ˜์™€ ์†Œ์ˆ˜ | <a href="https://www.acmicpc.net/problem/13909">์ฐฝ๋ฌธ ๋‹ซ๊ธฐ</a> | <a href="">2024.02.16</a> |
| 7์ฐจ์‹œ | 2024.02.20 | ์Šคํƒ,ํ,๋ฑ | <a href="https://www.acmicpc.net/problem/24511">queuestack</a> | <a href="">2024.02.20</a> |
| 8์ฐจ์‹œ | 2024.02.23 | ์Šคํƒ, ํ, ๋ฑ | <a href="https://www.acmicpc.net/problem/12789">๋„ํ‚ค๋„ํ‚ค ๊ฐ„์‹๋“œ๋ฆฌ๋ฏธ</a> | <a href="">2024.02.23</a> |
| 9์ฐจ์‹œ | 2024.02.26 | ์Šคํƒ, ํ, ๋ฑ | <a href="https://www.acmicpc.net/problem/2346">ํ’์„  ํ„ฐ๋œจ๋ฆฌ๊ธฐ</a> | <a href="">2024.02.26</a> |
| 10์ฐจ์‹œ | 2024.02.29 | ์Šคํƒ, ํ, ๋ฑ | <a href="https://www.acmicpc.net/problem/18258">ํ 2</a> | <a href="">2024.02.29</a> |
| 11์ฐจ์‹œ | 2024.03.03 | ์Šคํƒ, ํ, ๋ฑ | <a href="https://www.acmicpc.net/problem/11866">์š”์„ธํ‘ธ์Šค ๋ฌธ์ œ 0</a> | <a href="">2024.03.03</a> |
| 12์ฐจ์‹œ | 2024.03.06 | DP | <a href="https://www.acmicpc.net/problem/1010">๋‹ค๋ฆฌ ๋†“๊ธฐ</a> | <a href="">2024.03.06</a> |
| 13์ฐจ์‹œ | 2024.03.09 | DP | <a href="https://www.acmicpc.net/problem/1932">์ •์ˆ˜ ์‚ผ๊ฐํ˜•</a> | <a href="">2024.03.09</a> |
| 14์ฐจ์‹œ | 2024.03.13 | ์ง‘ํ•ฉ๊ณผ ๋งต | <a href="https://www.acmicpc.net/problem/20920">์˜๋‹จ์–ด ์•”๊ธฐ๋Š” ๊ดด๋กœ์›Œ</a> | <a href="">2024.03.13</a> |
| 15์ฐจ์‹œ | 2024.03.20 | ์šฐ์„ ์ˆœ์œ„ ํ | <a href="https://www.acmicpc.net/problem/11286">์ ˆ๋Œ“๊ฐ’ ํž™</a> | <a href="">2024.03.20</a> |
| 16์ฐจ์‹œ | 2024.03.23 | ์กฐํ•ฉ๋ก  | <a href="https://www.acmicpc.net/problem/11050">์ดํ•ญ ๊ณ„์ˆ˜ 1 </a> | <a href="">2024.03.23</a> |
| 1์ฐจ์‹œ | 2024.01.22 | ์ง‘ํ•ฉ๊ณผ ๋งต | <a href="https://www.acmicpc.net/problem/11478">์„œ๋กœ ๋‹ค๋ฅธ ๋ถ€๋ถ„ ๋ฌธ์ž์—ด์˜ ๊ฐœ์ˆ˜</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/9">2024.01.22</a> |
| 2์ฐจ์‹œ | 2024.01.24 | ์ง‘ํ•ฉ๊ณผ ๋งต | <a href="https://www.acmicpc.net/problem/1620">๋‚˜๋Š”์•ผ ํฌ์ผ“๋ชฌ ๋งˆ์Šคํ„ฐ ์ด๋‹ค์†œ</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/12">2024.01.24</a> |
| 3์ฐจ์‹œ | 2024.01.28 | ์•ฝ์ˆ˜, ๋ฐฐ์ˆ˜์™€ ์†Œ์ˆ˜ | <a href="https://www.acmicpc.net/problem/2485">๊ฐ€๋กœ์ˆ˜</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/16">2024.01.28</a> |
| 4์ฐจ์‹œ | 2024.01.30 | ์•ฝ์ˆ˜, ๋ฐฐ์ˆ˜์™€ ์†Œ์ˆ˜ | <a href="https://www.acmicpc.net/problem/4134">๋‹ค์Œ ์†Œ์ˆ˜</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/18">2024.01.30</a> |
| 5์ฐจ์‹œ | 2024.02.14 | ์•ฝ์ˆ˜, ๋ฐฐ์ˆ˜์™€ ์†Œ์ˆ˜ | <a href="https://www.acmicpc.net/problem/17103">๋‹ค์Œ ์†Œ์ˆ˜</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/27">2024.02.14</a> |
| 6์ฐจ์‹œ | 2024.02.16 | ์•ฝ์ˆ˜, ๋ฐฐ์ˆ˜์™€ ์†Œ์ˆ˜ | <a href="https://www.acmicpc.net/problem/13909">์ฐฝ๋ฌธ ๋‹ซ๊ธฐ</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/31">2024.02.16</a> |
| 7์ฐจ์‹œ | 2024.02.20 | ์Šคํƒ,ํ,๋ฑ | <a href="https://www.acmicpc.net/problem/24511">queuestack</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/34">2024.02.20</a> |
| 8์ฐจ์‹œ | 2024.02.23 | ์Šคํƒ, ํ, ๋ฑ | <a href="https://www.acmicpc.net/problem/12789">๋„ํ‚ค๋„ํ‚ค ๊ฐ„์‹๋“œ๋ฆฌ๋ฏธ</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/36">2024.02.23</a> |
| 9์ฐจ์‹œ | 2024.02.26 | ์Šคํƒ, ํ, ๋ฑ | <a href="https://www.acmicpc.net/problem/2346">ํ’์„  ํ„ฐ๋œจ๋ฆฌ๊ธฐ</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/42">2024.02.26</a> |
| 10์ฐจ์‹œ | 2024.02.29 | ์Šคํƒ, ํ, ๋ฑ | <a href="https://www.acmicpc.net/problem/18258">ํ 2</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/44">2024.02.29</a> |
| 11์ฐจ์‹œ | 2024.03.03 | ์Šคํƒ, ํ, ๋ฑ | <a href="https://www.acmicpc.net/problem/11866">์š”์„ธํ‘ธ์Šค ๋ฌธ์ œ 0</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/47">2024.03.03</a> |
| 12์ฐจ์‹œ | 2024.03.06 | DP | <a href="https://www.acmicpc.net/problem/1010">๋‹ค๋ฆฌ ๋†“๊ธฐ</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/51">2024.03.06</a> |
| 13์ฐจ์‹œ | 2024.03.09 | DP | <a href="https://www.acmicpc.net/problem/1932">์ •์ˆ˜ ์‚ผ๊ฐํ˜•</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/54">2024.03.09</a> |
| 14์ฐจ์‹œ | 2024.03.13 | ์ง‘ํ•ฉ๊ณผ ๋งต | <a href="https://www.acmicpc.net/problem/20920">์˜๋‹จ์–ด ์•”๊ธฐ๋Š” ๊ดด๋กœ์›Œ</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/59">2024.03.13</a> |
| 15์ฐจ์‹œ | 2024.03.20 | ์šฐ์„ ์ˆœ์œ„ ํ | <a href="https://www.acmicpc.net/problem/11286">์ ˆ๋Œ“๊ฐ’ ํž™</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/63">2024.03.20</a> |
| 16์ฐจ์‹œ | 2024.03.23 | ์กฐํ•ฉ๋ก  | <a href="https://www.acmicpc.net/problem/11050">์ดํ•ญ ๊ณ„์ˆ˜ 1 </a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/65">2024.03.23</a> |
| 17์ฐจ์‹œ | 2024.03.27 | DP | <a href="https://www.acmicpc.net/problem/9184">์‹ ๋‚˜๋Š” ํ•จ์ˆ˜ ์‹คํ–‰</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/68">2024.03.27</a> |
| 18์ฐจ์‹œ | 2024.04.03 | ์ง‘ํ•ฉ๊ณผ ๋งต | <a href="https://www.acmicpc.net/problem/26069">์ ˆ๋Œ“๊ฐ’ ํž™</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/73">2024.04.03</a> |
| 19์ฐจ์‹œ | 2024.04.07 | ์กฐํ•ฉ๋ก  | <a href="https://www.acmicpc.net/problem/25192">์ธ์‚ฌ์„ฑ ๋ฐ์€ ๊ณฐ๊ณฐ์ด</a> | <a href="https://github.com/AlgoLeadMe/AlgoLeadMe-6/pull/76">2024.04.07</a> |

25 changes: 25 additions & 0 deletions wkdghdwns199/๋™์ _๊ณ„ํš๋ฒ•_1/ACM-24416.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import sys
input = sys.stdin.readline

def fib(n) :
global countFib
if n==1 or n==2:
countFib += 1
return 1
else :
return fib(n-1) + fib(n-2)

def fibo(n):
global countFibo
f = [0 for _ in range(n+1)]
f[1] = f[2] = 1
for idx in range(3, n+1):
countFibo+=1
f[idx] = f[idx-1] + f[idx-2]
return f[n]

N = int(input())
countFib = countFibo = 0
fib(N)
fibo(N)
print(countFib, countFibo)
25 changes: 25 additions & 0 deletions wkdghdwns199/๋™์ _๊ณ„ํš๋ฒ•_1/ACM-9184.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import sys
input = sys.stdin.readline

def w(a,b,c):
if a<=0 or b<=0 or c<=0 :
return 1
if a>20 or b>20 or c>20:
return w(20,20,20)
if dp[a][b][c] :
return dp[a][b][c]
if a<b<c:
dp[a][b][c] = w(a,b,c-1)+w(a,b-1,c-1)-w(a,b-1,c)
return dp[a][b][c]
dp[a][b][c] = w(a-1,b,c)+w(a-1,b-1,c)+w(a-1,b,c-1)-w(a-1,b-1,c-1)
return dp[a][b][c]


dp = [[[0] * 21 for _ in range(21)] for _ in range(21)]

while True:
a,b,c = map(int, input().split())
if a==b==c==-1 : break
print(f'w({a}, {b}, {c}) = {w(a,b,c)}')


46 changes: 46 additions & 0 deletions wkdghdwns199/๋ฆฌ๋ทฐํ’€์ด/ACM-16234.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import sys
from collections import deque
input = sys.stdin.readline
N,L,R = map(int, input().split())
country = [list(map(int, input().split())) for _ in range(N)]
q = deque()
#์—ฐํ•ฉ์ด ๋  ์ˆ˜ ์žˆ์„์ง€ ํ™•์ธ ํ›„ ์—ฐ๋ž์ด ๋˜๋ฉด ์ €์žฅ
dx = [1,0,-1,0]
dy = [0,1,0,-1]

def bfs(x,y):
q.append((x,y))
union=[]
union.append((x,y))
while q:
a,b = q.popleft()
for i in range(4):
na = a + dx[i]
nb = b + dy[i]
if na >= N or nb>= N or nb<0 or na <0 or visited[na][nb]==1:
continue
if R>=abs(country[a][b]-country[na][nb]) >= L:
visited[na][nb] = 1
q.append((na,nb))
union.append((na,nb))
if len(union)<=1:
return 0
result=sum(country[a][b] for a,b in union) // len(union)
for a,b in union:
country[a][b] = result

return 1
day=0

while True :
stop = 0
visited = [[0]*N for _ in range(N)]
for i in range(N):
for j in range(N):
if visited[i][j] == 0:
visited[i][j] = 1
stop += bfs(i,j)
if stop ==0:
break
day+=1
print(day)

0 comments on commit cd17ca4

Please sign in to comment.