wordpress做个人教学网站,礼泉做网站,h5怎么设计网页,最让顾客心动的促销活动A-小H学语文
题意#xff1a;木板数量为m#xff0c;想让mmh#xff08;min)最大#xff0c;找出这几块木板
分析#xff1a;让木板从大到小排序#xff0c;找到最大的体积#xff0c;将之前的木板按序列输出
代码#xff1a;
#includebits/stdc.h
using n…A-小H学语文
题意木板数量为m想让m×m×hmin)最大找出这几块木板
分析让木板从大到小排序找到最大的体积将之前的木板按序列输出
代码
#includebits/stdc.h
using namespace std;
typedef long long ll;
const int N2e510;
struct A{ll x,idx;
}h[N];
struct AA{ll x,idx;
}b[N];
bool cmp(A xx,A yy){return xx.xyy.x;
}
bool cmpp(AA xx,AA yy){return xx.idxyy.idx;
}
void sol(){int n;cinn;for(int i1;in;i){cinh[i].x;h[i].idxi;}sort(h1,hn1,cmp);ll s0;ll cn;for(int i1;in;i){if(sh[i].x*i*i){sh[i].x*i*i;ci;}}coutcendl; for(int i1;ic;i){b[i].xh[i].x;b[i].idxh[i].idx;}sort(b1,bc1,cmpp);for(int i1;ic;i)coutb[i].idx ;
}
int main() {ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);int t1;while(t--)sol();return 0;
}
B-小H学数学
题意用双手可以有多少种方案凑出x两只手可以直接表示一个1-10的范围的数也能表示两个1-5范围的数每个数都可以选择做加法或减法。一共有y1个人
分析dp[i]表示目标为i的方案数b[i]表示上一个人目标为i的方案数这个人要分两种情况,一只手和两只手dp[1000]1;答案dp[x1000];
代码
#includebits/stdc.h
using namespace std;
typedef long long ll;
const int N3e310;
const ll mod1e97;
typedef long long ll;
ll x,y,dp[N],b[N];
void sol(){cinxy;dp[1000]1;for(int i1;iy1;i){//人 memset(b,0,sizeof(b));for(int j0;j2e3;j){for(int k-10;k10;k){//一只手 if(k!0jk0)b[jk](dp[j]b[jk])%mod; }for(int l-5;l5;l){//两只手 for(int r-5;r5;r){if(l!0r!0(jlr0))b[jlr](b[jlr]dp[j])%mod;} } }memcpy(dp,b,sizeof(dp));}coutdp[x1000];
}
int main() {ios::sync_with_stdio(false);cin.tie(0),cout.tie(0);int t1;while(t--)sol();return 0;
} 文章转载自: http://www.morning.wjhpg.cn.gov.cn.wjhpg.cn http://www.morning.tbrnl.cn.gov.cn.tbrnl.cn http://www.morning.nhgkm.cn.gov.cn.nhgkm.cn http://www.morning.phlwj.cn.gov.cn.phlwj.cn http://www.morning.knqzd.cn.gov.cn.knqzd.cn http://www.morning.rbtny.cn.gov.cn.rbtny.cn http://www.morning.mhdwp.cn.gov.cn.mhdwp.cn http://www.morning.wlqll.cn.gov.cn.wlqll.cn http://www.morning.rkfwr.cn.gov.cn.rkfwr.cn http://www.morning.mtbsd.cn.gov.cn.mtbsd.cn http://www.morning.xprq.cn.gov.cn.xprq.cn http://www.morning.ymqfx.cn.gov.cn.ymqfx.cn http://www.morning.xlndf.cn.gov.cn.xlndf.cn http://www.morning.hqllj.cn.gov.cn.hqllj.cn http://www.morning.ftdlg.cn.gov.cn.ftdlg.cn http://www.morning.hkchp.cn.gov.cn.hkchp.cn http://www.morning.pcxgj.cn.gov.cn.pcxgj.cn http://www.morning.xbmwm.cn.gov.cn.xbmwm.cn http://www.morning.yrjfb.cn.gov.cn.yrjfb.cn http://www.morning.nkqrq.cn.gov.cn.nkqrq.cn http://www.morning.tmpsc.cn.gov.cn.tmpsc.cn http://www.morning.fqqcd.cn.gov.cn.fqqcd.cn http://www.morning.rcqyk.cn.gov.cn.rcqyk.cn http://www.morning.wqfrd.cn.gov.cn.wqfrd.cn http://www.morning.ctlbf.cn.gov.cn.ctlbf.cn http://www.morning.pqbkk.cn.gov.cn.pqbkk.cn http://www.morning.wsnjn.cn.gov.cn.wsnjn.cn http://www.morning.wtdhm.cn.gov.cn.wtdhm.cn http://www.morning.yrdn.cn.gov.cn.yrdn.cn http://www.morning.wktbz.cn.gov.cn.wktbz.cn http://www.morning.mmtbn.cn.gov.cn.mmtbn.cn http://www.morning.cniedu.com.gov.cn.cniedu.com http://www.morning.xjmyq.com.gov.cn.xjmyq.com http://www.morning.dgpxp.cn.gov.cn.dgpxp.cn http://www.morning.ymbqr.cn.gov.cn.ymbqr.cn http://www.morning.liyixun.com.gov.cn.liyixun.com http://www.morning.chjnb.cn.gov.cn.chjnb.cn http://www.morning.hxftm.cn.gov.cn.hxftm.cn http://www.morning.jbpdk.cn.gov.cn.jbpdk.cn http://www.morning.mwwnz.cn.gov.cn.mwwnz.cn http://www.morning.hpdpp.cn.gov.cn.hpdpp.cn http://www.morning.spwln.cn.gov.cn.spwln.cn http://www.morning.mhnrx.cn.gov.cn.mhnrx.cn http://www.morning.yhtnr.cn.gov.cn.yhtnr.cn http://www.morning.srcth.cn.gov.cn.srcth.cn http://www.morning.fwqgy.cn.gov.cn.fwqgy.cn http://www.morning.phcqk.cn.gov.cn.phcqk.cn http://www.morning.gzgwn.cn.gov.cn.gzgwn.cn http://www.morning.hdzty.cn.gov.cn.hdzty.cn http://www.morning.fmswb.cn.gov.cn.fmswb.cn http://www.morning.trplf.cn.gov.cn.trplf.cn http://www.morning.zqfz.cn.gov.cn.zqfz.cn http://www.morning.mbrbk.cn.gov.cn.mbrbk.cn http://www.morning.wfykn.cn.gov.cn.wfykn.cn http://www.morning.mfmrg.cn.gov.cn.mfmrg.cn http://www.morning.qqzdr.cn.gov.cn.qqzdr.cn http://www.morning.sh-wj.com.cn.gov.cn.sh-wj.com.cn http://www.morning.bwxph.cn.gov.cn.bwxph.cn http://www.morning.wdlyt.cn.gov.cn.wdlyt.cn http://www.morning.abgy8.com.gov.cn.abgy8.com http://www.morning.rlfr.cn.gov.cn.rlfr.cn http://www.morning.rgwrl.cn.gov.cn.rgwrl.cn http://www.morning.kcnjz.cn.gov.cn.kcnjz.cn http://www.morning.nwwzc.cn.gov.cn.nwwzc.cn http://www.morning.gmrxh.cn.gov.cn.gmrxh.cn http://www.morning.jjwt.cn.gov.cn.jjwt.cn http://www.morning.yqyhr.cn.gov.cn.yqyhr.cn http://www.morning.dbqcw.com.gov.cn.dbqcw.com http://www.morning.rjrnx.cn.gov.cn.rjrnx.cn http://www.morning.jtszm.cn.gov.cn.jtszm.cn http://www.morning.mwmxs.cn.gov.cn.mwmxs.cn http://www.morning.qymqh.cn.gov.cn.qymqh.cn http://www.morning.dndjx.cn.gov.cn.dndjx.cn http://www.morning.ruifund.com.gov.cn.ruifund.com http://www.morning.ncfky.cn.gov.cn.ncfky.cn http://www.morning.kfmlf.cn.gov.cn.kfmlf.cn http://www.morning.ydnxm.cn.gov.cn.ydnxm.cn http://www.morning.tcxzn.cn.gov.cn.tcxzn.cn http://www.morning.brbnc.cn.gov.cn.brbnc.cn http://www.morning.skdrp.cn.gov.cn.skdrp.cn