ITeye博客

water~7

Midnight0101 · 2011-08-06 17:15 · 算法 · 编程语言 · water 贪心 poj · Markdown

poj1328[url]http://poj.org/problem?id=1328[/url] 比较简单的贪心,看代码,不细说了~ [code="c++"] #include #include #include #include using namespace std; struct Space { double left; double right; friend bool operator<(Space a,Space b) { return a.leftspace[i+1].right) adjust=space[i+1].right; } } cout<<"Case "<>n>>d; if(n==0 && d==0) break; for(i=0;i>a>>b; if(b>d && flag) { cout<<"Case "<

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。