hiho week 22 register

Ended

Participants:196

Verdict:Time Limit Exceeded
Score:70 / 100
Submitted:2014-12-01 20:22:50

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 <vector>
int main()
{
    int type[10000];
    int left[10000];
    int right[10000];
    int variation[10000];
    int output[10000];
    int p[100001];
    for(int i = 0; i < 10000; ++i)
    {
        type[i] = left[i] = right[i] = variation[i] = output[i] = 0;
    }
    using namespace std;
    int m,n;
    cin >> n >> m;
    for(int i = 0; i <= n; ++i)
    {
        cin >> p[i];
    }
    for(int i = 0; i < m; ++i)
    {
        cin >> type[i] >> left[i] >> right[i] >> variation[i];
    }
    for(int i = 0; i < m; ++i)
    {
        if(type[i] == 0)
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX