/ Vijos /

记录详情

Compile Error

/in/foo.cc:8:7: error: reference to 'dec' is ambiguous
 const dec tau = std::acos(dec(-1)) * 2;
       ^~~
/in/foo.cc:6:16: note: candidates are: typedef double dec
 typedef double dec;
                ^~~
In file included from /usr/include/c++/6/ios:42:0,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/ios_base.h:1016:3: note:                 std::ios_base& std::dec(std::ios_base&)
   dec(ios_base& __base)
   ^~~
/in/foo.cc:14:5: error: reference to 'dec' is ambiguous
     dec x, y;
     ^~~
/in/foo.cc:6:16: note: candidates are: typedef double dec
 typedef double dec;
                ^~~
In file included from /usr/include/c++/6/ios:42:0,
                 from /usr/include/c++/6/istream:38,
                 from /usr/include/c++/6/sstream:38,
                 from /usr/include/c++/6/complex:45,
                 from /usr/include/c++/6/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:52,
                 from /in/foo.cc:1:
/usr/include/c++/6/bits/ios_base.h:1016:3: note:                 std::ios_base& std::dec(std::ios_base&)
   dec(ios_base& __base)
   ^~~
/in/foo.cc: In member function 'vec vec::operator+(const vec&) const':
/in/foo.cc:15:58: error: 'x' was not declared in this scope
     vec operator + (const vec & z) const { return (vec) {x + z.x, y + z.y}; }
                                                          ^
/in/foo.cc:15:64: error: 'const struct vec' has no member named 'x'
     vec operator + (const vec & z) const { return (vec) {x + z.x, y + z.y}; }
                                                                ^
/in/foo.cc:15:67: error: 'y' was not declared in this scope
     vec operator + (const vec & z) const { return (vec) {x + z.x, y + z.y}; }
                                                                   ^
/in/foo.cc:15:73: error: 'const struct vec' has no member named 'y'
     vec operator + (const vec & z) const { return (vec) {x + z.x, y + z.y}; }
                                                                         ^
/in/foo.cc: In member function 'vec vec::operator-(const vec&) const':
/in/foo.cc:16:58: error: 'x' was not declared in this scope
     vec operator - (const vec & z) const { return (vec) {x - z.x, y - z.y}; }
                                                          ^
/in/foo.cc:16:64: error: 'const struct vec' has no member named 'x'
     vec operator - (const vec & z) const { return (vec) {x - z.x, y - z.y}; }
                                                                ^
/in/foo.cc:16:67: error: 'y' was not declared in this scope
     vec operator - (const vec & z) const { return (vec) {x - z.x, y - z.y}; }
                                                                   ^
/in/foo.cc:16:73: error: 'const struct vec' has no member named 'y'
     vec operator - (const vec & z) const { return (vec) {x - z.x, y - z.y}; }
                                                                         ^
/in/foo.cc: In member function 'vec vec::operator*(const vec&) const':
/in/foo.cc:17:58: error: 'x' was not declared in this scope
     vec operator * (const vec & z) const { return (vec) {x * z.x - y * z.y, x * z.y + y * z.x}; }
                                                          ^
/in/foo.cc:17:64: error: 'const struct vec' has no member named 'x'
     vec operator * (const vec & z) const { return (vec) {x * z.x - y * z.y, x * z.y + y * z.x}; }
                                                                ^
/in/foo.cc:17:68: error: 'y' was not declared in this scope
     vec operator * (const vec & z) const { return (vec) {x * z.x - y * z.y, x * z.y + y * z.x}; }
                                                                    ^
/in/foo.cc:17:74: error: 'const struct vec' has no member named 'y'
     vec operator * (const vec & z) const { return (vec) {x * z.x - y * z.y, x * z.y + y * z.x}; }
                                                                          ^
