hihoCoder Challenge 8 register

Ended

Participants:280

Verdict:Accepted
Submitted:2015-02-01 20:13:52

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include<iostream>
#include<string>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<cstdlib>
#include<vector>
#include<queue>
#include<functional>
#include<algorithm>
#define ms0(a) memset(a,0,sizeof(a))
#define ms1(a) memset(a,-1,sizeof(a))
#define pb(a) push_back(a)
using namespace std;
//typedef __int64 ll;
const int M = 10007;
const int N = 1e5+5;
//int t1[10],t2[10]
struct Nod{
    int l,r,x,y; // left , right , all , allient.
    Nod():l(0),r(0),x(0),y(0){}
}nod[N*3];
void fragTree(int i,int l,int r,int w,int x) // which is changed to x.
{
    int ii=2*i,mid=(l+r)/2;
    if(l==r)
    {
        nod[i].l=nod[i].r=nod[i].x=nod[i].y=x%M;
        return ;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX