/ Vijos /

记录详情

Compile Error

foo.c:1:9: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
 include <iostream>
         ^
foo.c:7:1: error: unknown type name 'friend'
 friend bool operator < (place a,place b){
 ^~~~~~
foo.c:7:13: error: expected ':', ',', ';', '}' or '__attribute__' before 'operator'
 friend bool operator < (place a,place b){
             ^~~~~~~~
foo.c: In function 'main':
foo.c:23:1: error: unknown type name 'place'
 place p[10000]={0,0};
 ^~~~~
foo.c:23:1: note: use 'struct' keyword to refer to the type
foo.c:24:1: error: 'cin' undeclared (first use in this function)
 cin>>n;
 ^~~
foo.c:24:1: note: each undeclared identifier is reported only once for each function it appears in
foo.c:26:10: error: request for member 'x' in something not a structure or union
 cin>>p[i].x>>p[i].y;
          ^
foo.c:26:18: error: request for member 'y' in something not a structure or union
 cin>>p[i].x>>p[i].y;
                  ^
foo.c:27:1: warning: implicit declaration of function 'sort' [-Wimplicit-function-declaration]
 sort(p,p+n);
 ^~~~
foo.c:29:9: warning: implicit declaration of function 'abs' [-Wimplicit-function-declaration]
 count1+=abs(p[i].y-p[(n+1)/2].y);
         ^~~
foo.c:29:17: error: request for member 'y' in something not a structure or union
 count1+=abs(p[i].y-p[(n+1)/2].y);
                 ^
foo.c:29:30: error: request for member 'y' in something not a structure or union
 count1+=abs(p[i].y-p[(n+1)/2].y);
                              ^
foo.c:31:17: error: request for member 'y' in something not a structure or union
 count2+=abs(p[i].y-p[n/2].y);
                 ^
foo.c:31:26: error: request for member 'y' in something not a structure or union
 count2+=abs(p[i].y-p[n/2].y);
                          ^
foo.c:33:1: error: 'cout' undeclared (first use in this function)
 cout<<count2;
 ^~~~

信息

递交者
类型
递交
题目
P1691 输油管道问题
语言
C
递交时间
2017-02-19 20:58:11
评测时间
2017-02-19 20:58:11
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes