10101

#include <iostream> #include <cstdio> #include <cstdio> #include <cstring> #include <vector> #include <cmath> #include <cstdlib> #define INF 1000000 #define ll long long using namespace std; string ans; int i=0; void check() { if(ans.size()) ans.append(1u,' '); } void banglaNumb(string s) { int len = s.size(); if(len>=8) { check(); ans.append(1u,s[i++]); ans.append(" kuti"); } if(len>=7) { if(s[i]!='0') { check();

11402

#include <iostream> #include <cstdio> #include <cstring> #include <string> #define sz 1024001 #define INV 1 #define SET 2 #define RESET 3 using namespace std; struct segment{ int pending_op_typ; int sum; int left,right; int len; }; segment tree[sz*4]; string ss; void init(int node,int b,int e) { tree[node].len = e-b+1; tree[node].left=b; tree[node].right=e; tree[node].pending_op_typ=0; if(b==e) { if(ss[b]=='1') tree[node].sum=1; else

12436

#include <iostream> #include <cstdio> #include <cstring> #include <string> #include <vector> #define ll long long #define sz 250005 using namespace std; struct segment{ ll left,right; ll len; ll first_inc,last_inc; ll totalAB; bool isSetvalue; ll cary; ll sum; }; segment arr[sz*4]; void changeAB(ll frist_incr,ll last_incr,int node,ll step) { arr[node].totalAB += step; arr[node].first_inc += frist_incr; arr[node].last_inc += last_incr;