/in/foo.cc:17:83: error: 'const struct vec' has no member named 'y'
     vec operator * (const vec & z) const { return (vec) {x * z.x - y * z.y, x * z.y + y * z.x}; }
                                                                                   ^
/in/foo.cc:17:93: error: 'const struct vec' has no member named 'x'
     vec operator * (const vec & z) const { return (vec) {x * z.x - y * z.y, x * z.y + y * z.x}; }
                                                                                             ^
/in/foo.cc: In function 'vec operator*(unt, const vec&)':
/in/foo.cc:18:72: error: 'const struct vec' has no member named 'x'
     friend vec operator * (unt w, const vec & z) { return (vec) {w * z.x, w * z.y}; }
                                                                        ^
/in/foo.cc:18:81: error: 'const struct vec' has no member named 'y'
     friend vec operator * (unt w, const vec & z) { return (vec) {w * z.x, w * z.y}; }
                                                                                 ^
/in/foo.cc: At global scope:
/in/foo.cc:19:29: error: too many initializers for 'vec'
 } vec_0, vec_1 = (vec) {1, 0}, w[R_MAX];
                             ^
/in/foo.cc: In function 'vnt sol(int, int)':
/in/foo.cc:49:36: error: 'tau' was not declared in this scope
             w[0] = (vec) {std::cos(tau / L), std::sin(tau / L)};
                                    ^~~
/in/foo.cc:55:27: error: 'struct vec' has no member named 'x'
                a[x][y][i].x = f[x][y][i], a[x][y][i].y = 0;
                           ^
/in/foo.cc:55:54: error: 'struct vec' has no member named 'y'
                a[x][y][i].x = f[x][y][i], a[x][y][i].y = 0;
                                                      ^
/in/foo.cc:69:33: error: 'tau' was not declared in this scope
          w[0] = (vec) {std::cos(tau / L), std::sin(tau / L)};
                                 ^~~
/in/foo.cc:75:28: error: 'struct vec' has no member named 'x'
             a[x][y][i - l].x = f[x][y][i], a[x][y][i - l].y = 0;
                            ^
/in/foo.cc:75:59: error: 'struct vec' has no member named 'y'
             a[x][y][i - l].x = f[x][y][i], a[x][y][i - l].y = 0;
                                                           ^
/in/foo.cc:76:14: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
              for (int i = m - l; i < L; ++i)
              ^~~
/in/foo.cc:78:15: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'for'
               fft(a[x][y]);
               ^~~
/in/foo.cc:84:36: error: 'struct vec' has no member named 'x'
                         b[x][y][i].x = f[x][y][i], b[x][y][i].y = 0;
                                    ^
/in/foo.cc:84:63: error: 'struct vec' has no member named 'y'
                         b[x][y][i].x = f[x][y][i], b[x][y][i].y = 0;
                                                               ^
/in/foo.cc:95:14: error: 'struct vec' has no member named 'y'
         w[0].y = -w[0].y;
              ^
/in/foo.cc:95:24: error: 'struct vec' has no member named 'y'
         w[0].y = -w[0].y;
                        ^
/in/foo.cc:103:64: error: 'struct vec' has no member named 'x'
                     upd(f[u][v][i], unt(lnt(c[u][v][i - l - 2].x / L + 0.5) % P));
                                                                ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:117:46: warning: format '%u' expects argument of type 'unsigned int*', but argument 3 has type 'unt* {aka long long unsigned int*}' [-Wformat=]
             scanf("%d %u", &d[x][k], &e[x][k]), e[x][k] %= P;
                                              ^
/in/foo.cc:123:49: warning: format '%u' expects argument of type 'unsigned int', but argument 2 has type 'unt {aka long long unsigned int}' [-Wformat=]
         printf("%u\n", f[q[k].s][q[k].t][q[k].n]);
                                                 ^

信息

递交者
类型
自测
题目
P1871 括号序列计数
语言
C++
递交时间
2020-10-28 19:14:50
评测时间
2020-10-28 19:14:50
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes