摘要:
题目:http://acm.hdu.edu.cn/showproblem.php?pid=2550又是大水题。。。杭电果然名不虚传。。。不过我还是跟着E.star大神的脚步走上去吧。。。#include
#include
#define MAXN 35
using namespace std; struct S{ int n, l;
}; bool cmp(S a, S b)
{ return a.l +"); for (int j = 0; j \n"); } printf("\n"); } } return 0;
} 阅读全文
摘要:
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1064太水了。。。简直可以说是尽次于A+B的水题了。。。我都不知道如果我WA了我会多丢脸。。。#include int main()
{ double sum = 0, m; while (scanf("%lf", &m) != EOF) sum += m; printf("$%.2f\n", sum/12); return 0;
} 阅读全文
摘要:
题目:http://acm.hdu.edu.cn/showproblem.php?pid=1009水题必须的,果断用struct排序再计算,第一次循环条件搞错WA了一次。。。#include
#include
#define MAXN 10000
using namespace std; struct Room{ int j, f; double value;
};
Room r[MAXN]; bool cmp(Room a, Room b)
{ return a.value > b.value;
} int main()
{ int m, n; while (scanf("% 阅读全文