摘要:
```cpp include using namespace std ; inline int rd() { int x = 0 ; int f = 1 ; register char c ; define gc c = getchar() while(isspace(gc)) ; if(c == 阅读全文
摘要:
```cpp include using namespace std ; inline int rd() { int x = 0 ; int f = 1 ; register char c ; define gc c = getchar() while(isspace(gc)) ; if(c == 阅读全文
摘要:
```cpp include using namespace std ; inline int rd() { int x = 0 ; int f = 1 ; register char c ; define gc c = getchar() while(isspace(gc)) ; if(c == 阅读全文
摘要:
"$problem$" $RMQ$问题 还是用线段树 = = (线段树好难调试啊$QwQ$) 这题与 "P1440 求m区间内的最小值" 非常相似 就不仔细讲了 ~~改两个地方就AC一题~~ cpp include using namespace std ; inline int rd() { in 阅读全文
摘要:
"$problem$" 线段树 求 $RMQ$问题 $orz$ 原因是因为我的$ST$表炸了 ~~(我太弱了)~~ $RMQ$问题通常是求区间最值。 比如说 :$X Y$的最大值? 这样的问题往往无从下手 我们需要一个解决$RMQ$问题的算法。 比如说是:$ST$表 , 线段树。 其实还有单调队列的 阅读全文
摘要:
看大佬的代码都好复杂(不愧是大佬$orz$ 蒟蒻提供一种思路 因为求的是最近的车对吧$qwq$ 所以我们可以用一个$while$循环所以没必要去用什么 $for...$ 至于这是$div2$的第一题还是比较水的 cpp include define rep(i,j,n) for(register i 阅读全文