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_39667929_18032.cpp:1:10: error: #include expects "FILENAME" or <FILENAME>
    1 | #include
      |          ^
0_0_39667929_18032.cpp:6:10: error: #include expects "FILENAME" or <FILENAME>
    6 | #include
      |          ^
0_0_39667929_18032.cpp:11:10: error: #include expects "FILENAME" or <FILENAME>
   11 | #include
      |          ^
0_0_39667929_18032.cpp:16:10: error: #include expects "FILENAME" or <FILENAME>
   16 | #include
      |          ^
0_0_39667929_18032.cpp:21:10: error: #include expects "FILENAME" or <FILENAME>
   21 | #include
      |          ^
0_0_39667929_18032.cpp:24:31: error: stray '#' in program
   24 |          using namespace std; #define MAXN 50100 #define EPS 0.1 double x[MAXN],w[MAXN]; int n,testcase; double calc(double s) { double ans=0; for (int i=1;i<=n;i++) ans+=fabs(x[i]-s)*fabs(x[i]-s)*fabs(x[i]-s)*w[i]; return ans; } double Sanfen(double left,double right) { while (right-left>EPS) { double ll=(left+(right-left)/3),rr=(ll+(right-left)/3); double llAns=calc(ll); double rrAns=calc(rr); if (llAns
      |                               ^
0_0_39667929_18032.cpp:24:50: error: stray '#' in program
   24 |          using namespace std; #define MAXN 50100 #define EPS 0.1 double x[MAXN],w[MAXN]; int n,testcase; double calc(double s) { double ans=0; for (int i=1;i<=n;i++) ans+=fabs(x[i]-s)*fabs(x[i]-s)*fabs(x[i]-s)*w[i]; return ans; } double Sanfen(double left,double right) { while (right-left>EPS) { double ll=(left+(right-left)/3),rr=(ll+(right-left)/3); double llAns=calc(ll); double rrAns=calc(rr); if (llAns
      |                                                  ^
0_0_39667929_18032.cpp:24:32: error: 'define' does not name a type
   24 |          using namespace std; #define MAXN 50100 #define EPS 0.1 double x[MAXN],w[MAXN]; int n,testcase; double calc(double s) { double ans=0; for (int i=1;i<=n;i++) ans+=fabs(x[i]-s)*fabs(x[i]-s)*fabs(x[i]-s)*w[i]; return ans; } double Sanfen(double left,double right) { while (right-left>EPS) { double ll=(left+(right-left)/3),rr=(ll+(right-left)/3); double llAns=calc(ll); double rrAns=calc(rr); if (llAns
      |                                ^~~~~~
0_0_39667929_18032.cpp: In function 'double calc(double)':
0_0_39667929_18032.cpp:24:177: error: 'x' was not declared in this scope
   24 |          using namespace std; #define MAXN 50100 #define EPS 0.1 double x[MAXN],w[MAXN]; int n,testcase; double calc(double s) { double ans=0; for (int i=1;i<=n;i++) ans+=fabs(x[i]-s)*fabs(x[i]-s)*fabs(x[i]-s)*w[i]; return ans; } double Sanfen(double left,double right) { while (right-left>EPS) { double ll=(left+(right-left)/3),rr=(ll+(right-left)/3); double llAns=calc(ll); double rrAns=calc(rr); if (llAns
      |                                                                                                                                                                                 ^
0_0_39667929_18032.cpp:24:172: error: 'fabs' was not declared in this scope
   24 |          using namespace std; #define MAXN 50100 #define EPS 0.1 double x[MAXN],w[MAXN]; int n,testcase; double calc(double s) { double ans=0; for (int i=1;i<=n;i++) ans+=fabs(x[i]-s)*fabs(x[i]-s)*fabs(x[i]-s)*w[i]; return ans; } double Sanfen(double left,double right) { while (right-left>EPS) { double ll=(left+(right-left)/3),rr=(ll+(right-left)/3); double llAns=calc(ll); double rrAns=calc(rr); if (llAns
      |                                                                                                                                                                            ^~~~
