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_39840848_16217.cpp:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include #include #include #include #include #include #include #include #include #include #include #define LL long long #define eps 1e-8 #define maxn 101000 #define mod 1000000007 #define inf 0x3f3f3f3f #define mid(a,b) ((a+b)>>1) #define IN freopen("in.txt","r",stdin); using namespace std;
      |          ^
0_0_39840848_16217.cpp:3:9: error: 'maxn' was not declared in this scope
    3 | int num[maxn];
      |         ^~~~
0_0_39840848_16217.cpp:4:11: error: 'maxn' was not declared in this scope
    4 | int _left[maxn];
      |           ^~~~
0_0_39840848_16217.cpp:5:12: error: 'maxn' was not declared in this scope
    5 | int _right[maxn];
      |            ^~~~
0_0_39840848_16217.cpp: In function 'int main()':
0_0_39840848_16217.cpp:11:8: error: 'cin' was not declared in this scope
   11 | int t; cin >> t;
      |        ^~~
0_0_39840848_16217.cpp:14:5: error: 'scanf' was not declared in this scope
   14 |     scanf("%d", &n);
      |     ^~~~~
0_0_39840848_16217.cpp:16:22: error: 'num' was not declared in this scope; did you mean 'enum'?
   16 |         scanf("%d", &num[i]);
      |                      ^~~
      |                      enum
0_0_39840848_16217.cpp:19:12: error: '_left' was not declared in this scope
   19 |     memset(_left, 0, sizeof(_left));
      |            ^~~~~
0_0_39840848_16217.cpp:19:5: error: 'memset' was not declared in this scope
   19 |     memset(_left, 0, sizeof(_left));
      |     ^~~~~~
0_0_39840848_16217.cpp:1:1: note: 'memset' is defined in header '<cstring>'; did you forget to '#include <cstring>'?
  +++ |+#include <cstring>
    1 | #include #include #include #include #include #include #include #include #include #include #include #define LL long long #define eps 1e-8 #define maxn 101000 #define mod 1000000007 #define inf 0x3f3f3f3f #define mid(a,b) ((a+b)>>1) #define IN freopen("in.txt","r",stdin); using namespace std;
0_0_39840848_16217.cpp:20:12: error: '_right' was not declared in this scope
   20 |     memset(_right, 0, sizeof(_right));
      |            ^~~~~~
0_0_39840848_16217.cpp:23:40: error: 'num' was not declared in this scope; did you mean 'enum'?
   23 |         _left[i] = max(_left[i-1], abs(num[i]-num[i-1]));
      |                                        ^~~
      |                                        enum
0_0_39840848_16217.cpp:23:36: error: 'abs' was not declared in this scope
   23 |         _left[i] = max(_left[i-1], abs(num[i]-num[i-1]));
      |                                    ^~~
0_0_39840848_16217.cpp:23:20: error: 'max' was not declared in this scope
   23 |         _left[i] = max(_left[i-1], abs(num[i]-num[i-1]));
      |                    ^~~
0_0_39840848_16217.cpp:27:42: error: 'num' was not declared in this scope; did you mean 'enum'?
   27 |         _right[i] = max(_right[i+1], abs(num[i]-num[i+1]));
      |                                          ^~~
      |                                          enum
0_0_39840848_16217.cpp:27:38: error: 'abs' was not declared in this scope
   27 |         _right[i] = max(_right[i+1], abs(num[i]-num[i+1]));
      |                                      ^~~
0_0_39840848_16217.cpp:27:21: error: 'max' was not declared in this scope
   27 |         _right[i] = max(_right[i+1], abs(num[i]-num[i+1]));
      |                     ^~~
0_0_39840848_16217.cpp:30:5: error: 'LL' was not declared in this scope
   30 |     LL ans = 0;
      |     ^~
0_0_39840848_16217.cpp:32:19: error: 'max' was not declared in this scope
   32 |         int cur = max(_left[i-1], _right[i+1]);
      |                   ^~~
0_0_39840848_16217.cpp:33:45: error: 'num' was not declared in this scope; did you mean 'enum'?
   33 |         if(i!=1 && i!=n) cur = max(cur, abs(num[i+1]-num[i-1]));
      |                                             ^~~
      |                                             enum
0_0_39840848_16217.cpp:33:41: error: 'abs' was not declared in this scope
   33 |         if(i!=1 && i!=n) cur = max(cur, abs(num[i+1]-num[i-1]));
      |                                         ^~~
0_0_39840848_16217.cpp:34:9: error: 'ans' was not declared in this scope
   34 |         ans += (LL)cur;
      |         ^~~
0_0_39840848_16217.cpp:37:22: error: 'ans' was not declared in this scope
   37 |     printf("%lld\n", ans);
      |                      ^~~
0_0_39840848_16217.cpp:37:5: error: 'printf' was not declared in this scope
   37 |     printf("%lld\n", ans);
      |     ^~~~~~
0_0_39840848_16217.cpp:1:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
  +++ |+#include <cstdio>
    1 | #include #include #include #include #include #include #include #include #include #include #include #define LL long long #define eps 1e-8 #define maxn 101000 #define mod 1000000007 #define inf 0x3f3f3f3f #define mid(a,b) ((a+b)>>1) #define IN freopen("in.txt","r",stdin); using namespace std;


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2025 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.001000(s) query 1, Server time : 2025-02-27 22:52:57, Gzip enabled