QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#470180#8008. Fortune WheelGuanYunchangCompile Error//C++231.0kb2024-07-10 11:06:462024-07-10 11:06:46

Details

answer.code:4:5: error: expected initializer before ‘rd’
    4 | int rd(){
      |     ^~
answer.code:11:13: error: expected ‘,’ or ‘...’ before ‘x’
   11 | void wr(int x){
      |             ^
answer.code: In function ‘void wr(long int)’:
answer.code:12:12: error: ‘x’ was not declared in this scope
   12 |         if(x>9) wr(x/10);
      |            ^
answer.code:13:17: error: ‘x’ was not declared in this scope
   13 |         putchar(x%10+'0');
      |                 ^
answer.code: At global scope:
answer.code:15:5: error: expected initializer before ‘gcd’
   15 | int gcd(int a,int b){
      |     ^~~
answer.code:18:11: error: expected initializer before ‘N’
   18 | const int N=1e6+5,M=3e6+5;
      |           ^
answer.code:19:5: error: expected initializer before ‘n’
   19 | int n,x,k,tot;
      |     ^
answer.code:20:5: error: expected initializer before ‘head’
   20 | int head[N],to[M],nex[M],dis[N];
      |     ^~~~
answer.code:21:14: error: expected ‘,’ or ‘...’ before ‘u’
   21 | void add(int u,int v){to[++tot]=v,nex[tot]=head[u],head[u]=tot;}
      |              ^
answer.code: In function ‘void add(long int)’:
answer.code:21:23: error: ‘to’ was not declared in this scope; did you mean ‘tm’?
   21 | void add(int u,int v){to[++tot]=v,nex[tot]=head[u],head[u]=tot;}
      |                       ^~
      |                       tm
answer.code:21:28: error: ‘tot’ was not declared in this scope
   21 | void add(int u,int v){to[++tot]=v,nex[tot]=head[u],head[u]=tot;}
      |                            ^~~
answer.code:21:33: error: ‘v’ was not declared in this scope
   21 | void add(int u,int v){to[++tot]=v,nex[tot]=head[u],head[u]=tot;}
      |                                 ^
answer.code:21:35: error: ‘nex’ was not declared in this scope
   21 | void add(int u,int v){to[++tot]=v,nex[tot]=head[u],head[u]=tot;}
      |                                   ^~~
answer.code:21:44: error: ‘head’ was not declared in this scope; did you mean ‘read’?
   21 | void add(int u,int v){to[++tot]=v,nex[tot]=head[u],head[u]=tot;}
      |                                            ^~~~
      |                                            read
answer.code:21:49: error: ‘u’ was not declared in this scope
   21 | void add(int u,int v){to[++tot]=v,nex[tot]=head[u],head[u]=tot;}
      |                                                 ^
answer.code: In function ‘int main()’:
answer.code:23:9: error: ‘n’ was not declared in this scope; did you mean ‘yn’?
   23 |         n=rd(),x=rd(),k=rd();
      |         ^
      |         yn
answer.code:23:11: error: ‘rd’ was not declared in this scope
   23 |         n=rd(),x=rd(),k=rd();
      |           ^~
answer.code:23:16: error: ‘x’ was not declared in this scope
   23 |         n=rd(),x=rd(),k=rd();
      |                ^
answer.code:23:23: error: ‘k’ was not declared in this scope
   23 |         n=rd(),x=rd(),k=rd();
      |                       ^
answer.code:24:17: error: expected ‘;’ before ‘i’
   24 |         for(int i=1;i<=k;i++){
      |                 ^
answer.code:24:17: error: ‘i’ was not declared in this scope
answer.code:24:25: error: expected ‘)’ before ‘;’ token
   24 |         for(int i=1;i<=k;i++){
      |            ~            ^
      |                         )
answer.code:24:26: error: ‘i’ was not declared in this scope
   24 |         for(int i=1;i<=k;i++){
      |                          ^
answer.code:28:16: error: ‘dis’ was not declared in this scope; did you mean ‘div’?
   28 |         memset(dis,0x3f,sizeof dis);
      |                ^~~
      |                div
answer.code:29:18: error: template argument 1 is invalid
   29 |         queue<int> q;
      |                  ^
answer.code:29:18: error: template argument 2 is invalid
answer.code:30:20: error: request for member ‘push’ in ‘q’, which is of non-class type ‘int’
   30 |         dis[0]=0,q.push(0);
      |                    ^~~~
answer.code:31:18: error: request for member ‘empty’ in ‘q’, which is of non-class type ‘int’
   31 |         while(!q.empty()){
      |                  ^~~~~
answer.code:32:21: error: expected initializer before ‘u’
   32 |                 int u=q.front();
      |                     ^
answer.code:33:19: error: request for member ‘pop’ in ‘q’, which is of non-class type ‘int’
   33 |                 q.pop();
      |                   ^~~
answer.code:34:25: error: expected ‘;’ before ‘i’
   34 |                 for(int i=head[u];i;i=nex[i])
      |                         ^
answer.code:34:27: error: ‘head’ was not declared in this scope; did you mean ‘read’?
   34 |                 for(int i=head[u];i;i=nex[i])
      |                           ^~~~
      |                           read
answer.code:34:32: error: ‘u’ was not declared in this scope
   34 |                 for(int i=head[u];i;i=nex[i])
      |                                ^
answer.code:34:36: error: expected ‘)’ before ‘;’ token
   34 |                 for(int i=head[u];i;i=nex[i])
      |          ...