07 2015 档案

加油
摘要:最近做了不少很难的题,也没时间来更博客。努力努力再努力,加油加油再加油!!! 阅读全文

posted @ 2015-07-30 00:16 windrises 阅读(176) 评论(2) 推荐(0)

UVa-10129 - Play on Words
摘要:欧拉回路,然后dfs判断是否联通。(新技能get)注意:在dfs判断是否联通的时候,要是写成有向图的话,则一定要从起点进行dfs,有不少博主写错了,由于这题UVa的数据貌似不强,所以也AC了==我写的是无向图。 1 #include 2 #include 3 #include 4 using nam... 阅读全文

posted @ 2015-07-24 23:43 windrises 阅读(228) 评论(0) 推荐(0)

不再刷“水题”!
摘要:听队友的话,而且时间精力都不够! 阅读全文

posted @ 2015-07-24 15:41 windrises 阅读(149) 评论(0) 推荐(0)

UVa-839 - Not so Mobile
摘要:在没有读完数据的时候,不能在中间就退出dfs。很好的一道题。 1 #include 2 #include 3 #include 4 using namespace std; 5 bool dfs(int &w) 6 { 7 int w1,d1,w2,d2; 8 scanf("%d%d... 阅读全文

posted @ 2015-07-24 13:52 windrises 阅读(153) 评论(0) 推荐(0)

UVa-679 - Dropping Balls
摘要:直接模拟会超时 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxx=21; 6 int d,n; 7 bool f[1 2 #include 3 #include 4 using namespace std... 阅读全文

posted @ 2015-07-24 11:34 windrises 阅读(176) 评论(0) 推荐(0)

Round #313 (Div. 2) D. Equivalent Strings
摘要:运气不错,这次cf大涨,居然是房间第二(要不是D题TLE了,就第一了)用string会TLE,用char加下标,还看到更牛的算法, 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxx=200010; 6 c... 阅读全文

posted @ 2015-07-24 01:37 windrises 阅读(174) 评论(0) 推荐(0)

UVa-12657 - Boxes in a Line
摘要:用数组写感觉萌萌哒啊,本题可以写个link函数,更加方便 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxx=100010; 6 int r[maxx],l[maxx]; 7 int n,m; 8 long... 阅读全文

posted @ 2015-07-24 01:22 windrises 阅读(228) 评论(0) 推荐(0)

UVa-11988 - Broken Keyboard (a.k.a. Beiju Text)
摘要:原来数组可以代替指针,涨姿势 1 #include 2 #include 3 #include 4 using namespace std; 5 const int maxx=100010; 6 char a[maxx]; 7 int next[maxx],cur,last; 8 int main(... 阅读全文

posted @ 2015-07-24 01:21 windrises 阅读(163) 评论(0) 推荐(0)

最近很长的一段时间都很忙,博客暂时停止更新?也有可能更新更快!
摘要:虽然也没有人会来光顾我的博客,不过这个博客本来就是写给自己看的,无所谓啦 阅读全文

posted @ 2015-07-24 01:14 windrises 阅读(166) 评论(2) 推荐(0)

UVa-140 - Bandwidth
摘要:决定跳过数据结构那章,来看暴力求解法。暴力这章之前也看过,可是前几天做了一道POJ的暴力题,却没有想起来自己曾经在书上看过类似的暴力枚举解法,所以决定再仔细看一遍。感觉要是不刷题,只是单纯的看书的话,记不住啊。书中也说了,可以剪枝(“发现两个结点的距离大于或等于k”,“如果在搜索到结点u时,u结点还... 阅读全文

posted @ 2015-07-20 00:12 windrises 阅读(184) 评论(0) 推荐(0)

UVa-230 - Borrowers
摘要:终于在UVa上AC了50题了,感觉还有很长的路要走!!!这道题有点麻烦,还是用STL写的。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace std; 7 const int maxx=1010; 8 t... 阅读全文

posted @ 2015-07-17 21:26 windrises 阅读(746) 评论(0) 推荐(0)

UVa-10317 - Equating Equations
摘要:一个即将高一的网友问的我的题。汗,我怎么大一才接触编程!用STL写的,当时UVa挂了,没有去测试。之后发现TLE了,把vector改成数组依然如此。一时没想到怎么解决,先这样吧,以后再看看。 1 #include 2 #include 3 #include 4 #include 5 #include... 阅读全文

posted @ 2015-07-17 20:57 windrises 阅读(160) 评论(2) 推荐(0)

UVa-1595 - Symmetry
摘要:在看了别人的代码后发现有很多可以避免出现精度问题的方法(如坐标都乘2等) 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int maxx=1010; 7 const double eps=1e-5... 阅读全文

posted @ 2015-07-17 01:47 windrises 阅读(237) 评论(0) 推荐(0)

UVa-10391 - Compound Words
摘要:继续用STL写,虽然比较耗时,但是简洁方便,不容易出错。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 const int maxx=1200... 阅读全文

posted @ 2015-07-17 01:45 windrises 阅读(148) 评论(0) 推荐(0)

UVa-10763 - Foreign Exchange
摘要:掌握了新姿势 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 const int maxx=500010; 7 int a[maxx],b[maxx]; 8 int main() 9 {10 //fre... 阅读全文

posted @ 2015-07-17 01:44 windrises 阅读(276) 评论(0) 推荐(0)

UVa-10935 - Throwing cards away I
摘要:简单的队列。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 int main() 7 { 8 //freopen("in.in","r",stdin); 9 //freopen("out.in... 阅读全文

posted @ 2015-07-17 01:41 windrises 阅读(148) 评论(0) 推荐(0)

UVa-1594 - Ducci Sequence
摘要:学到了新姿势,对结构体用map,set,sort等,可以在结构体中重载小于号(也有别的方式,没有仔细研究。)。注意const偷懒不加的话会通不过编译。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using namespace s... 阅读全文

posted @ 2015-07-17 01:40 windrises 阅读(479) 评论(0) 推荐(0)

UVa-1593 - Alignment of Code
摘要:这几天一直在刷《算法竞赛入门经典》,由于是STL章节,所以这篇和下面的几篇都用STL来写。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 co... 阅读全文

posted @ 2015-07-17 01:28 windrises 阅读(298) 评论(0) 推荐(0)

从CSDN搬过来了
摘要:放暑假了,这几天一直待在学校自己刷题。7.20-8.20一个月将会在集训中度过。 阅读全文

posted @ 2015-07-17 01:24 windrises 阅读(136) 评论(0) 推荐(0)

导航