QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#758874#9576. Ordainer of Inexorable Judgmentucup-team3953#Compile Error//C++204.5kb2024-11-17 20:12:302024-11-17 20:12:31

Details

answer.code:8:1: error: ‘db’ does not name a type
    8 | db X[MAXN], Y[MAXN];
      | ^~
answer.code: In function ‘int main()’:
answer.code:38:16: error: ‘X’ was not declared in this scope
   38 |         cin >> X[i] >> Y[i];
      |                ^
answer.code:38:24: error: ‘Y’ was not declared in this scope
   38 |         cin >> X[i] >> Y[i];
      |                        ^
answer.code:51:16: error: ‘X’ was not declared in this scope
   51 |         db x = X[i], y = Y[i];
      |                ^
answer.code:52:27: error: ‘y’ was not declared in this scope
   52 |         db d = get_dis(x, y, 0, 0);
      |                           ^
answer.code:86:17: error: ‘X’ was not declared in this scope
   86 |         db x1 = X[i], x2 = i == n ? X[1] : X[i + 1];
      |                 ^
answer.code:87:17: error: ‘Y’ was not declared in this scope
   87 |         db y1 = Y[i], y2 = i == n ? Y[1] : Y[i + 1];
      |                 ^
answer.code:91:17: error: ‘x2’ was not declared in this scope; did you mean ‘xx’?
   91 |         db vx = x2 - x1;
      |                 ^~
      |                 xx
answer.code:92:17: error: ‘y2’ was not declared in this scope; did you mean ‘yy’?
   92 |         db vy = y2 - y1;
      |                 ^~
      |                 yy
answer.code:118:24: error: no matching function for call to ‘std::vector<std::pair<long double, int> >::push_back(<brace-enclosed initializer list>)’
  118 |             V.push_back({ natan(x2, y2),  1 });
      |             ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
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,
                 from answer.code:1:
/usr/include/c++/13/bits/stl_vector.h:1278:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = std::pair<long double, int>; _Alloc = std::allocator<std::pair<long double, int> >; value_type = std::pair<long double, int>]’
 1278 |       push_back(const value_type& __x)
      |       ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1278:35: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘const std::vector<std::pair<long double, int> >::value_type&’ {aka ‘const std::pair<long double, int>&’}
 1278 |       push_back(const value_type& __x)
      |                 ~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/13/bits/stl_vector.h:1295:7: note: candidate: ‘constexpr void std::vector<_Tp, _Alloc>::push_back(value_type&&) [with _Tp = std::pair<long double, int>; _Alloc = std::allocator<std::pair<long double, int> >; value_type = std::pair<long double, int>]’
 1295 |       push_back(value_type&& __x)
      |       ^~~~~~~~~
/usr/include/c++/13/bits/stl_vector.h:1295:30: note:   no known conversion for argument 1 from ‘<brace-enclosed initializer list>’ to ‘std::vector<std::pair<long double, int> >::value_type&&’ {aka ‘std::pair<long double, int>&&’}
 1295 |       push_back(value_type&& __x)
      |                 ~~~~~~~~~~~~~^~~