摘要: UVA589 【Pushing Boxes】 这是我写过比较长的搜索题了 简直就是毒瘤题,细节多,但写完之后对宽搜以及最短路会有更深刻的理解 第一眼看到题毫无思路,认真思考发现可以将问题转化,推一次箱子的代价尽量大100000就够了,走路代价为一,这样就转化为了简单最短路(dis)。每次记录到达当前 阅读全文
posted @ 2019-03-28 20:12 アインツベルン 阅读(230) 评论(0) 推荐(0) 编辑
摘要: 发一波树状数组的版本 单调队列是最快的 树状数组也可以过 需要吸氧这里使用了手动O3 具体怎么写就是树状数组的板子题,单点修改区间查询最值,注意初始值的设置调了很久 cpp pragma GCC optimize(3) include include include using namespace 阅读全文
posted @ 2019-03-28 20:11 アインツベルン 阅读(185) 评论(0) 推荐(0) 编辑
摘要: ```cpp include include using namespace std; typedef unsigned int ui; const int N=9999999; int n,t1,t2,t3,tp,a,b,k; ui zh[N],fu[N]; set ss; inline void 阅读全文
posted @ 2019-02-12 10:14 アインツベルン 阅读(111) 评论(0) 推荐(0) 编辑
摘要: ```cpp include include include using namespace std; const int final=255; int n,mod,pr[15]={2,3,5,7,11,13,17,19}; long long dp[260][260],sub[2][260][26 阅读全文
posted @ 2019-02-12 10:02 アインツベルン 阅读(81) 评论(0) 推荐(0) 编辑
摘要: ```cpp include using namespace std; typedef long long ll; typedef __int128 i1; ll k,a[15],b[15]; i1 ans=1,sko,xx,yy; inline void ex_gcd(i1 x,i1 y) { i 阅读全文
posted @ 2019-02-12 09:55 アインツベルン 阅读(81) 评论(0) 推荐(0) 编辑
摘要: ```cpp include using namespace std; typedef long long ll; typedef __int128 i1; ll k,a[100005],b[100005]; i1 xx,yy,ans,m; inline void ex_gcd(i1 x,i1 y) 阅读全文
posted @ 2019-02-12 09:50 アインツベルン 阅读(139) 评论(0) 推荐(0) 编辑
摘要: ```cpp include include include using namespace std; const int N=500005; struct node{ int left,right,val,start,id; bool operator val;} }dp[N][40]; prio 阅读全文
posted @ 2019-02-12 09:48 アインツベルン 阅读(48) 评论(0) 推荐(0) 编辑
Live2D