/ Vijos /

记录详情

Compile Error

foo.cc:3:1: error: 'string' does not name a type
    3 | string expr, name; VI I;
      | ^~~~~~
foo.cc:3:20: error: 'VI' does not name a type
    3 | string expr, name; VI I;
      |                    ^~
foo.cc: In function 'void out(int)':
foo.cc:7:17: error: 'I' was not declared in this scope
    7 |     if (k == SZ(I)) cout << name;
      |                 ^
foo.cc:7:14: error: 'SZ' was not declared in this scope
    7 |     if (k == SZ(I)) cout << name;
      |              ^~
foo.cc:7:21: error: 'cout' was not declared in this scope; did you mean 'out'?
    7 |     if (k == SZ(I)) cout << name;
      |                     ^~~~
      |                     out
foo.cc:7:29: error: 'name' was not declared in this scope
    7 |     if (k == SZ(I)) cout << name;
      |                             ^~~~
foo.cc:9:9: error: 'printf' was not declared in this scope
    9 |         printf("op(%d,",I[k]);out(k+1);printf(")");
      |         ^~~~~~
foo.cc:1:1: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
  +++ |+#include <cstdio>
    1 | const int N = int(1e5) + 9;
foo.cc: In function 'void gao(int, int, int)':
foo.cc:22:17: error: 'I' was not declared in this scope
   22 |     if (k == SZ(I)){
      |                 ^
foo.cc:22:14: error: 'SZ' was not declared in this scope
   22 |     if (k == SZ(I)){
      |              ^~
foo.cc:23:13: error: 'i' was not declared in this scope
   23 |         FOR(i,l,r)putchar(expr[i]);puts("");
      |             ^
foo.cc:23:9: error: 'FOR' was not declared in this scope
   23 |         FOR(i,l,r)putchar(expr[i]);puts("");
      |         ^~~
foo.cc:23:36: error: 'puts' was not declared in this scope
   23 |         FOR(i,l,r)putchar(expr[i]);puts("");
      |                                    ^~~~
foo.cc:27:36: error: 'VII' was not declared in this scope
   27 |         int c=0;char op='(';int ll;VII cut;
      |                                    ^~~
foo.cc:28:13: error: 'i' was not declared in this scope
   28 |         FOR(i,l,r) if(expr[i]=='('){if (!c++)ll=i+1;}
      |             ^
foo.cc:28:9: error: 'FOR' was not declared in this scope
   28 |         FOR(i,l,r) if(expr[i]=='('){if (!c++)ll=i+1;}
      |         ^~~
foo.cc:29:9: error: 'else' without a previous 'if'
   29 |         else if (expr[i]==')'){if (!--c)cut.PB(MP(ll,i));}
      |         ^~~~
foo.cc:29:18: error: 'expr' was not declared in this scope
   29 |         else if (expr[i]==')'){if (!--c)cut.PB(MP(ll,i));}
      |                  ^~~~
foo.cc:29:41: error: 'cut' was not declared in this scope; did you mean 'out'?
   29 |         else if (expr[i]==')'){if (!--c)cut.PB(MP(ll,i));}
      |                                         ^~~
      |                                         out
foo.cc:29:48: error: 'MP' was not declared in this scope
   29 |         else if (expr[i]==')'){if (!--c)cut.PB(MP(ll,i));}
      |                                                ^~
foo.cc:34:17: error: 'expr' was not declared in this scope
   34 |             if (expr[l]=='(') gao(k+1,cut[I[k]].fi,cut[I[k]].se);
      |                 ^~~~
foo.cc:34:39: error: 'cut' was not declared in this scope; did you mean 'out'?
   34 |             if (expr[l]=='(') gao(k+1,cut[I[k]].fi,cut[I[k]].se);
      |                                       ^~~
      |                                       out
foo.cc:38:16: error: expected ';' before 'cut'
   38 |             VII cut; FOR(i,l,r) if(expr[i]=='(')++c;
      |                ^~~~
      |                ;
foo.cc:39:13: error: 'else' without a previous 'if'
   39 |             else if (expr[i]==')')--c;
      |             ^~~~
foo.cc:39:22: error: 'expr' was not declared in this scope
   39 |             else if (expr[i]==')')--c;
      |                      ^~~~
foo.cc:41:39: error: 'cut' was not declared in this scope; did you mean 'out'?
   41 |                 if (f(expr[i])==f(op))cut.PB(MP(l,i)),l=i+1;
      |                                       ^~~
      |                                       out
foo.cc:41:46: error: 'MP' was not declared in this scope
   41 |                 if (f(expr[i])==f(op))cut.PB(MP(l,i)),l=i+1;
      |                                              ^~
foo.cc:43:13: error: 'cut' was not declared in this scope; did you mean 'out'?
   43 |             cut.PB(MP(l,r));
      |             ^~~
      |             out
foo.cc:43:20: error: 'MP' was not declared in this scope
   43 |             cut.PB(MP(l,r));
      |                    ^~
foo.cc:44:53: error: return-statement with a value, in function returning 'void' [-fpermissive]
   44 |             return gao(k+1,cut[I[k]].fi,cut[I[k]].se);
      |                                                     ^
foo.cc: In function 'int main()':
foo.cc:52:28: error: 'stdin' was not declared in this scope
   52 |     freopen("in.txt", "r", stdin);
      |                            ^~~~~
foo.cc:52:28: note: 'stdin' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
foo.cc:52:5: error: 'freopen' was not declared in this scope
   52 |     freopen("in.txt", "r", stdin);
      |     ^~~~~~~
foo.cc:56:12: error: 'cin' was not declared in this scope
   56 |     while (cin >> expr){
      |            ^~~
foo.cc:56:19: error: 'expr' was not declared in this scope
   56 |     while (cin >> expr){
      |                   ^~~~
foo.cc:57:34: error: 'name' was not declared in this scope
   57 |         int p = expr.find(":="); name = expr.substr(0,p).c_str();
      |                                  ^~~~
foo.cc:58:9: error: 'printf' was not declared in this scope
   58 |         printf("Expression %s:\n",name.c_str());expr.erase(expr.begin(),expr.begin()+p+2);
      |         ^~~~~~
foo.cc:58:9: note: 'printf' is defined in header '<cstdio>'; did you forget to '#include <cstdio>'?
foo.cc:59:9: error: 'Rush' was not declared in this scope
   59 |         Rush{
      |         ^~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1017 划分
语言
C++
递交时间
2022-01-01 13:18:02
评测时间
2022-01-01 13:18:02
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes