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_39047239_26229.cpp: In function 'int add(int, int, int, int, int, int)':
0_0_39047239_26229.cpp:24:22: error: 'min' was not declared in this scope
   24 |     sum[rtt]+=(ll)x*(min(R,r)-max(L,l)+1);//计算这个标记对sum值的影响,就是这个区间要修改的长度*要修改的值
      |                      ^~~
0_0_39047239_26229.cpp:24:31: error: 'max' was not declared in this scope
   24 |     sum[rtt]+=(ll)x*(min(R,r)-max(L,l)+1);//计算这个标记对sum值的影响,就是这个区间要修改的长度*要修改的值
      |                               ^~~
0_0_39047239_26229.cpp: In function 'long long int query(int, int, int, int, int)':
0_0_39047239_26229.cpp:38:24: error: 'min' was not declared in this scope
   38 |     ll ret=(ll)ad[rt]*(min(R,r)-max(l,L)+1),mid=(l+r)>>1;//计算标记对答案的贡献,就是和上面的一样。
      |                        ^~~
0_0_39047239_26229.cpp:38:33: error: 'max' was not declared in this scope
   38 |     ll ret=(ll)ad[rt]*(min(R,r)-max(l,L)+1),mid=(l+r)>>1;//计算标记对答案的贡献,就是和上面的一样。
      |                                 ^~~
0_0_39047239_26229.cpp:39:11: error: 'mid' was not declared in this scope
   39 |     if(L<=mid)  ret+=query(ch[rt][0],l,mid,L,R);//计算左右区间的贡献
      |           ^~~
0_0_39047239_26229.cpp:40:10: error: 'mid' was not declared in this scope
   40 |     if(R>mid) ret+=query(ch[rt][1],mid+1,r,L,R);
      |          ^~~
0_0_39047239_26229.cpp: In function 'void init()':
0_0_39047239_26229.cpp:45:5: error: 'memset' was not declared in this scope
   45 |     memset(sum,0,sizeof(sum));memset(ad,0,sizeof(ad));memset(root,0,sizeof(root));
      |     ^~~~~~
0_0_39047239_26229.cpp:2:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
    1 | #include<stdio.h>
  +++ |+#include <cstring>
    2 | #define ll long long


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-28 09:20:08, Gzip enabled