摘要:
【题目来源】 学而思编程:x轴最大距离 【题目描述】 考虑x轴上的点组成的集合 \(S\),你需要写一个数据结构,支持以下操作: (1)+ x:添加一个坐标为 \(x\) 的点到集合 \(S\) 中。 (2)- n:删除第 \(n\) 次添加的点,添加操作按顺序从 \(1\) 编号,其他操作不参与计 阅读全文
posted @ 2026-06-14 10:45
团爸讲算法
阅读(9)
评论(0)
推荐(0)
摘要:
【题目来源】 AtCoder:C - A Walk to Cherry Blossom Viewing 【题目描述】 In the town where Takahashi lives, there are \(N\) cherry blossom spots arranged in a strai 阅读全文
posted @ 2026-06-14 10:45
团爸讲算法
阅读(11)
评论(0)
推荐(0)
摘要:
【题目来源】 AtCoder:E - Painting the Fence 【题目描述】 Takahashi has been hired to paint a fence consisting of \(N\) boards. The boards are numbered from \(1\) 阅读全文
posted @ 2026-06-14 10:45
团爸讲算法
阅读(16)
评论(0)
推荐(0)
摘要:
【题目来源】 学而思编程:修建支柱 【题目描述】 小明要建造一个台子,现在还缺两根支柱,目前有高度不同的 \(n\) 个支柱可以选择,第 \(i\) 个支柱的高度为 \(h_i\),华丽度为 \(v_i\)。多个支柱可以拼接成一根支柱,拼接后的高度等于参与拼接的支柱高度之和。 小明打算从 \(n\) 阅读全文
posted @ 2026-06-14 10:45
团爸讲算法
阅读(12)
评论(0)
推荐(0)
摘要:
【题目来源】 题目来源:vs怪物4 【题目描述】 卡罗尔和 \(1\) 只怪物在战斗,这只怪物的体力是 \(H\) 卡罗尔每次可以对 \(1\) 只怪物发起攻击,此时有以下两种情况: (1)如果被攻击的怪物的体力为 \(1\),那么这只怪物会被消灭。 (2)如果被攻击的怪物的体力 \(X>1\),那 阅读全文
posted @ 2026-06-14 10:45
团爸讲算法
阅读(12)
评论(0)
推荐(0)
摘要:
【题目来源】 AtCoder:E - Intervals That Can Be Arranged Alternately 【题目描述】 Takahashi has arranged \(N\) white and black stones in a row. The color of the \( 阅读全文
posted @ 2026-06-14 10:45
团爸讲算法
阅读(17)
评论(0)
推荐(0)
摘要:
【题目来源】 AtCoder:D - Cheapest Route 【题目描述】 Takahashi lives in a country consisting of \(N\) cities. Each city is numbered from \(1\) to \(N\), and the p 阅读全文
posted @ 2026-06-14 10:45
团爸讲算法
阅读(11)
评论(0)
推荐(0)
摘要:
【题目来源】 AtCoder:D - Control Panel Operation Sequence 【题目描述】 Takahashi performed \(N\) types of operations on a control panel with \(K\) lamps arranged 阅读全文
posted @ 2026-06-14 10:44
团爸讲算法
阅读(15)
评论(0)
推荐(0)
摘要:
【题目来源】 AtCoder:D - Returning Library Books 【题目描述】 Takahashi works as a librarian at a library. Today, he must return \(N\) books that were returned by 阅读全文
posted @ 2026-06-14 10:44
团爸讲算法
阅读(16)
评论(0)
推荐(0)
摘要:
【题目来源】 AtCoder:C - Shortest Mountain Climbing Route 【题目描述】 Takahashi enjoys mountain climbing and is planning a traverse route through a mountain rang 阅读全文
posted @ 2026-06-14 10:44
团爸讲算法
阅读(7)
评论(0)
推荐(0)
浙公网安备 33010602011771号