2015年7月24日

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 阅读(218) 评论(0) 推荐(0) 编辑

不再刷“水题”!

摘要: 听队友的话,而且时间精力都不够! 阅读全文

posted @ 2015-07-24 15:41 windrises 阅读(146) 评论(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 阅读(151) 评论(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 阅读(168) 评论(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 阅读(162) 评论(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 阅读(220) 评论(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 阅读(155) 评论(0) 推荐(0) 编辑

最近很长的一段时间都很忙,博客暂时停止更新?也有可能更新更快!

摘要: 虽然也没有人会来光顾我的博客,不过这个博客本来就是写给自己看的,无所谓啦 阅读全文

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

导航