Apples
F - Apples
F - Apples Problem Statement There are apple trees lined up on a number line, and $N$ apples fall from the trees.Specifically, for each $1\leq i\leq N ......
abc327F - Apples(线段树)
https://atcoder.jp/contests/abc327/tasks/abc327_f 我们将时间看作x轴,位置看作y轴,那么我们随着时间增加,维护新加的点对区间的贡献,同时减去过时的点,线段树区间加法维护最大值即可。 #include<cstdio> #include<algorith ......
[CF1819D] Misha and Apples
Misha and Apples 只能做做评分虚高的题了,头痛浪费了一节晚自习。 但是为什么机房的同学们都觉得2500~2800算水题呢? 最终的答案一定是 \([S_1,S_x]\) 被清空,\([S_{x+1},S_n]\) 被全部放入集合。 若 \(\exists i\in[x+1,n],k_ ......
P5712 【深基3.例4】Apples
# 【深基3.例4】Apples
## 题目描述
八尾勇喜欢吃苹果。她今天吃掉了 $x$ 个苹果。英语课上学到了 apple 这个词语,想用它来造句。如果她吃了 1 个苹果,就输出 `Today, I ate 1 apple.`;如果她没有吃,那么就把 1 换成 0;如果她吃了不止一个苹果,别忘... ......