摘要:
思路:这个没思路,看了陈启峰的论文写得。#include#include#include#include#include#include#include#include#include#include#include#include#define pb push_back#define mp make_pair#define Maxn 1010#define Maxm 80002#define LL __int64#define Abs(x) ((x)>0?(x):(-(x)))#define lson(x) (xd[u]){dp[u][i]=inf;continue;} dp[... 阅读全文
摘要:
思路:直接用long long 保存会WA。用下高精度加法就行了。#include#include#include#include#include#include#include#include#include#include#include#include#define pb push_back#define mp make_pair#define Maxn 50010#define Maxm 80002#define LL __int64#define Abs(x) ((x)>0?(x):(-x))#define lson(x) (x=2;j--) update(nu... 阅读全文
摘要:
思路:这是一道坑爹的动态规划,思路很容易想到,就是细节。用dp[t][i][j],表示在第t时间,锤子停在(i,j)位置能获得的最大数量。那么只要找到一个点转移到(i,j)收益最大即可。#include#include#include#include#include#include#include#include#include#include#include#define pb push_back#define mp make_pair#define Maxn 2000010#define Maxm 80002#define LL __int64#define Abs(x) ((x)> 阅读全文