鱼香rose'Blog

2023广东ICPC省赛Problem B

\(\Huge{2023广东ICPC省赛Problem B.基站建设}\)

题目链接:Problem - B - Codeforces

官方题解:B - 基站建设 - SUA Wiki

题意

题目给出一段长度为\(n\)的路,再给出\(a_i\)表示在每个位置建设基站的花费;然后给出\(m\)项要求,每项要求为\([x,y]\),表示在\([x,y]\)中至少要建设一座基站。求满足所有需求的最小总成本。

数据范围:

  • \(1\le n \le 5 \times 10^5\)
  • \(1\le a_i\le 10^9\)
  • \(1\le m\le 5 \times 10^5\)
  • \(1\le x\le y \le n\)

思路

标程

posted @ 2026-01-15 21:51  鱼香_rose  阅读(0)  评论(0)    收藏  举报