hiho week 22 register

Ended

Participants:196

Verdict:Accepted
Score:100 / 100
Submitted:2014-11-30 10:08:56

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 <cstdio>
using namespace std;
const int MAXN=100005;
struct Operation
{
    int type,value;
    Operation()
    {
        type=-1;
    }
};
struct Node
{
    int left,right;
    int price;
    Operation operation;
};
int n,m,price[MAXN];
Node node[4*MAXN];
Operation CombineOperation(Operation o1,Operation o2)
{
    if(o1.type==-1)
        return o2;
    if(o2.type==-1)
        return o1;
    if(o2.type==1)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX