随笔分类 -  枚举

Super Phyllis(穷举+搜索)
摘要:http://acm.sdut.edu.cn/sdutoj/problem.php?action=showproblem&problemid=2723题意:给出一些字符串u,v,代表u->v,问有几条边是多余的,也就是说去掉那些边后,u仍能到达v。思路:穷举每条边,试着去掉该边,bfs搜索两个点是否仍然可达。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std; 10 char s1[210],s2[210],.. 阅读全文
posted @ 2013-12-02 15:09 straw_berry 阅读(369) 评论(0) 推荐(0)
Flip Game
摘要:Time Limit:1000MSMemory Limit:65536KTotal Submissions:25302Accepted:10918DescriptionFlip game is played on a rectangular 4x4 field with two-sided pieces placed on each of its 16 squares. One side of each piece is white and the other one is black and each piece is lying either it's black or white 阅读全文
posted @ 2013-08-03 10:53 straw_berry 阅读(222) 评论(0) 推荐(0)