From 1e9f0b6c8431b317e92c1d3f38992916d08632a8 Mon Sep 17 00:00:00 2001 From: Zengtudor Date: Thu, 24 Oct 2024 19:32:20 +0800 Subject: [PATCH] update --- src/CSP-S2020/zoo/zoo.cpp | 52 +++++++++++++++++++++++++++++++++++++++ src/P7913/P7913.cpp | 30 ++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 src/CSP-S2020/zoo/zoo.cpp create mode 100644 src/P7913/P7913.cpp 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<<...<