QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#181216#7184. Transport Plusesucup-team012#Compile Error//C++143.4kb2023-09-16 16:48:242023-09-16 16:48:24

詳細信息

answer.code: In function ‘int main()’:
answer.code:14:16: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
   14 |         auto &&[x, y] = points[i];
      |                ^
answer.code:19:12: error: missing template arguments before ‘g’
   19 |     vector g(20000, vector<pair<int, double>>());
      |            ^
answer.code:30:20: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
   30 |             auto &&[xj, yj] = points[j];
      |                    ^
answer.code:32:13: error: ‘g’ was not declared in this scope
   32 |             g[xi * 101 + yi].emplace_back(11110 + j, vdist);
      |             ^
answer.code:34:9: error: ‘g’ was not declared in this scope
   34 |         g[xi * 101 + yi].emplace_back(
      |         ^
answer.code:40:16: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
   40 |         auto &&[x, y] = points[i];
      |                ^
answer.code:42:13: error: ‘g’ was not declared in this scope
   42 |             g[11110 + i].emplace_back(x * 101 + j, t);
      |             ^
answer.code:54:14: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
   54 |         auto [currentDist, sourcePtn] = que.top();
      |              ^
answer.code:57:21: warning: structured bindings only available with ‘-std=c++17’ or ‘-std=gnu++17’
   57 |         for (auto &&[targetPtn, edgeLen] : g[sourcePtn]) {
      |                     ^
answer.code:57:44: error: ‘g’ was not declared in this scope
   57 |         for (auto &&[targetPtn, edgeLen] : g[sourcePtn]) {
      |                                            ^
answer.code:61:21: error: no matching function for call to ‘std::priority_queue<std::pair<double, int>, std::vector<std::pair<double, int> >, std::greater<std::pair<double, int> > >::push(<brace-enclosed initializer list>)’
   61 |             que.push({dist[targetPtn], targetPtn});
      |             ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/queue:64,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:86,
                 from answer.code:1:
/usr/include/c++/11/bits/stl_queue.h:640:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<double, int>; _Sequence = std::vector<std::pair<double, int> >; _Compare = std::greater<std::pair<double, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<double, int>]’
  640 |       push(const value_type& __x)
      |       ^~~~
/usr/include/c++/11/bits/stl_queue.h:640:30: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const value_type&’ {aka ‘const std::pair<double, int>&’}
  640 |       push(const value_type& __x)
      |            ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/11/bits/stl_queue.h:648:7: note: candidate: ‘void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = std::pair<double, int>; _Sequence = std::vector<std::pair<double, int> >; _Compare = std::greater<std::pair<double, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<double, int>]’
  648 |       push(value_type&& __x)
      |       ^~~~
/usr/include/c++/11/bits/stl_queue.h:648:25: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::priority_queue<std::pair<double, int>, std::vector<std::pair<double, int> >, std::greater<std::pair<double, int> > >::value_type&&’ {aka ‘std::pair<double, int>&&’}
  648 |       push(value_type&& __x)
      |            ~~~~~~~~~~~~~^~~
answer.code:76:14: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘std::stack<int>::size_type’ {aka ‘long unsigned int’} [-Wformat=]
   76 |     printf("%d\n", path.size()-1);
      |             ~^     ~~~~~~~~~~~~~
      |              |                |
      |              int              std::stack<int>::size_type {aka long unsigned int}
      |             %ld