POJ解答报告
文章平均质量分 65
测试昵称666
测试一下
展开
-
poj1008 Maya Calendar解答报告
以下是poj1008 的解答报告,不知道用了什么算法,只知道经过了N次的修改之后,终于给运行出来了。Time Limit: 1000ms Memory limit: 10000kB 题目描述 During his last sabbatical, professor M. A. Ya made a surprising discovery about the old Ma原创 2009-11-26 21:46:00 · 516 阅读 · 0 评论 -
POJ 1565
地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1565 分析倒没有什么分析,只是注意这类字符串的题目可以用数组解决; 解题报告:(C++)#include #include #include using namespace std;int main(){ int k, i, base[31], sum原创 2010-04-10 13:47:00 · 511 阅读 · 0 评论 -
POJ 1657
题目:http://acm.pku.edu.cn/JudgeOnline/problem?id=1657 解题报告:#include #include using namespace std;int main(){ int nCases, i; scanf("%d", &nCases); char des_c1, des_c2; int des_i1,原创 2010-04-09 09:42:00 · 595 阅读 · 0 评论 -
中国剩余定理
中国剩余定理中国剩余定理可以描述为:若某数x分别被d1、、…、dn除得的余数为r1、r2、…、rn,则可表示为下式:x=R1r1+R2r2+…+Rnrn+RD其中R1是d2、d3、…、dn的公倍数,而且被d1除,余数为1;(称为R1相对于d1的数论倒数)R1 、R2 、… 、Rn是d1、d2、…、dn-1的公倍数,而且被dn除,余数为1;D是d1、d2、…、的最小公倍数;R是原创 2010-04-05 21:18:00 · 6154 阅读 · 0 评论 -
百练POJ 2964 日历问题
设置的数组是程序变得简单了许多。题目地址:http://poj.grids.cn/problem/2964/ 解题报告:#include #include #include using namespace std;int IsBissextile(int year);char week[7][10] = {"Saturday", "Sunday", "Monda原创 2010-04-11 21:15:00 · 530 阅读 · 0 评论 -
POJ 1928(百练2950) 花生问题
题目地址:http://acm.pku.edu.cn/JudgeOnline/problem?id=1928 解题报告:(C++) #include #include #include #define MAX_NUM 51using namespace std;int T, M, N, K;int aField[MAX_NUM][MAX_NUM];原创 2010-04-12 18:51:00 · 1077 阅读 · 0 评论 -
百练POJ 2753斐波那契数列
地址:http://poj.grids.cn/problem/2753/ 斐波那契数列,可以用递归算法做,也可以用非递归算法做,反正在我自己学校的OJ中递归的是超时了,在百练上提交的递归可以通过。 解题报告:#include using namespace std;// 以下是递归算法int f(int a){ if (a == 0) return 0原创 2010-04-13 21:08:00 · 1008 阅读 · 0 评论 -
百练POJ 2712细菌繁殖
废话不多说,月份最好是数组设为13,第一个为0,符合人们正常思考。题目地址:http://poj.grids.cn/problem/2712/ 解题报告:(C++)#include #include #include using namespace std;int month[13] = {0, 31, 28, 31, 30, 31, 30, 31, 31, 30,原创 2010-04-11 20:21:00 · 1053 阅读 · 0 评论 -
POJ 1003--Hangover
题目在北大现在测试系统:http://acm.pku.edu.cn/JudgeOnline/problem?id=1003以下是用C++写的: #include #include using namespace std; int main() { int n_card; float card_len原创 2010-03-09 18:45:00 · 657 阅读 · 0 评论