QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#594178#7691. B Road BandZhaoZiLongCompile Error//C++20938b2024-09-27 19:59:492024-09-27 19:59:49

Details

answer.code: In function ‘int main()’:
answer.code:5:5: error: ‘ios’ has not been declared
    5 |     ios::sync_with_stdio(false);
      |     ^~~
answer.code:6:5: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
    6 |     cin.tie(0);cout.tie(0);
      |     ^~~
      |     std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:146,
                 from answer.code:1:
/usr/include/c++/13/iostream:62:18: note: ‘std::cin’ declared here
   62 |   extern istream cin;           ///< Linked to standard input
      |                  ^~~
answer.code:6:16: error: ‘cout’ was not declared in this scope; did you mean ‘std::cout’?
    6 |     cin.tie(0);cout.tie(0);
      |                ^~~~
      |                std::cout
/usr/include/c++/13/iostream:63:18: note: ‘std::cout’ declared here
   63 |   extern ostream cout;          ///< Linked to standard output
      |                  ^~~~
answer.code:13:5: error: ‘vector’ was not declared in this scope
   13 |     vector<double> x(n);
      |     ^~~~~~
answer.code:13:5: note: suggested alternatives:
In file included from /usr/include/c++/13/vector:66,
                 from /usr/include/c++/13/functional:64,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:53:
/usr/include/c++/13/bits/stl_vector.h:425:11: note:   ‘std::vector’
  425 |     class vector : protected _Vector_base<_Tp, _Alloc>
      |           ^~~~~~
/usr/include/c++/13/vector:86:13: note:   ‘std::pmr::vector’
   86 |       using vector = std::vector<_Tp, polymorphic_allocator<_Tp>>;
      |             ^~~~~~
answer.code:13:12: error: expected primary-expression before ‘double’
   13 |     vector<double> x(n);
      |            ^~~~~~
answer.code:15:16: error: ‘x’ was not declared in this scope
   15 |         cin >> x[i];
      |                ^
answer.code:17:10: error: ‘x’ was not declared in this scope
   17 |     sort(x.begin(), x.end());
      |          ^
answer.code:17:5: error: ‘sort’ was not declared in this scope
   17 |     sort(x.begin(), x.end());
      |     ^~~~
answer.code:17:5: note: suggested alternatives:
In file included from /usr/include/c++/13/algorithm:73,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51:
/usr/include/c++/13/pstl/glue_algorithm_defs.h:296:1: note:   ‘std::sort’
  296 | sort(_ExecutionPolicy&& __exec, _RandomAccessIterator __first, _RandomAccessIterator __last);
      | ^~~~
In file included from /usr/include/c++/13/algorithm:63:
/usr/include/c++/13/bits/ranges_algo.h:1801:30: note:   ‘std::ranges::sort’
 1801 |   inline constexpr __sort_fn sort{};
      |                              ^~~~
answer.code:19:12: error: expected primary-expression before ‘double’
   19 |     vector<double> dp(n + 1, INFINITY);
      |            ^~~~~~
answer.code:20:5: error: ‘dp’ was not declared in this scope; did you mean ‘dup’?
   20 |     dp[0] = 0;
      |     ^~
      |     dup
answer.code:30:25: error: ‘min’ was not declared in this scope
   30 |                 dp[j] = min(dp[j], res);
      |                         ^~~
answer.code:30:25: note: suggested alternatives:
In file included from /usr/include/c++/13/algorithm:61:
/usr/include/c++/13/bits/stl_algo.h:5785:5: note:   ‘std::min’
 5785 |     min(initializer_list<_Tp> __l, _Compare __comp)
      |     ^~~
In file included from /usr/include/c++/13/bits/ranges_algo.h:39:
/usr/include/c++/13/bits/ranges_util.h:733:29: note:   ‘std::ranges::min’
  733 |   inline constexpr __min_fn min{};
      |                             ^~~
answer.code:37:13: error: ‘fixed’ was not declared in this scope
   37 |     cout << fixed << setprecision(10);
      |             ^~~~~
answer.code:37:13: note: suggested alternatives:
In file included from /usr/include/c++/13/streambuf:43,
                 from /usr/include/c++/13/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/13/iterator:66,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:54:
/usr/include/c++/13/bits/ios_base.h:1084:3: note:   ‘std::fixed’
 1084 |   fixed(ios_base& __base)
      |   ^~~~~
In file included from /usr/include/c++/13/format:39,
                 from /usr/include/c++/13/bits/chrono_io.h:39,
                 from /usr/include/c++/13/chrono:3330,
                 from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:172:
/usr/include/c++/13/charconv:637:21: note:   ‘std::chars_format::fixed’
  637 |     scientific = 1, fixed = 2, hex = 4, general = fixed | scientific
      |                     ^~~~~
answer.code:37:22: error: ‘setprecision’ was not declared in this scope; did you mean ‘std::setprecision’?
   37 |     cout << fixed << setprecision(10);
      |                      ^~~~~~~~~~~~
      |                      std::setprecision
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:143:
/usr/include/c++/13/iomanip:197:3: note: ‘std::setprecision’ declared here
  197 |   setprecision(int __n)...