QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#832177#1878. No Rest for the Wickedjqh333Compile Error//C++142.4kb2024-12-25 19:25:412024-12-25 19:25:42

详细

answer.code: In function ‘void dsu::modify(int, int)’:
answer.code:8:40: error: ‘findfa’ was not declared in this scope
    8 |         void modify(int u, int w) {u = findfa(u); stk.push({u, u, val[u]}); val[u] = max(val[u], w);}
      |                                        ^~~~~~
answer.code: In function ‘int main()’:
answer.code:37:24: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   37 |         int n, m; scanf("%d %d", &n, &m);
      |                   ~~~~~^~~~~~~~~~~~~~~~~
answer.code:39:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   39 |                 scanf("%d %d %d", &c[i], &t[i], &s[i]); a.push_back(c[i]); a.push_back(t[i] + 1);
      |                 ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
answer.code:49:32: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   49 |                 int u, v; scanf("%d %d", &u, &v); if (c[u] > c[v]) swap(u, v);
      |                           ~~~~~^~~~~~~~~~~~~~~~~