【codevs1215】迷宫
problemsolutioncodes#include#includeusingnamespacestd;structxyz{intx,y;xyz(intx=0,inty=0):x(x),y(y){};};intm,n…
problemsolutioncodes#include#includeusingnamespacestd;structxyz{intx,y;xyz(intx=0,inty=0):x(x),y(y){};};intm,n…
problemsolutioncodes//dp[i+1][j]:从0到i+1这个物品中选出总重量不超过j的物品时总价值的最大值#include#includeusingnamespacestd;intn,s,w[505…
problemsolutioncodes#include#include#include#includeusingnamespacestd;structBigint{vectors;intis_minus;Bigint(…
problemsolutioncodes#include#definemod6662333usingnamespacestd;typedeflonglongLL;LLdfs(LLa,LLb,LLp){if(b==1)re…
problemsolutioncodes//巧妙的利用了x-=min(x,t);x若剩余为0则下面升温也为0#include#includeusingnamespacestd;typedeflonglongLL;intm…
problemsolutioncodes#includeintn,a[(int)1e5+10];intreadint(){intop=1,x=0;charch=getchar();while(ch'9'){if(ch==…
problemsolutioncodes//树形DP//f[u]:割掉u和u子树中所有的叶子节点所需要的最小代价#include#includeusingnamespacestd;typedeflonglongLL;co…
problemsolutioncodes//1,2:各在左右:把所有物品从区间移到最左边的花费减去把所有物品从目标位置移到最左边的花费就是把所有物品从区间移到目标位置的花费,右边同理。//3:若目标仓库在区间内部,将区间…
problemsolutioncodes//f[i]:第i秒最远可以走多远#includeusingnamespacestd;constintmaxn=300010;intm,s,t,f[maxn];intmain(){…
problemsolutioncodes//语文题,这很好lastsubmit#include#includeusingnamespacestd;constintmaxn=3100;intn,m,a[maxn][maxn…