# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
983797 | 2024-05-16T06:20:08 Z | batsukh2006 | Game (APIO22_game) | C++17 | Compilation error |
0 ms | 0 KB |
#include "game.h" #include<bits/stdc++.h> using namespace std; const int mxN=3e4; bitset<mxN> f,s;//ireh,ochih vector<bitset<mxN> > pt[mxN],cd[mxN];//etseg,huuhed void init(int n, int k){ for(int i=0; i<k; i++) f[i]=s[i]=1; for(int i=0; i<n; i++) pt[i][i]=cd[i][i]=1; for(int i=k-2; i>=0; i--) cd[i]|=cd[i+1]; for(int i=1; i<k; i++) pt[i]|=pt[i-1]; } int add_teleporter(int u, int v){ cd[u]|=cd[v]; pt[v]|=pt[u]; if(s[v]) s|=pt[v]; if(f[u]) f|=cd[u]; if(f[u]&&s[v]) return 1; else return 0; }
Compilation message
game.cpp: In function 'void init(int, int)': game.cpp:10:33: error: no match for 'operator|=' (operand types are 'std::vector<std::bitset<30000> >' and 'std::vector<std::bitset<30000> >') 10 | for(int i=k-2; i>=0; i--) cd[i]|=cd[i+1]; | ~~~~~^~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:45, from game.cpp:2: /usr/include/c++/10/cstddef:160:3: note: candidate: 'constexpr std::byte& std::operator|=(std::byte&, std::byte)' 160 | operator|=(byte& __l, byte __r) noexcept | ^~~~~~~~ /usr/include/c++/10/cstddef:160:20: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::byte&' 160 | operator|=(byte& __l, byte __r) noexcept | ~~~~~~^~~ In file included from /usr/include/c++/10/ios:42, from /usr/include/c++/10/istream:38, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from game.cpp:2: /usr/include/c++/10/bits/ios_base.h:99:3: note: candidate: 'const std::_Ios_Fmtflags& std::operator|=(std::_Ios_Fmtflags&, std::_Ios_Fmtflags)' 99 | operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:99:29: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::_Ios_Fmtflags&' 99 | operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/ios_base.h:141:3: note: candidate: 'const std::_Ios_Openmode& std::operator|=(std::_Ios_Openmode&, std::_Ios_Openmode)' 141 | operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:141:29: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::_Ios_Openmode&' 141 | operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/ios_base.h:181:3: note: candidate: 'const std::_Ios_Iostate& std::operator|=(std::_Ios_Iostate&, std::_Ios_Iostate)' 181 | operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:181:28: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::_Ios_Iostate&' 181 | operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) | ~~~~~~~~~~~~~~^~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:105, from game.cpp:2: /usr/include/c++/10/future:167:18: note: candidate: 'std::launch& std::operator|=(std::launch&, std::launch)' 167 | inline launch& operator|=(launch& __x, launch __y) | ^~~~~~~~ /usr/include/c++/10/future:167:37: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::launch&' 167 | inline launch& operator|=(launch& __x, launch __y) | ~~~~~~~~^~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:127, from game.cpp:2: /usr/include/c++/10/charconv:680:3: note: candidate: 'constexpr std::chars_format& std::operator|=(std::chars_format&, std::chars_format)' 680 | operator|=(chars_format& __lhs, chars_format __rhs) noexcept | ^~~~~~~~ /usr/include/c++/10/charconv:680:28: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::chars_format&' 680 | operator|=(chars_format& __lhs, chars_format __rhs) noexcept | ~~~~~~~~~~~~~~^~~~~ game.cpp:11:30: error: no match for 'operator|=' (operand types are 'std::vector<std::bitset<30000> >' and 'std::vector<std::bitset<30000> >') 11 | for(int i=1; i<k; i++) pt[i]|=pt[i-1]; | ~~~~~^~~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:45, from game.cpp:2: /usr/include/c++/10/cstddef:160:3: note: candidate: 'constexpr std::byte& std::operator|=(std::byte&, std::byte)' 160 | operator|=(byte& __l, byte __r) noexcept | ^~~~~~~~ /usr/include/c++/10/cstddef:160:20: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::byte&' 160 | operator|=(byte& __l, byte __r) noexcept | ~~~~~~^~~ In file included from /usr/include/c++/10/ios:42, from /usr/include/c++/10/istream:38, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from game.cpp:2: /usr/include/c++/10/bits/ios_base.h:99:3: note: candidate: 'const std::_Ios_Fmtflags& std::operator|=(std::_Ios_Fmtflags&, std::_Ios_Fmtflags)' 99 | operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:99:29: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::_Ios_Fmtflags&' 99 | operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/ios_base.h:141:3: note: candidate: 'const std::_Ios_Openmode& std::operator|=(std::_Ios_Openmode&, std::_Ios_Openmode)' 141 | operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:141:29: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::_Ios_Openmode&' 141 | operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/ios_base.h:181:3: note: candidate: 'const std::_Ios_Iostate& std::operator|=(std::_Ios_Iostate&, std::_Ios_Iostate)' 181 | operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:181:28: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::_Ios_Iostate&' 181 | operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) | ~~~~~~~~~~~~~~^~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:105, from game.cpp:2: /usr/include/c++/10/future:167:18: note: candidate: 'std::launch& std::operator|=(std::launch&, std::launch)' 167 | inline launch& operator|=(launch& __x, launch __y) | ^~~~~~~~ /usr/include/c++/10/future:167:37: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::launch&' 167 | inline launch& operator|=(launch& __x, launch __y) | ~~~~~~~~^~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:127, from game.cpp:2: /usr/include/c++/10/charconv:680:3: note: candidate: 'constexpr std::chars_format& std::operator|=(std::chars_format&, std::chars_format)' 680 | operator|=(chars_format& __lhs, chars_format __rhs) noexcept | ^~~~~~~~ /usr/include/c++/10/charconv:680:28: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::chars_format&' 680 | operator|=(chars_format& __lhs, chars_format __rhs) noexcept | ~~~~~~~~~~~~~~^~~~~ game.cpp: In function 'int add_teleporter(int, int)': game.cpp:14:7: error: no match for 'operator|=' (operand types are 'std::vector<std::bitset<30000> >' and 'std::vector<std::bitset<30000> >') 14 | cd[u]|=cd[v]; | ~~~~~^~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:45, from game.cpp:2: /usr/include/c++/10/cstddef:160:3: note: candidate: 'constexpr std::byte& std::operator|=(std::byte&, std::byte)' 160 | operator|=(byte& __l, byte __r) noexcept | ^~~~~~~~ /usr/include/c++/10/cstddef:160:20: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::byte&' 160 | operator|=(byte& __l, byte __r) noexcept | ~~~~~~^~~ In file included from /usr/include/c++/10/ios:42, from /usr/include/c++/10/istream:38, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from game.cpp:2: /usr/include/c++/10/bits/ios_base.h:99:3: note: candidate: 'const std::_Ios_Fmtflags& std::operator|=(std::_Ios_Fmtflags&, std::_Ios_Fmtflags)' 99 | operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:99:29: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::_Ios_Fmtflags&' 99 | operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/ios_base.h:141:3: note: candidate: 'const std::_Ios_Openmode& std::operator|=(std::_Ios_Openmode&, std::_Ios_Openmode)' 141 | operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:141:29: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::_Ios_Openmode&' 141 | operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/ios_base.h:181:3: note: candidate: 'const std::_Ios_Iostate& std::operator|=(std::_Ios_Iostate&, std::_Ios_Iostate)' 181 | operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:181:28: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::_Ios_Iostate&' 181 | operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) | ~~~~~~~~~~~~~~^~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:105, from game.cpp:2: /usr/include/c++/10/future:167:18: note: candidate: 'std::launch& std::operator|=(std::launch&, std::launch)' 167 | inline launch& operator|=(launch& __x, launch __y) | ^~~~~~~~ /usr/include/c++/10/future:167:37: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::launch&' 167 | inline launch& operator|=(launch& __x, launch __y) | ~~~~~~~~^~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:127, from game.cpp:2: /usr/include/c++/10/charconv:680:3: note: candidate: 'constexpr std::chars_format& std::operator|=(std::chars_format&, std::chars_format)' 680 | operator|=(chars_format& __lhs, chars_format __rhs) noexcept | ^~~~~~~~ /usr/include/c++/10/charconv:680:28: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::chars_format&' 680 | operator|=(chars_format& __lhs, chars_format __rhs) noexcept | ~~~~~~~~~~~~~~^~~~~ game.cpp:15:7: error: no match for 'operator|=' (operand types are 'std::vector<std::bitset<30000> >' and 'std::vector<std::bitset<30000> >') 15 | pt[v]|=pt[u]; | ~~~~~^~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:45, from game.cpp:2: /usr/include/c++/10/cstddef:160:3: note: candidate: 'constexpr std::byte& std::operator|=(std::byte&, std::byte)' 160 | operator|=(byte& __l, byte __r) noexcept | ^~~~~~~~ /usr/include/c++/10/cstddef:160:20: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::byte&' 160 | operator|=(byte& __l, byte __r) noexcept | ~~~~~~^~~ In file included from /usr/include/c++/10/ios:42, from /usr/include/c++/10/istream:38, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from game.cpp:2: /usr/include/c++/10/bits/ios_base.h:99:3: note: candidate: 'const std::_Ios_Fmtflags& std::operator|=(std::_Ios_Fmtflags&, std::_Ios_Fmtflags)' 99 | operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:99:29: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::_Ios_Fmtflags&' 99 | operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/ios_base.h:141:3: note: candidate: 'const std::_Ios_Openmode& std::operator|=(std::_Ios_Openmode&, std::_Ios_Openmode)' 141 | operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:141:29: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::_Ios_Openmode&' 141 | operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/ios_base.h:181:3: note: candidate: 'const std::_Ios_Iostate& std::operator|=(std::_Ios_Iostate&, std::_Ios_Iostate)' 181 | operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:181:28: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::_Ios_Iostate&' 181 | operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) | ~~~~~~~~~~~~~~^~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:105, from game.cpp:2: /usr/include/c++/10/future:167:18: note: candidate: 'std::launch& std::operator|=(std::launch&, std::launch)' 167 | inline launch& operator|=(launch& __x, launch __y) | ^~~~~~~~ /usr/include/c++/10/future:167:37: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::launch&' 167 | inline launch& operator|=(launch& __x, launch __y) | ~~~~~~~~^~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:127, from game.cpp:2: /usr/include/c++/10/charconv:680:3: note: candidate: 'constexpr std::chars_format& std::operator|=(std::chars_format&, std::chars_format)' 680 | operator|=(chars_format& __lhs, chars_format __rhs) noexcept | ^~~~~~~~ /usr/include/c++/10/charconv:680:28: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'std::chars_format&' 680 | operator|=(chars_format& __lhs, chars_format __rhs) noexcept | ~~~~~~~~~~~~~~^~~~~ game.cpp:16:12: error: no match for 'operator|=' (operand types are 'std::bitset<30000>' and 'std::vector<std::bitset<30000> >') 16 | if(s[v]) s|=pt[v]; | ~^~~~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:66, from game.cpp:2: /usr/include/c++/10/bitset:979:7: note: candidate: 'std::bitset<_Nb>& std::bitset<_Nb>::operator|=(const std::bitset<_Nb>&) [with long unsigned int _Nb = 30000]' 979 | operator|=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT | ^~~~~~~~ /usr/include/c++/10/bitset:979:37: note: no known conversion for argument 1 from 'std::vector<std::bitset<30000> >' to 'const std::bitset<30000>&' 979 | operator|=(const bitset<_Nb>& __rhs) _GLIBCXX_NOEXCEPT | ~~~~~~~~~~~~~~~~~~~^~~~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:45, from game.cpp:2: /usr/include/c++/10/cstddef:160:3: note: candidate: 'constexpr std::byte& std::operator|=(std::byte&, std::byte)' 160 | operator|=(byte& __l, byte __r) noexcept | ^~~~~~~~ /usr/include/c++/10/cstddef:160:20: note: no known conversion for argument 1 from 'std::bitset<30000>' to 'std::byte&' 160 | operator|=(byte& __l, byte __r) noexcept | ~~~~~~^~~ In file included from /usr/include/c++/10/ios:42, from /usr/include/c++/10/istream:38, from /usr/include/c++/10/sstream:38, from /usr/include/c++/10/complex:45, from /usr/include/c++/10/ccomplex:39, from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54, from game.cpp:2: /usr/include/c++/10/bits/ios_base.h:99:3: note: candidate: 'const std::_Ios_Fmtflags& std::operator|=(std::_Ios_Fmtflags&, std::_Ios_Fmtflags)' 99 | operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:99:29: note: no known conversion for argument 1 from 'std::bitset<30000>' to 'std::_Ios_Fmtflags&' 99 | operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/ios_base.h:141:3: note: candidate: 'const std::_Ios_Openmode& std::operator|=(std::_Ios_Openmode&, std::_Ios_Openmode)' 141 | operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:141:29: note: no known conversion for argument 1 from 'std::bitset<30000>' to 'std::_Ios_Openmode&' 141 | operator|=(_Ios_Openmode& __a, _Ios_Openmode __b) | ~~~~~~~~~~~~~~~^~~ /usr/include/c++/10/bits/ios_base.h:181:3: note: candidate: 'const std::_Ios_Iostate& std::operator|=(std::_Ios_Iostate&, std::_Ios_Iostate)' 181 | operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) | ^~~~~~~~ /usr/include/c++/10/bits/ios_base.h:181:28: note: no known conversion for argument 1 from 'std::bitset<30000>' to 'std::_Ios_Iostate&' 181 | operator|=(_Ios_Iostate& __a, _Ios_Iostate __b) | ~~~~~~~~~~~~~~^~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:105, from game.cpp:2: /usr/include/c++/10/future:167:18: note: candidate: 'std::launch& std::operator|=(std::launch&, std::launch)' 167 | inline launch& operator|=(launch& __x, launch __y) | ^~~~~~~~ /usr/include/c++/10/future:167:37: note: no known conversion for argument 1 from 'std::bitset<30000>' to 'std::launch&' 167 | inline launch& operator|=(launch& __x, launch __y) | ~~~~~~~~^~~ In file included from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:127, from game.cpp:2: /usr/include/c++/10/charconv:680:3: note: candidate: 'constexpr std::chars_format& std::operator|=(std::chars_format&, std::chars_format)' 680 | operator|=(chars_format& __lhs, chars_format __rhs) noexcept | ^~~~~~~~ /usr/include/c++/10/charconv:680:28: note: no known conversion for argument 1 from 'std::bitset<30000>' to 'std::chars_format&' 680 | operator|=(chars_format& __lhs, chars_format __rhs) noexcept | ~~~~~~~~~~~~~~^~~~~ game.cpp:17:12: error: no match for 'operator|=' (operand types are 'std::bitset<30