书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!

2011年10月21日

叉乘+二分解决POJ 2398

摘要: DescriptionMom and dad have a problem: their child, Reza, never puts his toys away when he is finished playing with them. They gave Reza a rectangular box to put his toys in. Unfortunately, Reza is rebellious and obeys his parents by simply throwing his toys into the box. All the toys get mixed up, 阅读全文

posted @ 2011-10-21 19:41 More study needed. 阅读(291) 评论(0) 推荐(0) 编辑

再次相遇sort, 再次的感悟

摘要: 以前本人曾经在CSDN上面发表过一篇关于sort的用法的文章。现在摘录如下:sort 函数是经常要用到的高级函数,用到好处,你会感觉你真的很棒!但是,第一个问题就是,你十分了解sort函数吗?其实不然。如果你就不彻底了解它,怎能用好呢?现在让我小露一手吧!我们可以自定义sort函数呢,当然,它要和结构体共同使用,那样更爽,它的这个功能主要用在多级排序上,方便死了。例如:struct student{ char name; int x, y, z;}stu[1000];bool check(strdent a, student b){ if(a.x > b.x)return true; i 阅读全文

posted @ 2011-10-21 10:36 More study needed. 阅读(436) 评论(0) 推荐(0) 编辑

导航

书山有径勤为路>>>>>>>>

<<<<<<<<学海无涯苦作舟!