Submission #1159260

#TimeUsernameProblemLanguageResultExecution timeMemory
1159260shnThe Potion of Great Power (CEOI20_potion)C++20
Compilation error
0 ms0 KiB
#include <bits/stdc++.h> #pragma GCC optimize("Ofast,O3,unroll-loops") #pragma GCC target("avx,avx2") using namespace std; #define pb push_back #define len(s) (int)(s.size()) #define F first #define S second #define pll pair < int , int > const int N = 2e5; int n , d , h[N]; int u , a[N], b[N]; pll last[N]; vector < vector < int > > g(N , vector < int > (2)); vector < int > f[N]; map < pll , int > mp; mt19937 rng(time(0)); void init(int N, int D, int H[]) { n = N; d = D; for(int i = 0; i < n; i++) h[i] = H[i]; } void curseChanges(int U, int A[], int B[]) { u = U; for(int i = 0; i < u; i++){ a[i] = A[i]; b[i] = B[i]; if(!last[a[i]].F) g[i][0].pb(b[i]); else{ for(int it : g[last[a[i]].F - 1][last[a[i]].S]) g[i][0].pb(it); if(!mp[{a[i] , b[i]}]) g[i][0].pb(b[i]); else{ vector < int > zam; for(int it : g[i][0]){ if(it != b[i]) zam.pb(it); } g[i][0].clear(); for(int it : zam) g[i][0].pb(it); } } if(!last[b[i]].F) g[i][1].pb(a[i]); else{ for(int it : g[last[b[i]].F - 1][last[b[i]].S]) g[i][1].pb(it); if(!mp[{a[i] , b[i]}]) g[i][1].pb(a[i]); else{ vector < int > zam; for(int it : g[i][1]){ if(it != a[i]) zam.pb(it); } g[i][1].clear(); for(int it : zam) g[i][1].pb(it); } } last[a[i]] = {i + 1 , 0}; last[b[i]] = {i + 1 , 1}; mp[{a[i] , b[i]}] ^= 1; mp[{b[i] , a[i]}] ^= 1; f[a[i]].pb(i); f[b[i]].pb(i); } } int find(int x , int w){ int l = 0 , r = len(f[x]) - 1 , res = u; while(l <= r){ int mid = (l + r) >> 1; if(f[x][mid] < w){ l = mid + 1; res = mid; } else{ r = mid - 1; } } return res; } int question(int x, int y, int v) { int lstx = find(x , v) , lsty = find(y , v); if(lstx == u || lsty == u) return 1000000000; int mn = 1000000000; int c = 0 , d = 0; if(a[f[x][lstx]] != x) c++; if(a[f[y][lsty]] != y) d++; for(int it : g[f[x][lstx]][c]){ for(int it2 : g[f[y][lsty]][d]){ mn = min(mn , abs(h[it] - h[it2])); } } return mn; } // int slow(int x , int y , int v){ // set < int > st , t; // map < int , int > e , j; // for(int i = 0; i < v; i++){ // if(a[i] == x){ // if(e[b[i]]) st.erase(b[i]); // else st.insert(b[i]); // e[b[i]] ^= 1; // } // else if(b[i] == x){ // if(e[a[i]]) st.erase(a[i]); // else st.insert(a[i]); // e[a[i]] ^= 1; // } // if(b[i] == y){ // if(j[a[i]]) t.erase(a[i]); // else t.insert(a[i]); // j[a[i]] ^= 1; // } // else if(a[i] == y){ // if(j[b[i]]) t.erase(b[i]); // else t.insert(b[i]); // j[b[i]] ^= 1; // } // } // // for(int it : st){ // // cout << it << ' '; // // } // // cout << '\n'; // // for(int it : t){ // // cout << it << ' '; // // } // // cout << '\n'; // int mn = 1000000000; // for(int it : st){ // for(int it2 : t){ // mn = min(mn , abs(h[it] - h[it2])); // } // } // return mn; // } // int main(){ // int N , D; // cin >> N >> D; // int H[N]; // for(int i = 0; i < N; i++) cin >> H[i]; // init(N, D, H); // int U; // cin >> U; // int A[U], B[U]; // for(int i = 0; i < U; i++) cin >> A[i]; // for(int i = 0; i < U; i++) cin >> B[i]; // curseChanges(U , A , B); // while(1){ // int x = rng() % N , y = rng() % N , v = rng() % U; // if(x == y) continue; // if(question(x , y , v) != slow(x , y , v)){ // cout << x << ' ' << y << ' ' << v << '\n'; // return 0; // } // } // // cout << question(5 , 4 , 10) << '\n'; // // cout << slow(5 , 4 , 10) << '\n'; // }

