F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_13721220_17288.cpp:1:1116: fatal error: GCC4.9.2/lib/gcc/x86_64-w64-mingw32/4.9.2/include/iostream>usin: Invalid argument
 #include <iostream>using namespace std;struct node{    int value;    int a,b;}tree[300010];int maketree(int i,int a,int b){    tree[i].a=a;    tree[i].b=b;    if(a==b)    {        return tree[i].value=1;    }    int mid=(a+b)/2;    return tree[i].value =maketree(2*i,a,mid)+maketree(2*i+1,mid+1,b);}int update(int i,int a,int b,int v){    if(tree[i].a==tree[i].b)        return tree[i].value =v;    int mid=(tree[i].a+tree[i].b)/2;    if(a>mid)            //更新区间为右区间        return tree[i].value=update(2*i+1,a,b,v)+tree[2*i].value;     else if(b<=mid)      //更新区间为左区间        return tree[i].value=update(2*i,a,b,v)+tree[2*i+1].value;    else                 //否则左右区间皆更新        return tree[i].value=update(2*i,a,mid,v)+update(2*i+1,mid+1,b,v);}int main(){    int a,b,t,q,v,i,n;    scanf("%d",&t);    for(i=1;i<=t;i++)    {        scanf("%d",&n);        maketree(1,1,n);        scanf("%d",&q);        while(q--)        {            scanf("%d%d%d",&a,&b,&v);            update(1,a,b,v);        }        printf("Case %d: The total value of the hook is %d.\n",i,tree[1].value);    }    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ^
compilation terminated.


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-09-20 05:45:14, Gzip enabled