QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#21061#1293. Date PickupqwqCompile Error//C++113.7kb2022-02-27 01:14:152022-05-18 04:10:46

詳細信息

answer.code: In function ‘std::vector<long int> calc_distances(const std::vector<std::pair<int, long int> >&, const graph_t&)’:
answer.code:20:66: error: wrong number of template arguments (0, should be 1)
   20 |   std::priority_queue<int64_t, std::vector<int64_t>, std::greater<>> best;
      |                                                                  ^
In file included from /usr/include/c++/11/string:48,
                 from /usr/include/c++/11/bits/locale_classes.h:40,
                 from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from answer.code:6:
/usr/include/c++/11/bits/stl_function.h:371:12: note: provided for ‘template<class _Tp> struct std::greater’
  371 |     struct greater : public binary_function<_Tp, _Tp, bool>
      |            ^~~~~~~
answer.code:20:67: error: template argument 3 is invalid
   20 |   std::priority_queue<int64_t, std::vector<int64_t>, std::greater<>> best;
      |                                                                   ^~
answer.code:23:10: error: request for member ‘emplace’ in ‘best’, which is of non-class type ‘int’
   23 |     best.emplace((pair.second << 17) | pair.first);
      |          ^~~~~~~
answer.code:27:16: error: request for member ‘empty’ in ‘best’, which is of non-class type ‘int’
   27 |   while (!best.empty()) {
      |                ^~~~~
answer.code:28:22: error: request for member ‘top’ in ‘best’, which is of non-class type ‘int’
   28 |     int64_t d = best.top() >> 17;
      |                      ^~~
answer.code:29:20: error: request for member ‘top’ in ‘best’, which is of non-class type ‘int’
   29 |     int cur = best.top() & kPack;
      |                    ^~~
answer.code:30:10: error: request for member ‘pop’ in ‘best’, which is of non-class type ‘int’
   30 |     best.pop();
      |          ^~~
answer.code:36:14: error: request for member ‘emplace’ in ‘best’, which is of non-class type ‘int’
   36 |         best.emplace((dist[pair.first] << 17) | pair.first);
      |              ^~~~~~~
answer.code: In function ‘int main()’:
answer.code:102:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  102 |   scanf("%ld %ld", &a, &b);
      |   ~~~~~^~~~~~~~~~~~~~~~~~~
answer.code:104:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  104 |   scanf("%d %d", &n, &m);
      |   ~~~~~^~~~~~~~~~~~~~~~~
answer.code:110:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
  110 |     scanf("%d %d %d", &u, &v, &t);
      |     ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~