diff --git a/src/CSP-S2020/zoo/zoo.cpp b/src/CSP-S2020/zoo/zoo.cpp new file mode 100644 index 0000000..ecc3247 --- /dev/null +++ b/src/CSP-S2020/zoo/zoo.cpp @@ -0,0 +1,52 @@ +#include +#include + +using ull = unsigned long long; + +ull n, m, c, k, input, _; +const ull max_k = 64+5; +// const ull max_n = 1e6+5; +ull used_bits; +std::bitset vis_bits; + +#define NV(v)#v<<" : "<<(v) + +#ifdef ONLINE_JUDGE + #define DEBUG(code) +#else + #define DEBUG(code)code +#endif + +int main(){ + + + std::iostream::sync_with_stdio(false), std::cin.tie(nullptr), std::cout.tie(nullptr); + + std::cin>>n>>m>>c>>k; + + if(n==0 && m==0 && k==64){ + std::cout<<"18446744073709551616\n"; + return 0; + } + + for(ull i{1};i<=n;i++){ + std::cin>>input; + DEBUG(std::cout<(input))<<" ";) + used_bits |= input; + DEBUG(std::cout<<'\n';) + } + for(ull i{1};i<=m;i++){ + std::cin>>input>>_; + if(!((used_bits>>input)&1) && vis_bits[input]==false){ + DEBUG(std::cout<<"unused_bit++ ;"<ull{ + return num < 64 ? n< +using ll = long long; + +template +void read(Args&...args){ + (std::cin>>...>>args); +} + +template +void print(const Args&...args){ + (std::cout<<...<