版本比较
题解:P10045 [CCPC 2023 北京市赛] 线段树
正文
增加 3 行删除 3 行
47 行未改动484950515252535455565758596061616263646512 行未改动7879808182828384858669 行未改动47 行未改动 int x=0; char c=gc(); while(c<48) c=gc(); while(c>47) x=(x<<1)+(x<<3)+(c^48),c=gc(); return x; return x;}unsigned a[maxn],c[maxn][21],pw[(1<<20)+5][20];namespace Segtree{ #define ls (pos<<1) #define rs (pos<<1|1) unsigned g[20]; struct Seg{ int l,r; unsigned f[20],add; unsigned f[20],add; inline void upd(unsigned x){ add+=x; x&=1048575; for(int i=0;i<20;i++){ g[i]=0;12 行未改动 } } } inline void push_d(int pos){ if(tr[pos].add){ if(tr[pos].add){ tr[ls].upd(tr[pos].add); tr[rs].upd(tr[pos].add); tr[pos].add=0; }69 行未改动