摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2300 有史以来代码写的最长的一道,题目本身不难,但很烦,完全考验代码能力,不知那些牛人1000多B的code是怎么写出来的,汗~ Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighte... 阅读全文
posted @ 2008-07-22 14:16 俺是打铁的 阅读(340) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2308 该题目看似蛮难的,其实只要在所有的半圆环中找到一个半圆环a1,然后把所有小于等于a1长度的圆环长度相加,如果该长度和大于等于a1,就可以直接判断YES,否则NO,所以可以直接sort一下,然后…… 要注意的一点是不一定要取完所有的环哦,偶就是载在这里wa了N次 Code highlighting pr... 阅读全文
posted @ 2008-07-21 16:00 俺是打铁的 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 这两天在研究opencv来对木材导管进行检测 大致的步骤是1.首先都读取的图片进行平滑处理 2.对图片进行腐蚀 3.运用Canny算子把图像转换成二值图,并提取边缘 4.对图片进行膨胀处理 5.依次读取每个轮廓,并筛选出面积合理的轮廓,也就是图像中的导管 traverse=cvStartFindContours(cannyImage,storage,sizeof(CvContour),CV_RET... 阅读全文
posted @ 2008-07-18 17:43 俺是打铁的 阅读(288) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2220 找规律 1.首先用个bool数组表示u中在v中未出现的数字 2.然后把最小的一个数与V中的n(1--n-2)数结合成一条边 3.如果v中这个不在存在,则存入bool数组中,依次类推 #include using namespace std; int a[110],b[110]; bool c[110];... 阅读全文
posted @ 2008-07-14 21:01 俺是打铁的 阅读(154) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2218 传说中的不变量定理 #include using namespace std; int a[6]; int main() { int temp; int i,n; cin>>n; while (n--) { for(i=0;i<6;i++) ... 阅读全文
posted @ 2008-07-14 19:15 俺是打铁的 阅读(184) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=2207 该题目本身比较简单,但无意中发现我们的肥庄的一个比较有创新的方法,拿出来晒晒 #include using namespace std; typedef union { unsigned long IP; unsigned char Sub[4]; }Info; int main() { l... 阅读全文
posted @ 2008-07-14 14:27 俺是打铁的 阅读(285) 评论(0) 推荐(0) 编辑