摘要:
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1034把题意模拟出来就可以了,不多说。#include <iostream>using namespace std;const int LEN = 10000;int input[LEN],pass[LEN];int len;int isEnd(){ int pre = input[0]; for (int i = 0;i < len;i ++) { if (input[i] != pre) return 0; pre = inpu... 阅读全文
posted @ 2012-08-18 21:53
peaceful
阅读(140)
评论(0)
推荐(0)
摘要:
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1031排序。没有给N,M的范围,所以用了vector。不用将所有输入数据存下来,只需计算同一个编号的design的总得分。对总得分排序,题目规定得分时,再按design的编号排序。取前K个design。再对着K个design按编号由大到小排序。#include <algorithm>#include <iostream>#include <vector>using namespace std;class vote{public: int id; double sc 阅读全文
posted @ 2012-08-18 21:02
peaceful
阅读(335)
评论(0)
推荐(0)
摘要:
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1017这种题就不说什么了。#include <iostream>using namespace std;inline int isSatisfied(int a,int b,int m){ if ((a * a + b * b + m) % (a * b) == 0) return 1; else return 0;}int main (){ freopen("input.txt","r",stdin); freopen("output. 阅读全文
posted @ 2012-08-18 20:16
peaceful
阅读(156)
评论(0)
推荐(0)

浙公网安备 33010602011771号