dp ๋ฐฐ๋‚ญ ๋ฌธ์ œ

Solution rust soulution Memo ๊ฐ„๋‹จํ•œ dp ๋ฐฐ๋‚ญ ๋ฌธ์ œ // Baekjoon - 12865 // https://www.acmicpc.net/problem/12865 use std::cmp; use std::io::{self, Read, Write}; fn main() { let mut stdin = io::stdin().lock(); let mut stdout = io::stdout().lock(); let mut input = String::new(); stdin.read_to_string(&mut input).unwrap(); let mut lines = input.lines(); let mut iter = lines.next().unwrap().split_whitespace(); let n: usize = iter.next().unwrap().parse().unwrap(); let k: usize = iter.next().unwrap().parse().unwrap(); let vals: Vec<(usize, usize)> = lines .take(n) .map(|line| { let mut nums = line....

May 3, 2025

dp ์ ํ™”์‹์ด ์˜ˆ์˜๊ฒŒ ๋‚˜์˜ค๋Š” ๋ฌธ์ œ

Solution rust soulution kotlin solution Memo ์ ํ™”์‹๋งŒ ๊ตฌํ•˜๋ฉด ๋”ฑ ๋–จ์–ด์ง€๋Š” ๋ฌธ์ œ ์ ํ™”์‹ ์ž์ฒด๊ฐ€ ํ’€์ด๋ž‘ ์™„๋ฒฝํ•˜๊ฒŒ ๊ฐ™์€ ๋ฌธ์ œ // Baekjoon - 11048 // https://www.acmicpc.net/problem/11048 use std::{ cmp, io::{self, Read, Write}, }; fn main() { let mut stdin = io::stdin().lock(); let mut stdout = io::stdout().lock(); let mut input = String::new(); stdin.read_to_string(&mut input).unwrap(); let mut lines = input.lines(); let dimensions: Vec<usize> = lines .next() .unwrap() .split_whitespace() .map(|x| x.parse().unwrap()) .collect(); let y = dimensions[0]; let x = dimensions[1]; let mut candy = vec!...

May 3, 2025

์ตœ์žฅ ์ฆ๊ฐ€ ๋ถ€๋ถ„ ์ˆ˜์—ด

Solution rust soulution kotlin solution Memo ์ตœ์žฅ๋ถ€๋ถ„์ˆ˜์—ด, dp๋กœ ํ’€๋ฆฐ๋‹ค. ์‚ฌ์‹ค ์ด๊ฑด ํ’€์ด๋ฒ•์ด ๊ธฐ์–ต๋‚˜์„œ ๊ธˆ๋ฐฉ ํ’€์—ˆ๋‹ค. // Baekjoon - 11053 // https://www.acmicpc.net/problem/11053 use std::io::{self, Read, Write}; fn main() { let mut stdin = io::stdin().lock(); let mut stdout = io::stdout().lock(); let mut input = String::new(); stdin.read_to_string(&mut input).unwrap(); let mut lines = input.lines(); let _n: usize = lines.next().unwrap().parse().unwrap(); let numbers: Vec<i32> = lines .next() .unwrap() .split_whitespace() .map(|s| s.parse().unwrap()) .collect(); let mut dp = vec!...

May 3, 2025

๋˜ ๊ทธ๋ฆฌ๋”” ์‰ฌ์šด ๋ฌธ์ œ

Solution rust soulution kotlin solution Memo ๊ทธ๋ฆฌ๋”” ์ž…๋ฌธ ๋ฌธ์ œ ๊ทธ๋ฆฌ๋””๋กœ ํ’€๋ฆฐ๋‹ค๋Š” ์ง๊ด€์„ ๊ฐ–๊ธฐ๊นŒ์ง€๊ฐ€ ์–ด๋ ค์šด ๊ฒƒ ๊ฐ™๋‹ค. ๋ฐ˜๋Œ€๋กœ ๊ทธ๋ฆฌ๋””์ธ๊ฑธ ์•Œ๊ณ  ํ’€๋ฉด ์—„์ฒญ ์‰ฝ๊ฒŒ์‰ฝ๊ฒŒ ํ’€๋ฆฐ๋‹ค. // https://www.acmicpc.net/problem/1461 // Baekjoon - 1461 use std::{ cmp, io::{self, Read, Write}, }; // -1, 3 (4 5) (6 11) // (-45 -26 -18) (-9 -4), (22 40 50) fn main() { let mut stdin = io::stdin().lock(); let mut stdout = io::stdout().lock(); let mut input = String::new(); stdin....

May 3, 2025

๊ณตํ†ต ๋ถ€๋ถ„ ์ˆ˜์—ด

Solution rust soulution kotlin solution Memo ๊ณตํ†ต๋ถ€๋ถ„์ˆ˜์—ด, ๊ธฐ์–ต์ด ์•ˆ๋‚˜๊ณ  ํ‘ธ๋Š” ํŠน์ •ํ•œ ๋ฐฉ๋ฒ•์ด ์žˆ๋‹ค๋Š”๊ฒŒ ๊ธฐ์–ต๋‚˜์„œ ํ’€์ด๋ฅผ ์ฐพ์•„์„œ ๊ตฌํ˜„ํ–ˆ๋‹ค. ์ฒœ์ฒœํžˆ ์ƒ๊ฐํ–ˆ์œผ๋ฉด ํ’€์—ˆ๊ฑฐ๋‚˜ ๊ธฐ์–ต์ด ๋‚ฌ์„ ๊ฒƒ ๊ฐ™์€๋ฐ, ์ง์ „์— ํ’€์—ˆ๋˜ ๊ณตํ†ต์ˆ˜์—ด๋กœ ์ƒ๊ฐํ•˜๋‹ค๊ฐ€ ์ ํ™”์‹์— ์ง‘์ฐฉํ•˜๋‹ค ๋ชฉํ’€์—ˆ๋‹ค. // Baekjoon - 9251 // https://www.acmicpc.net/problem/9251 use std::io::{self, Read, Write}; fn main() { let mut stdin = io::stdin().lock(); let mut stdout = io::stdout().lock(); let mut input = String::new(); stdin.read_to_string(&mut input).unwrap(); let mut lines = input.lines(); let first_str: Vec<char> = lines....

May 3, 2025

Vim Index ๐Ÿฆ…

Vim Index ๐Ÿฆ… [[Neovim-Copilot-Config]] [[Vim-Profile-Log-Debugging]] [[Vim-Impove-Sheet]]

May 2, 2025

Computer Science Index ๐Ÿค–

Computer Science Index ๐Ÿค– [[OSTEP]] : ์šด์˜์ฒด์ œ ์•„์ฃผ ์‰ฌ์šด ์„ธ ๊ฐ€์ง€ ์ด์•ผ๊ธฐ [[Network]] : TCP/IP Illustrated [[Semaphore-Mutex]] : ์„ธ๋งˆํฌ์–ด์™€ ๋ฎคํ…์Šค ์ •๋ฆฌ [[effective-linux-oreily]]

May 2, 2025

Data Base Index ๐Ÿ—ƒ๏ธ

db ์ธ๋ฑ์Šค!

May 2, 2025

Backend Etc Index ๐Ÿ’ธ

๋จน๊ณ  ์‚ด๊ธฐ ์œ„ํ•ด์„œ ์•Œ์•„์•ผ ํ•˜๋Š” ๊ฒƒ๋“ค

May 2, 2025

Archived Pages ๐Ÿ“š

Inbox..?

May 2, 2025