Posts

Showing posts from July, 2016

CF: Edu Round-15 (702E) [ SparseTable Logic ]

CF: Edu Round- 15 (702E) [ SparseTable Logic ] ///==================================================/// /// HELLO WORLD !! /// /// IT'S ME /// /// BISHAL GAUTAM /// /// [ bsal.gautam16@gmail.com ] /// ///==================================================/// #include<bits/stdc++.h> # define X first # define Y second # define mpp make_pair # define nl printf("\n") # define SZ (x) (int)(x.size()) # define pb (x) push_back(x) # define pii pair<int,int> # define piii pair< int ,pair<int,int> > # define pll pair<ll,ll> ///--------------------- # define S (a) scanf("%d",&a) # define P (a) printf("%d",a) # define SL (a) scanf("%lld",&a) # define S2 (a,b) scanf("%d%d",&a,&b) # define SL2 (a,b) scanf("%lld%lld",&a,&b) ///--------

MO's on Tree- So Close Yet So Far(Codechef)

CODECHEF:So Close Yet So Far(MO's on Tree) ///==================================================/// /// HELLO WORLD !! /// /// IT'S ME /// /// BISHAL GAUTAM /// /// [ bsal.gautam16@gmail.com ] /// ///==================================================/// #include<bits/stdc++.h> # define X first # define Y second # define mpp make_pair # define nl printf("\n") # define SZ (x) (int)(x.size()) # define pb (x) push_back(x) # define pii pair<int,int> # define piii pair< int ,pair<int,int> > # define pll pair<ll,ll> ///--------------------- # define S (a) scanf("%d",&a) # define P (a) printf("%d",a) # define SL (a) scanf("%lld",&a) # define S2 (a,b) scanf("%d%d",&a,&b) # define SL2 (a,b) scanf("%lld%lld",&a,&b) ///---------