2013年7月29日

图论基础之并查集的简单看法:HDU 1232 畅通工程&&More is better

摘要: HDU 1232 畅通工程http://acm.hdu.edu.cn/showproblem.php?pid=1232第一个并查集的题目: 1 #include 2 #include 3 #include 4 using namespace std; 5 int father[1000]; 6 int Find(int a) 7 { 8 if(a!=father[a]) 9 return Find(father[a]);10 return father[a];11 }12 void Union(int a,int... 阅读全文
posted @ 2013-07-29 23:40 ~~碾压机 阅读(169) 评论(0) 推荐(0) 编辑

7月28号的题目:Printer Queue&&Parencodings&&Grandpa is Famous&&Emag eht htiw Em Pleh&&An Old Stone Game

摘要: Printer Queuehttp://acm.tzc.edu.cn/acmhome/problemdetail.do?method=showdetail&id=1044这个题目我想我是我做过的题目中思路最清晰的,代码最简洁的吧。(题目较简单) 1 #include 2 #include 3 #include 4 #include//主要考察队列的应用 5 using namespace std; 6 bool comp1(int x,int y) 7 { 8 return x>y; 9 }10 int main()11 {12 ... 阅读全文
posted @ 2013-07-29 11:30 ~~碾压机 阅读(194) 评论(0) 推荐(0) 编辑

7月23号的题目:Cutting a Painted Polygon&&Function Run Fun&&Sumdiv&&Raid&&A simple stone game

摘要: Cutting a Painted PolygonCutting a Painted PolygonTime Limit:1000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uDescriptionThere is a convex polygon with vertices painted in three colors: Red (R), Green (G) and Blue (B). It is known that all the colors are present... 阅读全文
posted @ 2013-07-29 10:39 ~~碾压机 阅读(178) 评论(0) 推荐(0) 编辑