codeforces 1003d Coins and Queries
 题意 让你用最少的2^x的金币凑出想要的数字那么我直接贪心即可 就尽量用大的去满足我的要求 简单dfs即可
#includeusing namespace std;inline char gc(){    static char now[1<<16],*S,*T;    if (T==S){T=(S=now)+fread(now,1,1<<16,stdin);if (T==S) return EOF;}    return *S++;}inline int read(){    int x=0,f=1;char ch=gc();    while(!isdigit(ch)) {if (ch=='-') f=-1;ch=gc();}    while(isdigit(ch)) {x=x*10+ch-'0',ch=gc();}    return x*f;}const int N=2e5+10;int a[N],n,q,cnt[33],cnt1[33];inline void gao(int x){    int tot=0;while(x!=1) ++tot,x>>=1;    ++cnt[tot];}inline int dfs(int x,int nm){    if (!x) return 0;    if (nm<0) return -1;int res=0;    if((1<
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。