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_39642402_21456.cpp:15:7: error: 'MAXN' was not declared in this scope
   15 | int a[MAXN];
      |       ^~~~
0_0_39642402_21456.cpp:16:7: error: 'MAXN' was not declared in this scope
   16 | int x[MAXN];
      |       ^~~~
0_0_39642402_21456.cpp: In function 'bool work()':
0_0_39642402_21456.cpp:22:9: error: 'x' was not declared in this scope
   22 |     if (x[1] != 0)  tot++;
      |         ^
0_0_39642402_21456.cpp:23:9: error: 'x' was not declared in this scope
   23 |     if (x[n] != 0)  tot++;
      |         ^
0_0_39642402_21456.cpp:24:9: error: 'x' was not declared in this scope
   24 |     if (x[n-1] != 0)    tot++;
      |         ^
0_0_39642402_21456.cpp:26:18: error: 'a' was not declared in this scope
   26 |         if (abs (a[i] - ave + x[i-1]) > 1)  return false;
      |                  ^
0_0_39642402_21456.cpp:26:31: error: 'x' was not declared in this scope
   26 |         if (abs (a[i] - ave + x[i-1]) > 1)  return false;
      |                               ^
0_0_39642402_21456.cpp:27:9: error: 'x' was not declared in this scope
   27 |         x[i] = a[i] - ave + x[i-1];
      |         ^
0_0_39642402_21456.cpp:27:16: error: 'a' was not declared in this scope
   27 |         x[i] = a[i] - ave + x[i-1];
      |                ^
0_0_39642402_21456.cpp:30:9: error: 'a' was not declared in this scope
   30 |     if (a[n-1] - x[n-1] + x[n-2] != ave)    return false;
      |         ^
0_0_39642402_21456.cpp:30:18: error: 'x' was not declared in this scope
   30 |     if (a[n-1] - x[n-1] + x[n-2] != ave)    return false;
      |                  ^
0_0_39642402_21456.cpp: In function 'bool judge()':
0_0_39642402_21456.cpp:37:13: error: 'x' was not declared in this scope
   37 |             x[1] = i, x[n] = j;
      |             ^
0_0_39642402_21456.cpp:38:28: error: 'a' was not declared in this scope
   38 |             if (abs (ave - a[n] + x[n]) <= 1)   {
      |                            ^
0_0_39642402_21456.cpp: In function 'int main()':
0_0_39642402_21456.cpp:52:27: error: 'a' was not declared in this scope
   52 |             scanf ("%d", &a[i]);    sum += a[i];
      |                           ^
0_0_39642402_21456.cpp:59:17: error: 'a' was not declared in this scope
   59 |             if (a[i] < ave - 2 || a[i] > ave + 2)   {
      |                 ^
0_0_39642402_21456.cpp:62:17: error: 'a' was not declared in this scope
   62 |             if (a[i] != ave)   same = false;
      |                 ^
0_0_39642402_21456.cpp:71:17: error: 'x' was not declared in this scope
   71 |         memset (x, 0, sizeof (x));
      |                 ^


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-29 05:33:41, Gzip enabled