/ Vijos /

记录详情

Compile Error

foo.cpp: In function 'double ssqrt(double)':
foo.cpp:18:23: error: 'sqrt' was not declared in this scope
     else return sqrt(x);
                       ^
foo.cpp: In function 'double sacos(double)':
foo.cpp:24:23: error: 'acos' was not declared in this scope
     else return acos(x);
                       ^
foo.cpp: At global scope:
foo.cpp:29:9: error: 'pair' does not name a type
 typedef pair<double, double> prd;
         ^
foo.cpp:30:1: error: 'prd' does not name a type
 prd bin (double a, double b, double c)
 ^
foo.cpp: In function 'double prlarea(double, double, double)':
foo.cpp:39:28: error: 'sin' was not declared in this scope
     return (st - sin(st * 2) / 2) * (r * r / 2);
                            ^
foo.cpp: In constructor 'segment::segment(double, double, double, double)':
foo.cpp:50:23: error: 'min' was not declared in this scope
         l = min(x0, x1), r = max(x0, x1);
                       ^
foo.cpp:50:40: error: 'max' was not declared in this scope
         l = min(x0, x1), r = max(x0, x1);
                                        ^
foo.cpp: At global scope:
foo.cpp:72:5: error: 'prd' does not name a type
     prd intersect (const segment& s) const
     ^
foo.cpp: In member function 'double circle::intersect(const circle&) const':
foo.cpp:68:28: error: 'fabs' was not declared in this scope
         if (fi(fabs(c.x - x) - (c.r + r)) >= 0) return invalid;
                            ^
foo.cpp: In member function 'void interval::load(func)':
foo.cpp:113:45: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
         if (t = fi(ff.value(l) - f.value(l)))
                                             ^
foo.cpp:118:50: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
         else if (t = fi(ff.value(r) - f.value(r)))
                                                  ^
foo.cpp: In function 'void lshinit()':
foo.cpp:133:26: error: 'sort' was not declared in this scope
     sort(lsh, lsh + lshmr);
                          ^
foo.cpp: In function 'int main()':
foo.cpp:154:5: error: 'prd' was not declared in this scope
     prd res; segment s;
     ^
foo.cpp:155:31: error: 'scanf' was not declared in this scope
     scanf("%d %lf", &n, &alpha); n++;
                               ^
foo.cpp:161:29: error: 'tan' was not declared in this scope
         x = h[i] / tan(alpha);
                             ^
foo.cpp:164:44: error: 'tan' was not declared in this scope
     cs[n - 1] = circle(h[n - 1] / tan(alpha), 0);
                                            ^
foo.cpp:167:42: error: 'fabs' was not declared in this scope
         if (fi(fabs(cs[i].x - cs[i + 1].x) - fabs(cs[i].r - cs[i + 1].r)) == 1)
                                          ^
foo.cpp:194:13: error: 'res' was not declared in this scope
             res = cs[i].intersect(gs[j]);
             ^
foo.cpp:194:40: error: no matching function for call to 'circle::intersect(segment&)'
             res = cs[i].intersect(gs[j]);
                                        ^
foo.cpp:194:40: note: candidate is:
foo.cpp:66:12: note: double circle::intersect(const circle&) const
     double intersect (const circle& c) const
            ^
foo.cpp:66:12: note:   no known conversion for argument 1 from 'segment' to 'const circle&'
foo.cpp:227:29: error: 'printf' was not declared in this scope
     printf("%.2f\n", ans * 2);
                             ^
foo.cpp: In function 'double ssqrt(double)':
foo.cpp:19:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
foo.cpp: In function 'double prlarea(double, double, double)':
foo.cpp:40:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
foo.cpp: In function 'double sacos(double)':
foo.cpp:25:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^
foo.cpp: In member function 'double circle::intersect(const circle&) const':
foo.cpp:71:5: warning: control reaches end of non-void function [-Wreturn-type]

信息

递交者
类型
递交
题目
P1839 月下柠檬树
语言
C++
递交时间
2015-12-13 14:32:13
评测时间
2015-12-13 14:32:14
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes