hdu 1009(贪心)
摘要://贪心,比例从大往后贪#include <cstdio>#include <cstdlib>#include <iostream>using namespace std;struct node { double j; double f; double c;}s[100000];int cmp(const void *a, const void *b) { node *c = (node *)a; node *d = (node *)b; if (c->c > d->c) return -1; return 1;}int main() {
阅读全文
posted @
2012-04-04 08:50
Try86
阅读(155)
推荐(0)