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