Compilation message (stderr)

potion.cpp: In function 'void curseChanges(int, int*, int*)':
potion.cpp:5:12: error: request for member 'push_back' in '(& g.std::vector<std::vector<int> >::operator[](((std::vector<std::vector<int> >::size_type)i)))->std::vector<int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
    5 | #define pb push_back
      |            ^~~~~~~~~
potion.cpp:37:43: note: in expansion of macro 'pb'
   37 |                 if(!last[a[i]].F) g[i][0].pb(b[i]);
      |                                           ^~
potion.cpp:39:70: error: 'begin' was not declared in this scope
   39 |                         for(int it : g[last[a[i]].F - 1][last[a[i]].S]) g[i][0].pb(it);
      |                                                                      ^
potion.cpp:39:70: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from potion.cpp:1:
/usr/include/c++/11/valarray:1228:5: note:   'std::begin'
 1228 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:561:44: note:   'std::ranges::__cust::begin'
  561 |     inline constexpr __cust_access::_Begin begin{};
      |                                            ^~~~~
In file included from /usr/include/c++/11/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
                 from potion.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:549:3: note:   'std::filesystem::__cxx11::begin'
  549 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
In file included from /usr/include/c++/11/bits/stl_iterator_base_types.h:71,
                 from /usr/include/c++/11/bits/stl_algobase.h:65,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from potion.cpp:1:
/usr/include/c++/11/bits/iterator_concepts.h:949:10: note:   'std::ranges::__cust_access::begin'
  949 |     void begin(const auto&) = delete;
      |          ^~~~~
potion.cpp:39:70: error: 'end' was not declared in this scope
   39 |                         for(int it : g[last[a[i]].F - 1][last[a[i]].S]) g[i][0].pb(it);
      |                                                                      ^
potion.cpp:39:70: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from potion.cpp:1:
/usr/include/c++/11/valarray:1255:5: note:   'std::end'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:562:42: note:   'std::ranges::__cust::end'
  562 |     inline constexpr __cust_access::_End end{};
      |                                          ^~~
In file included from /usr/include/c++/11/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
                 from potion.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:554:3: note:   'std::filesystem::__cxx11::end'
  554 |   end(recursive_directory_iterator) noexcept
      |   ^~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:136:10: note:   'std::ranges::__cust_access::end'
  136 |     void end(const auto&) = delete;
      |          ^~~
potion.cpp:5:12: error: request for member 'push_back' in '(& g.std::vector<std::vector<int> >::operator[](((std::vector<std::vector<int> >::size_type)i)))->std::vector<int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
    5 | #define pb push_back
      |            ^~~~~~~~~
potion.cpp:39:81: note: in expansion of macro 'pb'
   39 |                         for(int it : g[last[a[i]].F - 1][last[a[i]].S]) g[i][0].pb(it);
      |                                                                                 ^~
potion.cpp:5:12: error: request for member 'push_back' in '(& g.std::vector<std::vector<int> >::operator[](((std::vector<std::vector<int> >::size_type)i)))->std::vector<int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
    5 | #define pb push_back
      |            ^~~~~~~~~
potion.cpp:40:56: note: in expansion of macro 'pb'
   40 |                         if(!mp[{a[i] , b[i]}]) g[i][0].pb(b[i]);
      |                                                        ^~
