摘要: problemsolutioncodes#include#includeusing namespace std;struct xyz{ int x, y; xyz(int x = 0, int y = 0):x(x),y(y){};};int m, n, ... 阅读全文
posted @ 2018-06-04 21:58 gwj1139177410 阅读(120) 评论(0) 推荐(0)
摘要: problemsolutioncodes//dp[i+1][j]:从0到i+1这个物品中选出总重量不超过j的物品时总价值的最大值#include#includeusing namespace std;int n, s, w[5050], k[5050], dp[505... 阅读全文
posted @ 2018-06-04 21:56 gwj1139177410 阅读(82) 评论(0) 推荐(0)
摘要: problemsolutioncodes#include#include#include#includeusing namespace std;struct Bigint{ vectors; int is_minus; Bigint(long lon... 阅读全文
posted @ 2018-06-04 21:54 gwj1139177410 阅读(161) 评论(0) 推荐(0)
摘要: problemsolutioncodes#include#define mod 6662333using namespace std;typedef long long LL;LL dfs(LL a, LL b, LL p){ if(b==1)return a%... 阅读全文
posted @ 2018-06-04 21:48 gwj1139177410 阅读(102) 评论(0) 推荐(0)
摘要: problemsolutioncodes//巧妙的利用了x-=min(x,t); x若剩余为0则下面升温也为0#include#includeusing namespace std;typedef long long LL;int main(){ LL a, c... 阅读全文
posted @ 2018-06-04 21:45 gwj1139177410 阅读(145) 评论(0) 推荐(0)
摘要: problemsolutioncodes#includeint n, a[(int)1e5+10];int readint(){ int op=1,x=0; char ch=getchar(); while(ch'9'){if(ch=='-')op=-1;... 阅读全文
posted @ 2018-06-04 21:42 gwj1139177410 阅读(113) 评论(0) 推荐(0)
摘要: problemsolutioncodes//树形DP//f[u]:割掉u和u子树中所有的叶子节点所需要的最小代价#include#includeusing namespace std;typedef long long LL;const int N = (int)1e... 阅读全文
posted @ 2018-06-04 21:40 gwj1139177410 阅读(99) 评论(0) 推荐(0)
摘要: problemsolutioncodes//1,2:各在左右:把所有物品从区间移到最左边的花费减去把所有物品从目标位置移到最左边的花费就是把所有物品从区间移到目标位置的花费,右边同理。//3:若目标仓库在区间内部,将区间拆为两部分分别算。//ans:所以只需要维护bi... 阅读全文
posted @ 2018-06-04 21:39 gwj1139177410 阅读(151) 评论(0) 推荐(0)
摘要: problemsolutioncodes//f[i]:第i秒最远可以走多远#includeusing namespace std;const int maxn = 300010;int m, s, t, f[maxn];int main(){ cin>>m>>s... 阅读全文
posted @ 2018-06-04 21:36 gwj1139177410 阅读(159) 评论(0) 推荐(0)
摘要: problemsolutioncodes//语文题,这很好 last submit#include#includeusing namespace std;const int maxn = 3100;int n, m, a[maxn][maxn], vis[maxn]... 阅读全文
posted @ 2018-06-04 21:34 gwj1139177410 阅读(99) 评论(0) 推荐(0)
选择