QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#68460#4152. 工作安排 MaMengQiCompile Error//C2.2kb2022-12-16 16:57:032022-12-16 16:57:04

详细

answer.code:2:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
    2 | include<cstdio>
      |        ^
answer.code:14:1: error: unknown type name ‘node’; use ‘struct’ keyword to refer to the type
   14 | node way[N*10];
      | ^~~~
      | struct 
answer.code:14:6: error: variably modified ‘way’ at file scope
   14 | node way[N*10];
      |      ^~~
answer.code:15:5: error: variably modified ‘st’ at file scope
   15 | int st[N],tot=-1,pre[N],dis[N],q[N],tou,wei;
      |     ^~
answer.code:15:18: error: variably modified ‘pre’ at file scope
   15 | int st[N],tot=-1,pre[N],dis[N],q[N],tou,wei;
      |                  ^~~
answer.code:15:25: error: variably modified ‘dis’ at file scope
   15 | int st[N],tot=-1,pre[N],dis[N],q[N],tou,wei;
      |                         ^~~
answer.code:15:32: error: variably modified ‘q’ at file scope
   15 | int st[N],tot=-1,pre[N],dis[N],q[N],tou,wei;
      |                                ^
answer.code:16:9: error: variably modified ‘ci’ at file scope
   16 | int n,m,ci[N],mp[300][300],S[N],T[300][10],W[300][10],s,t;
      |         ^~
answer.code:16:28: error: variably modified ‘S’ at file scope
   16 | int n,m,ci[N],mp[300][300],S[N],T[300][10],W[300][10],s,t;
      |                            ^
answer.code:17:1: error: unknown type name ‘bool’
   17 | bool p[N];
      | ^~~~
answer.code:17:6: error: variably modified ‘p’ at file scope
   17 | bool p[N];
      |      ^
answer.code: In function ‘add’:
answer.code:22:13: error: request for member ‘x’ in something not a structure or union
   22 |     way[tot].x=u;way[tot].y=w;way[tot].v=v;way[tot].c=cc;way[tot].nxt=st[u];st[u]=tot;
      |             ^
answer.code:22:26: error: request for member ‘y’ in something not a structure or union
   22 |     way[tot].x=u;way[tot].y=w;way[tot].v=v;way[tot].c=cc;way[tot].nxt=st[u];st[u]=tot;
      |                          ^
answer.code:22:39: error: request for member ‘v’ in something not a structure or union
   22 |     way[tot].x=u;way[tot].y=w;way[tot].v=v;way[tot].c=cc;way[tot].nxt=st[u];st[u]=tot;
      |                                       ^
answer.code:22:52: error: request for member ‘c’ in something not a structure or union
   22 |     way[tot].x=u;way[tot].y=w;way[tot].v=v;way[tot].c=cc;way[tot].nxt=st[u];st[u]=tot;
      |                                                    ^
answer.code:22:66: error: request for member ‘nxt’ in something not a structure or union
   22 |     way[tot].x=u;way[tot].y=w;way[tot].v=v;way[tot].c=cc;way[tot].nxt=st[u];st[u]=tot;
      |                                                                  ^
answer.code:24:13: error: request for member ‘x’ in something not a structure or union
   24 |     way[tot].x=w;way[tot].y=u;way[tot].v=0;way[tot].c=-cc;way[tot].nxt=st[w];st[w]=tot;
      |             ^
answer.code:24:26: error: request for member ‘y’ in something not a structure or union
   24 |     way[tot].x=w;way[tot].y=u;way[tot].v=0;way[tot].c=-cc;way[tot].nxt=st[w];st[w]=tot;
      |                          ^
answer.code:24:39: error: request for member ‘v’ in something not a structure or union
   24 |     way[tot].x=w;way[tot].y=u;way[tot].v=0;way[tot].c=-cc;way[tot].nxt=st[w];st[w]=tot;
      |                                       ^
answer.code:24:52: error: request for member ‘c’ in something not a structure or union
   24 |     way[tot].x=w;way[tot].y=u;way[tot].v=0;way[tot].c=-cc;way[tot].nxt=st[w];st[w]=tot;
      |                                                    ^
answer.code:24:67: error: request for member ‘nxt’ in something not a structure or union
   24 |     way[tot].x=w;way[tot].y=u;way[tot].v=0;way[tot].c=-cc;way[tot].nxt=st[w];st[w]=tot;
      |                                                                   ^
answer.code: In function ‘spfa’:
answer.code:29:5: warning: implicit declaration of function ‘memset’ [-Wimplicit-function-declaration]
   29 |     memset(pre,-1,sizeof(pre));
      |     ^~~~~~
answer.code:29:5: warning: incompatible implicit declaration of built-in function ‘memset’
answer.code:1:1: note: include ‘<string.h>’ or provide a declaration of ‘memset’
  +++ |+#include <string.h>
    1 | 
answer.code:38:40: error: request for member ‘nxt’ in something not a structure or union
   38 |         for (int i=st[r];i!=-1;i=way[i].nxt)
      |                                        ^
answer.code:39:23: error: request for member ‘v’ in something not a structure or union
   39 |             if (way[i].v&&dis[r]+way[i].c<dis[way[i].y])
      |                       ^
answer.code:39:40: error: request for member ‘c’ in something not a structure or union
   39 |             if (way[i].v&&dis[r]+way[i].c<dis[way[i].y])
      |                                        ^
answer.code:39:53: error: request for member ‘y’ in something not a structure or union
   39 |             if (way[i].v&&dis[r]+way[i].c<dis[way[i].y])
      |                                                     ^
answe...