Submission #427267

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
4272672021-06-14 13:52:02model_codeRobot Race (CPSPC17_race)C++17
Compilation error
0 ms0 KiB
#include <bitset>
#include <cassert>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
const int MAXN = 1000;
const int MAXQ = 1000000;
int n, m, q;
bool empty[MAXN][MAXN];
bitset<MAXN> f[MAXN][MAXN], g[MAXN][MAXN];
int sr[MAXQ], sc[MAXQ], tr[MAXQ], tc[MAXQ];
bool ans[MAXQ];
void rec(int from, int to, const vector<int>& remain) {
if (from > to) return;
int mid = (from + to) / 2;
for (int i = mid; i >= from; i--) {
for (int j = m - 1; j >= 0; j--) {
f[i][j] = 0;
if (empty[i][j]) {
if (i == mid) {
f[i][j][j] = 1;
} else {
f[i][j] |= f[i + 1][j];
}
if (j != m - 1) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

Main.cpp: In function 'void rec(int, int, const std::vector<int>&)':
Main.cpp:24:8: error: reference to 'empty' is ambiguous
   24 |    if (empty[i][j]) {
      |        ^~~~~
In file included from /usr/include/c++/10/string:54,
                 from /usr/include/c++/10/bitset:47,
                 from Main.cpp:1:
/usr/include/c++/10/bits/range_access.h:281:5: note: candidates are: 'template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)'
  281 |     empty(initializer_list<_Tp> __il) noexcept
      |     ^~~~~
/usr/include/c++/10/bits/range_access.h:272:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])'
  272 |     empty(const _Tp (&)[_Nm]) noexcept
      |     ^~~~~
/usr/include/c++/10/bits/range_access.h:263:5: note:                 'template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)'
  263 |     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
      |     ^~~~~
Main.cpp:13:6: note:                 'bool empty [1000][1000]'
   13 | bool empty[MAXN][MAXN];
      |      ^~~~~
Main.cpp:39:8: error: reference to 'empty' is ambiguous
   39 |    if (empty[i][j]) {
      |        ^~~~~
In file included from /usr/include/c++/10/string:54,
                 from /usr/include/c++/10/bitset:47,
                 from Main.cpp:1:
/usr/include/c++/10/bits/range_access.h:281:5: note: candidates are: 'template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)'
  281 |     empty(initializer_list<_Tp> __il) noexcept
      |     ^~~~~
/usr/include/c++/10/bits/range_access.h:272:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])'
  272 |     empty(const _Tp (&)[_Nm]) noexcept
      |     ^~~~~
/usr/include/c++/10/bits/range_access.h:263:5: note:                 'template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)'
  263 |     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
      |     ^~~~~
Main.cpp:13:6: note:                 'bool empty [1000][1000]'
   13 | bool empty[MAXN][MAXN];
      |      ^~~~~
Main.cpp: In function 'int main()':
Main.cpp:76:4: error: reference to 'empty' is ambiguous
   76 |    empty[i][j] = s[j] == '.';
      |    ^~~~~
In file included from /usr/include/c++/10/string:54,
                 from /usr/include/c++/10/bitset:47,
                 from Main.cpp:1:
/usr/include/c++/10/bits/range_access.h:281:5: note: candidates are: 'template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)'
  281 |     empty(initializer_list<_Tp> __il) noexcept
      |     ^~~~~
/usr/include/c++/10/bits/range_access.h:272:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])'
  272 |     empty(const _Tp (&)[_Nm]) noexcept
      |     ^~~~~
/usr/include/c++/10/bits/range_access.h:263:5: note:                 'template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)'
  263 |     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
      |     ^~~~~
Main.cpp:13:6: note:                 'bool empty [1000][1000]'
   13 | bool empty[MAXN][MAXN];
      |      ^~~~~
In file included from /usr/include/c++/10/cassert:44,
                 from Main.cpp:2:
Main.cpp:87:10: error: reference to 'empty' is ambiguous
   87 |   assert(empty[sr[i]][sc[i]]);
      |          ^~~~~
In file included from /usr/include/c++/10/string:54,
                 from /usr/include/c++/10/bitset:47,
                 from Main.cpp:1:
/usr/include/c++/10/bits/range_access.h:281:5: note: candidates are: 'template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)'
  281 |     empty(initializer_list<_Tp> __il) noexcept
      |     ^~~~~
/usr/include/c++/10/bits/range_access.h:272:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])'
  272 |     empty(const _Tp (&)[_Nm]) noexcept
      |     ^~~~~
/usr/include/c++/10/bits/range_access.h:263:5: note:                 'template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)'
  263 |     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
      |     ^~~~~
Main.cpp:13:6: note:                 'bool empty [1000][1000]'
   13 | bool empty[MAXN][MAXN];
      |      ^~~~~
In file included from /usr/include/c++/10/cassert:44,
                 from Main.cpp:2:
Main.cpp:88:10: error: reference to 'empty' is ambiguous
   88 |   assert(empty[tr[i]][tc[i]]);
      |          ^~~~~
In file included from /usr/include/c++/10/string:54,
                 from /usr/include/c++/10/bitset:47,
                 from Main.cpp:1:
/usr/include/c++/10/bits/range_access.h:281:5: note: candidates are: 'template<class _Tp> constexpr bool std::empty(std::initializer_list<_Tp>)'
  281 |     empty(initializer_list<_Tp> __il) noexcept
      |     ^~~~~
/usr/include/c++/10/bits/range_access.h:272:5: note:                 'template<class _Tp, long unsigned int _Nm> constexpr bool std::empty(const _Tp (&)[_Nm])'
  272 |     empty(const _Tp (&)[_Nm]) noexcept
      |     ^~~~~
/usr/include/c++/10/bits/range_access.h:263:5: note:                 'template<class _Container> constexpr decltype (__cont.empty()) std::empty(const _Container&)'
  263 |     empty(const _Container& __cont) noexcept(noexcept(__cont.empty()))
      |     ^~~~~
Main.cpp:13:6: note:                 'bool empty [1000][1000]'
   13 | bool empty[MAXN][MAXN];
      |      ^~~~~