
搜索
文章平均质量分 81
yusiningxin
这个作者很懒,什么都没留下…
展开
-
2015 多校第三场 Solve this interesting problem
任意给定一个区间,求包含此区间的线段数的最小根节点N,不存在输出-1注意各种剪枝# include # include # include using namespace std;const long long INF=1e18;long long ans;void dfs (long long l,long long r){ // printf("%d原创 2015-07-29 17:58:08 · 332 阅读 · 0 评论 -
2015 多校第四场 Walk Out
场上一直WA,场下清题又不停T,最后终于调好了,dfs过程中会爆栈,最后向右向下扫点的时候注意要标记,每个点只用加入一次不然会T。总体思路就是:从(1,1)点开始dfs,只走0的位置,注意方向是上下左右,看能到达的最远点,将最远点做为新的起点,这时最小的二进制长度已经找到了。然后bfs,每次向右或者向下走,有0走0,各种情况都为1的时候才走1.#pragma comment原创 2015-07-30 23:54:51 · 349 阅读 · 0 评论 -
2015 多校第四场 XYZ and Drops
# include # include # include # include using namespace std;struct node{ int x,y; int de; node (int a,int b,int c) { x=a; y=b; de=c; }};const int MA原创 2015-07-30 23:46:36 · 371 阅读 · 0 评论