摘要: 神奇的3分法,求单峰函数极值的利器!!!公式可以画图推导如下:x1=cos(a)*x+sin(a)*y;y1=cos(a)*y-sin(a)*x; Texas TripTime Limit:1000MSMemory Limit:65536KTotal Submissions:3429Accepted:1018DescriptionAfter a day trip with his friend Dick, Harry noticed a strange pattern of tiny holes in the door of his SUV. ... 阅读全文
posted @ 2013-04-28 22:43 码代码的猿猿 阅读(191) 评论(0) 推荐(0) 编辑
摘要: C. Main Sequencetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAs you know, Vova has recently become a new shaman in the city of Ultima Thule. So... 阅读全文
posted @ 2013-04-28 19:05 码代码的猿猿 阅读(276) 评论(0) 推荐(0) 编辑
摘要: #include #include #include using namespace std;int main(){map word_count;string word;while(cin>>word){pair::iterator,bool> ret;ret=word_count.insert(make_pair(word,1));if(!ret.second){++ret.first->sec... 阅读全文
posted @ 2013-04-28 06:03 码代码的猿猿 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 枚举在每个湖结束钓鱼的情况,去掉移动的时间。这样在各个湖之间的移动就可以看成瞬移的了,贪心可以很容易的求出最大解。Gone FishingTime Limit : 4000/2000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : Accepted Submission(s) : P... 阅读全文
posted @ 2013-04-28 00:24 码代码的猿猿 阅读(197) 评论(0) 推荐(0) 编辑