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_20611949_16777.cpp:14:27: error: stray '#' in program
      using namespace std; #define PF(x) (scanf("%d",&x))#define PT(x,y) (scanf("%d%d",&x,&y))#define PR(x) (printf("%d\n",x))#define PRT(x,y)(printf("%d %d\n",x,y))#define M 1000 int n;struct P{    int x,y;    void in()    {        PT(x,y);    }};P ar[1000]; int mul(P a,P b,P c){    return (a.x-c.x)*(b.y-c.y)-(b.x-c.x)*(a.y-c.y);}double area(P a,P b,P c){    return fabs((double)mul(a,b,c))/2.0;}void init(){    while(scanf("%d",&n)!=EOF)    {        for(int i=0;i<n;i++)            ar[i].in();         double areas = 0.0;        for(int i=0;i<n;i++)            for(int j = i+1;j<n;j++)                for(int k = j+1;k<n;k++)                {                    if(areas<area(ar[i],ar[j],ar[k]))                        areas = area(ar[i],ar[j],ar[k]);                }                printf("%.1lf\n",areas);    }    return ;}int main(){    init();    return 0;}
                           ^
0_0_20611949_16777.cpp:14:57: error: stray '#' in program
      using namespace std; #define PF(x) (scanf("%d",&x))#define PT(x,y) (scanf("%d%d",&x,&y))#define PR(x) (printf("%d\n",x))#define PRT(x,y)(printf("%d %d\n",x,y))#define M 1000 int n;struct P{    int x,y;    void in()    {        PT(x,y);    }};P ar[1000]; int mul(P a,P b,P c){    return (a.x-c.x)*(b.y-c.y)-(b.x-c.x)*(a.y-c.y);}double area(P a,P b,P c){    return fabs((double)mul(a,b,c))/2.0;}void init(){    while(scanf("%d",&n)!=EOF)    {        for(int i=0;i<n;i++)            ar[i].in();         double areas = 0.0;        for(int i=0;i<n;i++)            for(int j = i+1;j<n;j++)                for(int k = j+1;k<n;k++)                {                    if(areas<area(ar[i],ar[j],ar[k]))                        areas = area(ar[i],ar[j],ar[k]);                }                printf("%.1lf\n",areas);    }    return ;}int main(){    init();    return 0;}
                                                         ^
0_0_20611949_16777.cpp:14:94: error: stray '#' in program
      using namespace std; #define PF(x) (scanf("%d",&x))#define PT(x,y) (scanf("%d%d",&x,&y))#define PR(x) (printf("%d\n",x))#define PRT(x,y)(printf("%d %d\n",x,y))#define M 1000 int n;struct P{    int x,y;    void in()    {        PT(x,y);    }};P ar[1000]; int mul(P a,P b,P c){    return (a.x-c.x)*(b.y-c.y)-(b.x-c.x)*(a.y-c.y);}double area(P a,P b,P c){    return fabs((double)mul(a,b,c))/2.0;}void init(){    while(scanf("%d",&n)!=EOF)    {        for(int i=0;i<n;i++)            ar[i].in();         double areas = 0.0;        for(int i=0;i<n;i++)            for(int j = i+1;j<n;j++)                for(int k = j+1;k<n;k++)                {                    if(areas<area(ar[i],ar[j],ar[k]))                        areas = area(ar[i],ar[j],ar[k]);                }                printf("%.1lf\n",areas);    }    return ;}int main(){    init();    return 0;}
                                                                                              ^
0_0_20611949_16777.cpp:14:126: error: stray '#' in program
      using namespace std; #define PF(x) (scanf("%d",&x))#define PT(x,y) (scanf("%d%d",&x,&y))#define PR(x) (printf("%d\n",x))#define PRT(x,y)(printf("%d %d\n",x,y))#define M 1000 int n;struct P{    int x,y;    void in()    {        PT(x,y);    }};P ar[1000]; int mul(P a,P b,P c){    return (a.x-c.x)*(b.y-c.y)-(b.x-c.x)*(a.y-c.y);}double area(P a,P b,P c){    return fabs((double)mul(a,b,c))/2.0;}void init(){    while(scanf("%d",&n)!=EOF)    {        for(int i=0;i<n;i++)            ar[i].in();         double areas = 0.0;        for(int i=0;i<n;i++)            for(int j = i+1;j<n;j++)                for(int k = j+1;k<n;k++)                {                    if(areas<area(ar[i],ar[j],ar[k]))                        areas = area(ar[i],ar[j],ar[k]);                }                printf("%.1lf\n",areas);    }    return ;}int main(){    init();    return 0;}
                                                                                                                              ^