potion.cpp:43:52: error: 'begin' was not declared in this scope
   43 |                                 for(int it : g[i][0]){
      |                                                    ^
potion.cpp:43:52: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from potion.cpp:1:
/usr/include/c++/11/valarray:1228:5: note:   'std::begin'
 1228 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:561:44: note:   'std::ranges::__cust::begin'
  561 |     inline constexpr __cust_access::_Begin begin{};
      |                                            ^~~~~
In file included from /usr/include/c++/11/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
                 from potion.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:549:3: note:   'std::filesystem::__cxx11::begin'
  549 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
In file included from /usr/include/c++/11/bits/stl_iterator_base_types.h:71,
                 from /usr/include/c++/11/bits/stl_algobase.h:65,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from potion.cpp:1:
/usr/include/c++/11/bits/iterator_concepts.h:949:10: note:   'std::ranges::__cust_access::begin'
  949 |     void begin(const auto&) = delete;
      |          ^~~~~
potion.cpp:43:52: error: 'end' was not declared in this scope
   43 |                                 for(int it : g[i][0]){
      |                                                    ^
potion.cpp:43:52: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from potion.cpp:1:
/usr/include/c++/11/valarray:1255:5: note:   'std::end'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:562:42: note:   'std::ranges::__cust::end'
  562 |     inline constexpr __cust_access::_End end{};
      |                                          ^~~
In file included from /usr/include/c++/11/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
                 from potion.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:554:3: note:   'std::filesystem::__cxx11::end'
  554 |   end(recursive_directory_iterator) noexcept
      |   ^~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:136:10: note:   'std::ranges::__cust_access::end'
  136 |     void end(const auto&) = delete;
      |          ^~~
potion.cpp:46:41: error: request for member 'clear' in '(& g.std::vector<std::vector<int> >::operator[](((std::vector<std::vector<int> >::size_type)i)))->std::vector<int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   46 |                                 g[i][0].clear();
      |                                         ^~~~~
potion.cpp:5:12: error: request for member 'push_back' in '(& g.std::vector<std::vector<int> >::operator[](((std::vector<std::vector<int> >::size_type)i)))->std::vector<int>::operator[](0)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
    5 | #define pb push_back
      |            ^~~~~~~~~
potion.cpp:47:59: note: in expansion of macro 'pb'
   47 |                                 for(int it : zam) g[i][0].pb(it);
      |                                                           ^~
potion.cpp:5:12: error: request for member 'push_back' in '(& g.std::vector<std::vector<int> >::operator[](((std::vector<std::vector<int> >::size_type)i)))->std::vector<int>::operator[](1)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
    5 | #define pb push_back
      |            ^~~~~~~~~
potion.cpp:50:43: note: in expansion of macro 'pb'
   50 |                 if(!last[b[i]].F) g[i][1].pb(a[i]);
      |                                           ^~
potion.cpp:52:70: error: 'begin' was not declared in this scope
   52 |                         for(int it : g[last[b[i]].F - 1][last[b[i]].S]) g[i][1].pb(it);
      |                                                                      ^
potion.cpp:52:70: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from potion.cpp:1:
/usr/include/c++/11/valarray:1228:5: note:   'std::begin'
 1228 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:561:44: note:   'std::ranges::__cust::begin'
  561 |     inline constexpr __cust_access::_Begin begin{};
      |                                            ^~~~~
In file included from /usr/include/c++/11/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
                 from potion.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:549:3: note:   'std::filesystem::__cxx11::begin'
  549 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
In file included from /usr/include/c++/11/bits/stl_iterator_base_types.h:71,
                 from /usr/include/c++/11/bits/stl_algobase.h:65,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from potion.cpp:1:
/usr/include/c++/11/bits/iterator_concepts.h:949:10: note:   'std::ranges::__cust_access::begin'
  949 |     void begin(const auto&) = delete;
      |          ^~~~~
potion.cpp:52:70: error: 'end' was not declared in this scope
   52 |                         for(int it : g[last[b[i]].F - 1][last[b[i]].S]) g[i][1].pb(it);
      |                                                                      ^
potion.cpp:52:70: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from potion.cpp:1:
/usr/include/c++/11/valarray:1255:5: note:   'std::end'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:562:42: note:   'std::ranges::__cust::end'
  562 |     inline constexpr __cust_access::_End end{};
      |                                          ^~~
In file included from /usr/include/c++/11/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
                 from potion.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:554:3: note:   'std::filesystem::__cxx11::end'
  554 |   end(recursive_directory_iterator) noexcept
      |   ^~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:136:10: note:   'std::ranges::__cust_access::end'
  136 |     void end(const auto&) = delete;
      |          ^~~
potion.cpp:5:12: error: request for member 'push_back' in '(& g.std::vector<std::vector<int> >::operator[](((std::vector<std::vector<int> >::size_type)i)))->std::vector<int>::operator[](1)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
    5 | #define pb push_back
      |            ^~~~~~~~~
potion.cpp:52:81: note: in expansion of macro 'pb'
   52 |                         for(int it : g[last[b[i]].F - 1][last[b[i]].S]) g[i][1].pb(it);
      |                                                                                 ^~
potion.cpp:5:12: error: request for member 'push_back' in '(& g.std::vector<std::vector<int> >::operator[](((std::vector<std::vector<int> >::size_type)i)))->std::vector<int>::operator[](1)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
    5 | #define pb push_back
      |            ^~~~~~~~~
potion.cpp:53:56: note: in expansion of macro 'pb'
   53 |                         if(!mp[{a[i] , b[i]}]) g[i][1].pb(a[i]);
      |                                                        ^~
potion.cpp:56:52: error: 'begin' was not declared in this scope
   56 |                                 for(int it : g[i][1]){
      |                                                    ^
potion.cpp:56:52: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from potion.cpp:1:
/usr/include/c++/11/valarray:1228:5: note:   'std::begin'
 1228 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:561:44: note:   'std::ranges::__cust::begin'
  561 |     inline constexpr __cust_access::_Begin begin{};
      |                                            ^~~~~
In file included from /usr/include/c++/11/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
                 from potion.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:549:3: note:   'std::filesystem::__cxx11::begin'
  549 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
In file included from /usr/include/c++/11/bits/stl_iterator_base_types.h:71,
                 from /usr/include/c++/11/bits/stl_algobase.h:65,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from potion.cpp:1:
/usr/include/c++/11/bits/iterator_concepts.h:949:10: note:   'std::ranges::__cust_access::begin'
  949 |     void begin(const auto&) = delete;
      |          ^~~~~
potion.cpp:56:52: error: 'end' was not declared in this scope
   56 |                                 for(int it : g[i][1]){
      |                                                    ^
potion.cpp:56:52: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from potion.cpp:1:
/usr/include/c++/11/valarray:1255:5: note:   'std::end'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:562:42: note:   'std::ranges::__cust::end'
  562 |     inline constexpr __cust_access::_End end{};
      |                                          ^~~
In file included from /usr/include/c++/11/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
                 from potion.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:554:3: note:   'std::filesystem::__cxx11::end'
  554 |   end(recursive_directory_iterator) noexcept
      |   ^~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:136:10: note:   'std::ranges::__cust_access::end'
  136 |     void end(const auto&) = delete;
      |          ^~~
potion.cpp:59:41: error: request for member 'clear' in '(& g.std::vector<std::vector<int> >::operator[](((std::vector<std::vector<int> >::size_type)i)))->std::vector<int>::operator[](1)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
   59 |                                 g[i][1].clear();
      |                                         ^~~~~
potion.cpp:5:12: error: request for member 'push_back' in '(& g.std::vector<std::vector<int> >::operator[](((std::vector<std::vector<int> >::size_type)i)))->std::vector<int>::operator[](1)', which is of non-class type '__gnu_cxx::__alloc_traits<std::allocator<int>, int>::value_type' {aka 'int'}
    5 | #define pb push_back
      |            ^~~~~~~~~
potion.cpp:60:59: note: in expansion of macro 'pb'
   60 |                                 for(int it : zam) g[i][1].pb(it);
      |                                                           ^~
potion.cpp: In function 'int question(int, int, int)':
potion.cpp:94:37: error: 'begin' was not declared in this scope
   94 |         for(int it : g[f[x][lstx]][c]){
      |                                     ^
potion.cpp:94:37: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from potion.cpp:1:
/usr/include/c++/11/valarray:1228:5: note:   'std::begin'
 1228 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:561:44: note:   'std::ranges::__cust::begin'
  561 |     inline constexpr __cust_access::_Begin begin{};
      |                                            ^~~~~
In file included from /usr/include/c++/11/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
                 from potion.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:549:3: note:   'std::filesystem::__cxx11::begin'
  549 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
In file included from /usr/include/c++/11/bits/stl_iterator_base_types.h:71,
                 from /usr/include/c++/11/bits/stl_algobase.h:65,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from potion.cpp:1:
/usr/include/c++/11/bits/iterator_concepts.h:949:10: note:   'std::ranges::__cust_access::begin'
  949 |     void begin(const auto&) = delete;
      |          ^~~~~
potion.cpp:94:37: error: 'end' was not declared in this scope
   94 |         for(int it : g[f[x][lstx]][c]){
      |                                     ^
potion.cpp:94:37: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from potion.cpp:1:
/usr/include/c++/11/valarray:1255:5: note:   'std::end'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:562:42: note:   'std::ranges::__cust::end'
  562 |     inline constexpr __cust_access::_End end{};
      |                                          ^~~
In file included from /usr/include/c++/11/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
                 from potion.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:554:3: note:   'std::filesystem::__cxx11::end'
  554 |   end(recursive_directory_iterator) noexcept
      |   ^~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:136:10: note:   'std::ranges::__cust_access::end'
  136 |     void end(const auto&) = delete;
      |          ^~~
potion.cpp:95:46: error: 'begin' was not declared in this scope
   95 |                 for(int it2 : g[f[y][lsty]][d]){
      |                                              ^
potion.cpp:95:46: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from potion.cpp:1:
/usr/include/c++/11/valarray:1228:5: note:   'std::begin'
 1228 |     begin(const valarray<_Tp>& __va) noexcept
      |     ^~~~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:561:44: note:   'std::ranges::__cust::begin'
  561 |     inline constexpr __cust_access::_Begin begin{};
      |                                            ^~~~~
In file included from /usr/include/c++/11/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
                 from potion.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:549:3: note:   'std::filesystem::__cxx11::begin'
  549 |   begin(recursive_directory_iterator __iter) noexcept
      |   ^~~~~
In file included from /usr/include/c++/11/bits/stl_iterator_base_types.h:71,
                 from /usr/include/c++/11/bits/stl_algobase.h:65,
                 from /usr/include/c++/11/bits/specfun.h:45,
                 from /usr/include/c++/11/cmath:1935,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
                 from potion.cpp:1:
/usr/include/c++/11/bits/iterator_concepts.h:949:10: note:   'std::ranges::__cust_access::begin'
  949 |     void begin(const auto&) = delete;
      |          ^~~~~
potion.cpp:95:46: error: 'end' was not declared in this scope
   95 |                 for(int it2 : g[f[y][lsty]][d]){
      |                                              ^
potion.cpp:95:46: note: suggested alternatives:
In file included from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:95,
                 from potion.cpp:1:
/usr/include/c++/11/valarray:1255:5: note:   'std::end'
 1255 |     end(const valarray<_Tp>& __va) noexcept
      |     ^~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:562:42: note:   'std::ranges::__cust::end'
  562 |     inline constexpr __cust_access::_End end{};
      |                                          ^~~
In file included from /usr/include/c++/11/filesystem:46,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:129,
                 from potion.cpp:1:
/usr/include/c++/11/bits/fs_dir.h:554:3: note:   'std::filesystem::__cxx11::end'
  554 |   end(recursive_directory_iterator) noexcept
      |   ^~~
In file included from /usr/include/c++/11/string_view:48,
                 from /usr/include/c++/11/bits/basic_string.h:48,
                 from /usr/include/c++/11/string:55,
                 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/istream:38,
                 from /usr/include/c++/11/sstream:38,
                 from /usr/include/c++/11/complex:45,
                 from /usr/include/c++/11/ccomplex:39,
                 from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:54,
                 from potion.cpp:1:
/usr/include/c++/11/bits/ranges_base.h:136:10: note:   'std::ranges::__cust_access::end'
  136 |     void end(const auto&) = delete;
      |          ^~~