QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#317906#7760. 化学实验locseyCompile Error//C++142.4kb2024-01-29 21:56:132024-01-29 21:56:14

详细

answer.code: In function ‘void Solver::access(int)’:
answer.code:45:142: error: return-statement with a value, in function returning ‘void’ [-fpermissive]
   45 |         inline void access(int x) {int y = 0; for(; x; y = x, x = f[x]) Splay(x), vsz[x] += sz[y] - sz[c[x][1]], c[x][1] = y, pus(y); return y;}
      |                                                                                                                                              ^
answer.code: In function ‘void Solver::link(int, int)’:
answer.code:66:34: error: void value not ignored as it ought to be
   66 |         access(x); int u = access(y);
      |                            ~~~~~~^~~
answer.code: In function ‘void Solver::mian()’:
answer.code:81:50: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long int’ [-Wformat=]
   81 |                 fprintf(stderr, "floor memery : %d\n", (&_st - &_ed) >> 20);
      |                                                 ~^     ~~~~~~~~~~~~~~~~~~~
      |                                                  |                   |
      |                                                  int                 long int
      |                                                 %ld