0_0_20611949_16777.cpp:14:165: error: stray '#' in program
      using namespace std; #define PF(x) (scanf("%d",&x))#define PT(x,y) (scanf("%d%d",&x,&y))#define PR(x) (printf("%d\n",x))#define PRT(x,y)(printf("%d %d\n",x,y))#define M 1000 int n;struct P{    int x,y;    void in()    {        PT(x,y);    }};P ar[1000]; int mul(P a,P b,P c){    return (a.x-c.x)*(b.y-c.y)-(b.x-c.x)*(a.y-c.y);}double area(P a,P b,P c){    return fabs((double)mul(a,b,c))/2.0;}void init(){    while(scanf("%d",&n)!=EOF)    {        for(int i=0;i<n;i++)            ar[i].in();         double areas = 0.0;        for(int i=0;i<n;i++)            for(int j = i+1;j<n;j++)                for(int k = j+1;k<n;k++)                {                    if(areas<area(ar[i],ar[j],ar[k]))                        areas = area(ar[i],ar[j],ar[k]);                }                printf("%.1lf\n",areas);    }    return ;}int main(){    init();    return 0;}
                                                                                                                                                                     ^
0_0_20611949_16777.cpp:14:28: error: 'define' does not name a type
      using namespace std; #define PF(x) (scanf("%d",&x))#define PT(x,y) (scanf("%d%d",&x,&y))#define PR(x) (printf("%d\n",x))#define PRT(x,y)(printf("%d %d\n",x,y))#define M 1000 int n;struct P{    int x,y;    void in()    {        PT(x,y);    }};P ar[1000]; int mul(P a,P b,P c){    return (a.x-c.x)*(b.y-c.y)-(b.x-c.x)*(a.y-c.y);}double area(P a,P b,P c){    return fabs((double)mul(a,b,c))/2.0;}void init(){    while(scanf("%d",&n)!=EOF)    {        for(int i=0;i<n;i++)            ar[i].in();         double areas = 0.0;        for(int i=0;i<n;i++)            for(int j = i+1;j<n;j++)                for(int k = j+1;k<n;k++)                {                    if(areas<area(ar[i],ar[j],ar[k]))                        areas = area(ar[i],ar[j],ar[k]);                }                printf("%.1lf\n",areas);    }    return ;}int main(){    init();    return 0;}
                            ^
0_0_20611949_16777.cpp: In member function 'void P::in()':
0_0_20611949_16777.cpp:14:239: error: 'PT' was not declared in this scope
      using namespace std; #define PF(x) (scanf("%d",&x))#define PT(x,y) (scanf("%d%d",&x,&y))#define PR(x) (printf("%d\n",x))#define PRT(x,y)(printf("%d %d\n",x,y))#define M 1000 int n;struct P{    int x,y;    void in()    {        PT(x,y);    }};P ar[1000]; int mul(P a,P b,P c){    return (a.x-c.x)*(b.y-c.y)-(b.x-c.x)*(a.y-c.y);}double area(P a,P b,P c){    return fabs((double)mul(a,b,c))/2.0;}void init(){    while(scanf("%d",&n)!=EOF)    {        for(int i=0;i<n;i++)            ar[i].in();         double areas = 0.0;        for(int i=0;i<n;i++)            for(int j = i+1;j<n;j++)                for(int k = j+1;k<n;k++)                {                    if(areas<area(ar[i],ar[j],ar[k]))                        areas = area(ar[i],ar[j],ar[k]);                }                printf("%.1lf\n",areas);    }    return ;}int main(){    init();    return 0;}
                                                                                                                                                                                                                                               ^
0_0_20611949_16777.cpp: In function 'void init()':
0_0_20611949_16777.cpp:14:433: error: 'n' was not declared in this scope
      using namespace std; #define PF(x) (scanf("%d",&x))#define PT(x,y) (scanf("%d%d",&x,&y))#define PR(x) (printf("%d\n",x))#define PRT(x,y)(printf("%d %d\n",x,y))#define M 1000 int n;struct P{    int x,y;    void in()    {        PT(x,y);    }};P ar[1000]; int mul(P a,P b,P c){    return (a.x-c.x)*(b.y-c.y)-(b.x-c.x)*(a.y-c.y);}double area(P a,P b,P c){    return fabs((double)mul(a,b,c))/2.0;}void init(){    while(scanf("%d",&n)!=EOF)    {        for(int i=0;i<n;i++)            ar[i].in();         double areas = 0.0;        for(int i=0;i<n;i++)            for(int j = i+1;j<n;j++)                for(int k = j+1;k<n;k++)                {                    if(areas<area(ar[i],ar[j],ar[k]))                        areas = area(ar[i],ar[j],ar[k]);                }                printf("%.1lf\n",areas);    }    return ;}int main(){    init();    return 0;}
                                                                                                                                                                                                                                                                                                                                                                                                                                                 ^


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-27 08:36:34, Gzip enabled