仿佛没用过std::set Seniorious has n pieces of talisman. Willem puts them in a line, the i-th of which is an integer ai. In order to maintain it, Willem needs to perform m operations. There are four types of operations: 1 l r x: For each i such that l ≤ i …
题意 题目链接 Sol ODT板子题.就是用set维护连续段的大暴力.. 然鹅我抄的板子本题RE提交AC??.. 具体来说,用50 50 658073485 946088556这个数据测试下面的代码,然后在79行停住,看一下bg和i的值会发生神奇的事情.. 问题已解决,确实是那位博主写错了, 只要把split(l)和split(r + 1)反过来就行了 #include<bits/stdc++.h> #define LL long long #define int long long #def…
题目大意:有$n$个数,有$m$次$4$种操作: l r x :将$[l,r]$区间所有数加上$x$ l r x :将$[l,r]$区间所有数变成$x$ l r k :输出$[l,r]$区间第$k$大 l r x p :输出$\sum\limits_{i=l}^rs_i^x\pm $n,m\leqslant10^5$ 题解:珂朵莉树模板题 卡点:$split$中写错,写成 it==s.end() C++ Code: #include <cstdio> #include <algorith…
Willem, Chtholly and Seniorious https://codeforces.com/contest/897/problem/E time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output — Willem... — What's the matter? — It seems that there's someth…