
贪心
JamesLee0001
无
展开
-
poj3045
#include #include#includeusing namespace std;struct node{ int w,s;}cow[50005];int n,sum[50005];int qrt(node f,node se){ return f.s+f.w<se.s+se.w;}int main(){ while(scanf("%d",&原创 2015-02-02 11:34:50 · 488 阅读 · 0 评论 -
hdu 5385 The path
Problem DescriptionYou have a connected directed graph.Let d(x) be the length of the shortest path from 1 to x.Specially d(1)=0.A graph is good if there exist x satisfy d(1)d(2)....d(x)>d(x+1)>...d(n)原创 2015-08-13 21:38:28 · 395 阅读 · 0 评论