QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#44895#4561. Catfish FarmZhaoZiLongCompile Error//C++141.8kb2022-08-22 11:26:052022-08-22 11:26:06

詳細信息

answer.code:7:1: error: ‘vector’ does not name a type
    7 | vector<pair<long long, long long>> v[305];
      | ^~~~~~
answer.code: In function ‘long long int max_weights(int, int, std::vector<int>, std::vector<int>, std::vector<int>)’:
answer.code:25:9: error: ‘v’ was not declared in this scope
   25 |         v[i].clear();
      |         ^
answer.code:26:9: error: ‘summ’ was not declared in this scope
   26 |         summ[i].clear();
      |         ^~~~
answer.code:35:24: error: ‘m’ was not declared in this scope
   35 |     for(int i = 0; i < m; i++){
      |                        ^
answer.code:50:9: error: ‘v’ was not declared in this scope
   50 |         v[X[i]].push_back({Y[i], W[i]});
      |         ^
answer.code:60:16: error: ‘max’ was not declared in this scope; did you mean ‘std::max’?
   60 |         return max(sum0, sum - sum0);
      |                ^~~
      |                std::max
In file included from /usr/include/c++/11/algorithm:62,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
                 from answer.code:3:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
 3467 |     max(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~