LA
Ares233
这个作者很懒,什么都没留下…
展开
-
2995-Image is Everuthing
参考刘汝佳算法竞赛入门经典指南~~~13页 题意:有个n*n*n的立方体,第一行输入n。。。然后一下n行依次是该立方体的 前、左、后、右、上、下。视图。。在不同视图中,每个字母代表一种颜色,“.”代表空。求最大可能存在的方格数目。 (https://icpcarchive.ecs.baylor.edu/index.PHP?option=com_onlinejudge&Itemid=转载 2016-10-06 14:54:59 · 212 阅读 · 0 评论 -
3644-易爆物
(http://acm.hust.edu.cn:8080/judge/problem/viewProblem.action?id=12648)/*输入: 1 23 43 53 12 34 12 66 5输出:-1*/#include<stdio.h>const int maxn=10000+10;int fa[maxn];//并查集的查找,自带压缩路径int fin原创 2016-10-06 15:02:24 · 272 阅读 · 0 评论 -
3938-Ray, Pass me the dishes!
/*max_all:最大连续和max_prefix:最大前缀和max_suffix:最大后缀和pre_r:最大前缀的结束位置suf_l:最大后缀的开始位置sum:区间总和对于更新 由于要x尽量小与y尽量小 所以在更新的时候我们要确定好更新的顺序 也就是l先尽量小 然后才是y尽量小更新有5种状况,那么按顺序就是1.左边的sum+右区间的max_prefix;2.左区间max_all转载 2016-10-06 15:09:02 · 240 阅读 · 0 评论 -
4329-Ping pong
(http://code.google.com/p/aoapc-book/source/browse/TrainingGuide/bookcodes/ch3/la4329)#include <bits/stdc++.h> using namespace std; #define LS 2*i #define RS 2*i+1 #define UP(i,x,y) for(i=x;i<=y转载 2016-10-06 15:12:26 · 237 阅读 · 0 评论