摘要: Jumping on Walls CodeForces - 198B 应该是一个隐式图的bfs,或者叫dp。 先是一个TLE的O(nklogn) 1 #include<cstdio> 2 #include<set> 3 using namespace std; 4 typedef pair<bool 阅读全文
posted @ 2017-10-12 08:43 hehe_54321 阅读(316) 评论(0) 推荐(0) 编辑
摘要: Analyzing Polyline CodeForces - 195D 题意:有n个函数,第i个函数yi(x)=max(ki*x+bi,0)。定义函数s(x)=y1(x)+y2(x)+...+yn(x)。显然函数s的图像是一条折线。求折线上有多少个转折点。 方法:对于每一个函数yi(x)的图像,如 阅读全文
posted @ 2017-10-12 08:27 hehe_54321 阅读(247) 评论(0) 推荐(0) 编辑
AmazingCounters.com