A题Wa 求助
#include <cstdio> #include <iostream> using namespace std; typedef long long ll; ll n, k, s, a, sum; int main() { scanf("%lld%lld%lld", &n, &k, &s); sum = (1 << n) - 1; for(ll i = 1; i <= k; i++) { scanf("%lld", &a); // cout << (1 << a - 1) << endl; sum -= (1 << a - 1); } sum = sum & s; if(sum == s) printf("YES\n"); else printf("NO\n"); return 0; }