0_0_39667929_18032.cpp:24:211: error: 'w' was not declared in this scope
   24 |          using namespace std; #define MAXN 50100 #define EPS 0.1 double x[MAXN],w[MAXN]; int n,testcase; double calc(double s) { double ans=0; for (int i=1;i<=n;i++) ans+=fabs(x[i]-s)*fabs(x[i]-s)*fabs(x[i]-s)*w[i]; return ans; } double Sanfen(double left,double right) { while (right-left>EPS) { double ll=(left+(right-left)/3),rr=(ll+(right-left)/3); double llAns=calc(ll); double rrAns=calc(rr); if (llAns
      |                                                                                                                                                                                                                   ^
0_0_39667929_18032.cpp: In function 'double Sanfen(double, double)':
0_0_39667929_18032.cpp:24:291: error: 'EPS' was not declared in this scope
   24 |          using namespace std; #define MAXN 50100 #define EPS 0.1 double x[MAXN],w[MAXN]; int n,testcase; double calc(double s) { double ans=0; for (int i=1;i<=n;i++) ans+=fabs(x[i]-s)*fabs(x[i]-s)*fabs(x[i]-s)*w[i]; return ans; } double Sanfen(double left,double right) { while (right-left>EPS) { double ll=(left+(right-left)/3),rr=(ll+(right-left)/3); double llAns=calc(ll); double rrAns=calc(rr); if (llAns
      |                                                                                                                                                                                                                                                                                                   ^~~
0_0_39667929_18032.cpp:24:409: error: expected ')' before 'right'
   24 |          using namespace std; #define MAXN 50100 #define EPS 0.1 double x[MAXN],w[MAXN]; int n,testcase; double calc(double s) { double ans=0; for (int i=1;i<=n;i++) ans+=fabs(x[i]-s)*fabs(x[i]-s)*fabs(x[i]-s)*w[i]; return ans; } double Sanfen(double left,double right) { while (right-left>EPS) { double ll=(left+(right-left)/3),rr=(ll+(right-left)/3); double llAns=calc(ll); double rrAns=calc(rr); if (llAns
      |                                                                                                                                                                                                                                                                                                                                                                                                                   ~     ^
      |                                                                                                                                                                                                                                                                                                                                                                                                                         )
   25 | 
   26 |           right) right=x[i]; } double ans=Sanfen(left,right); ans=calc(ans); printf("Case #%d: %d\n",p,(int)(ans+0.5)); } }
      |           ~~~~~                                                                                                                                                                                                                                                                                                                                                                                                          
0_0_39667929_18032.cpp:26:24: error: 'x' was not declared in this scope
   26 |           right) right=x[i]; } double ans=Sanfen(left,right); ans=calc(ans); printf("Case #%d: %d\n",p,(int)(ans+0.5)); } }
      |                        ^
0_0_39667929_18032.cpp:26:26: error: 'i' was not declared in this scope
   26 |           right) right=x[i]; } double ans=Sanfen(left,right); ans=calc(ans); printf("Case #%d: %d\n",p,(int)(ans+0.5)); } }
      |                          ^
0_0_39667929_18032.cpp:26:102: error: 'p' was not declared in this scope
   26 |           right) right=x[i]; } double ans=Sanfen(left,right); ans=calc(ans); printf("Case #%d: %d\n",p,(int)(ans+0.5)); } }
      |                                                                                                      ^
0_0_39667929_18032.cpp:26:78: error: 'printf' was not declared in this scope
   26 |           right) right=x[i]; } double ans=Sanfen(left,right); ans=calc(ans); printf("Case #%d: %d\n",p,(int)(ans+0.5)); } }
      |                                                                              ^~~~~~
0_0_39667929_18032.cpp:1:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
  +++ |+#include <cstdio>
    1 | #include
0_0_39667929_18032.cpp: At global scope:
0_0_39667929_18032.cpp:26:123: error: expected declaration before '}' token
   26 |           right) right=x[i]; } double ans=Sanfen(left,right); ans=calc(ans); printf("Case #%d: %d\n",p,(int)(ans+0.5)); } }
      |                                                                                                                           ^


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-11-16 16:42:50, Gzip enabled