prefix sum(2)
-
[BOJ 20971] No Time to Paint
https://www.acmicpc.net/problem/20971 20971번: No Time to Paint Bessie has recently received a painting set, and she wants to paint the long fence at one end of her pasture. The fence consists of $N$ consecutive 1-meter segments ($1\le N\le 10^5$). Bessie has 26 different colors available, which she labels with the let www.acmicpc.net - 문제 요약 Bessie는 최근 선물 받은 물감 세트로 목초지 한쪽 끝에 있는 긴 울타리(1m짜리 판자가 이어..
2023.02.14 -
[BOJ 15590] Rental Service
https://www.acmicpc.net/problem/15590 15590번: Rental Service The first line in the input contains $N$, $M$, and $R$. The next $N$ lines each contain an integer $c_i$ ($1 \leq c_i \leq 1,000,000$), indicating that Farmer John's $i$th cow can produce $c_i$ gallons of milk every day. The next $M$ lines each contain two www.acmicpc.net - 문제 요약 소의 마릿수 N, 농장 근처 상점의 개수 M, 이웃 농부의 수 R이 첫 번째 줄에 주어진다. 두 번째..
2022.05.03