版本比较
P15945 [JOI Final 2026] 雨落三角 / Triangular Rainfall
正文
增加 11 行删除 11 行
35 行未改动3637383940404142434413 行未改动585960616262636465665 行未改动727374757676777879809 行未改动909192939494959697984 行未改动10310410510610710710810911011111211311311411511611713 行未改动13113213313413513513613713813914014114114214314414525 行未改动1711721731741751751761771781791791801811821835 行未改动18919019119219319319419519619774 行未改动35 行未改动using pll = pair<ll, ll>;
namespace IO { const int maxn = 1 << 20;
char ibuf[maxn], *iS, *iT, obuf[maxn], *oS = obuf;
inline char gc() { return (iS == iT ? iT = (iS = ibuf) + fread(ibuf, 1, maxn, stdin), (iS == iT ? EOF : *iS++) : *iS++);13 行未改动 c = gc(); } return f ? ~(x - 1) : x; }
inline int reads(char *s) { char c = gc(); int len = 0; while (isspace(c)) {5 行未改动 } s[len] = '\0'; return len; }
inline string reads() { char c = gc(); string s; while (isspace(c)) {9 行未改动 inline void flush() { fwrite(obuf, 1, oS - obuf, stdout); oS = obuf; }
struct Flusher { ~Flusher() { flush(); }4 行未改动 flush(); } *oS++ = ch; }
inline void write(char *s) { for (int i = 0; s[i]; ++i) { pc(s[i]); } }
inline void write(const char *s) { for (int i = 0; s[i]; ++i) { pc(s[i]); }13 行未改动 while (tp != stk) { pc((*--tp) | 48); } }
template<typename T> inline void writesp(T x) { write(x); pc(' '); }
template<typename T> inline void writeln(T x) { write(x); pc('\n');25 行未改动}
struct DS { set<node> S;
inline void init() { S.emplace(0, m - 1, m); }
inline auto split(ll p) { if (p == m) { return S.end(); }5 行未改动 S.erase(it); S.emplace(u.l, p - 1, u.x); return S.emplace(p, u.r, u.x).fst; }
inline vector<node> update(ll l, ll r, ll x) { auto itr = split(r + 1), itl = split(l); vector<node> vc; r = l - 1;74 行未改动