摘要:
快速幂模板 #include<iostream> #include<cstdio> #define MOD 100007 #define ll long long using namespace std; inline int read(){ int s=0,w=1; char ch=getchar 阅读全文
摘要:
多重背包 问题模型 给定n个物品,其中第i个物品的体积为$V_i$,价值为$W_i$,并且有$C_i$个,有一容积为M的背包将物品放入背包,使得最后的体积最大。 方法一: for i=1 to n for j=0 to m for k=0 to min(c[i],j/v[i]) f[i][j]=ma 阅读全文
摘要:
1.找到白点中$d$值最小的点,并把该白点标位蓝点 2.更新与该蓝点相邻的其他点的$d$值 /* Coder Setting sail and crossing the sea, Can always going through the waves by wind. */ #include<iost 阅读全文