版本比较
kdt 题单 sol.
正文
增加 10 行删除 10 行
16 行未改动1718192021212223242519 行未改动4546474849495051525354555657575859606117 行未改动7980818283838485868726 行未改动114115116117118119118119120121122123124124125126127128129129130131132133231 行未改动全部展开365366367368369369370371372373152 行未改动全部展开52652752852953053053153253353434 行未改动16 行未改动 while(!(f>='0'&&f<='9')){if(f=='-') g=-1;f=getchar();} while(f>='0'&&f<='9')ans=ans*10+f-'0',f=getchar(); return ans*g;}inline void out(int x){ if(x<0){putchar('-');x=-x;} if(x<0){putchar('-');x=-x;} if(x>9) out(x/10); putchar(x%10+'0'); return;}19 行未改动 //if(l==r) return b[l]; int mid=(l+r)>>1; nth_element(b+l,b+mid,b+r+1, [type](int x,int y){return a[x].d[type]<a[y].d[type];}); int x=b[mid]; int x=b[mid]; if(l<mid) a[x].l=build(l,mid-1,(type+1)%k); if(r>mid) a[x].r=build(mid+1,r,(type+1)%k); pushup(x); return x;}inline void append(int &x){ if(x==0) return; if(x==0) return; b[++cnt]=x; append(a[x].l);append(a[x].r); x=0; return;17 行未改动 return nowans;}signed main(){ ios::sync_with_stdio(false); ios::sync_with_stdio(false); cin.tie(0);cout.tie(0); //cin>>n; n=read(); n=0,k=2;26 行未改动 { //cout<<98716193; for(register int i=0;i<k;++i) pppp=read(),xx[i]=pppp^lst; for(register int i=0;i<k;++i) pppp=read(),yy[i]=pppp^lst; lst=0; for(register int i=0;i<=18;++i) lst=0; for(register int i=0;i<=18;++i) if(rt[i]) lst+=query(rt[i]); out(lst);putchar('\n'); //cout<<lst<<'\n'; } else if(op==3) break; else if(op==3) break; //else cout<<"何意味\n"; } return 0;}/* /*在光绪二十六年 神助拳义和团慈禧太后发令 义和团向前进 要把洋鬼子全部都赶出北京拆铁道拔线杆 快毁坏火轮船 洋鬼子净灭完 大清一统江山扶清灭洋 五十五天在北京231 行未改动全部展开 else return x.id<y.id;}signed main(){ ios::sync_with_stdio(false); ios::sync_with_stdio(false); cin.tie(0);cout.tie(0); int n; cin>>n; for(int i=1;i<=n;i++)152 行未改动全部展开 else out(x/10),putchar(x%10+'0');}signed main(){ //ios::sync_with_stdio(false); //ios::sync_with_stdio(false); //cin.tie(0);cout.tie(0); n=read(),q=read(); while(q--) {34 行未改动