From 9025f098c1b126fcb7d5dda09654c6e0ac6bec3a Mon Sep 17 00:00:00 2001 From: songyc macbook Date: Fri, 17 Apr 2026 13:26:21 +0900 Subject: [PATCH] baekjoon 20260417 --- code_study/Baekjoon/python/2446.py | 1 + code_study/Baekjoon/ts/11049.ts | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 code_study/Baekjoon/python/2446.py create mode 100644 code_study/Baekjoon/ts/11049.ts diff --git a/code_study/Baekjoon/python/2446.py b/code_study/Baekjoon/python/2446.py new file mode 100644 index 0000000..2bec86a --- /dev/null +++ b/code_study/Baekjoon/python/2446.py @@ -0,0 +1 @@ +print("\n".join([" "*i + "*"*(2*N-1-2*i) if i < N else " "*(2*(N-i-1)+i) + "*"*(2*N-1-2*(2*(N-i-1)+i)) for N in [int(input())] for i in range(2*N-1)])) \ No newline at end of file diff --git a/code_study/Baekjoon/ts/11049.ts b/code_study/Baekjoon/ts/11049.ts new file mode 100644 index 0000000..bee25e2 --- /dev/null +++ b/code_study/Baekjoon/ts/11049.ts @@ -0,0 +1,28 @@ +import { start } from "repl"; + +export {}; +const input = require("fs").readFileSync(0).toString().trim().split("\n"); + +const N: number = Number(input[0]); +let rc: number[][] = [] +for(let i=1; i<=N; i++) rc.push(input[i].split(" ").map(Number)); + +let dp: number[][] = Array.from({length : N}, () => new Array(N).fill(0)); + +for(let len=2; len<=N; len++) { + for(let start=0; start<=N-len; start++) { + const end: number = start + len - 1; + dp[start][end] = Number.MAX_VALUE; + + + for(let k=start; k