POJ
文章平均质量分 66
帅比小新
很无耻的说一句:我这人就是天生惫懒好色、木有追求,外加有点自恋。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
POJ 1007 解题报告 DNA Sorting
#include #include #include using namespace std;class DNA{public: string strDNA; DNA(string);};DNA::DNA(string s){ strDNA = s;}int calculateInversionsNum(const string&);bool operator<原创 2011-12-15 17:39:36 · 464 阅读 · 0 评论 -
POJ 1003 解题报告 Hangover
简单题。注意不要重复计算。使用二分查找的思想。AC。#include <iostream>#include <map>using namespace std;int getCards(map<int, double>&, double);int binaryChop(map<int, double&...2011-12-15 17:32:48 · 168 阅读 · 0 评论 -
POJ 1004 解题报告 Financial Management
超水一题。#include <iostream>using namespace std;int main (){ int i = 12; double dSum = 0; double d; while (i--) { cin >> d; dSum += d; } cout << ...2011-12-15 17:34:23 · 185 阅读 · 0 评论 -
POJ 1005 解题报告 I Think I Need a Houseboat
好吧,小朋友的数学题。#include <iostream>#include <math.h>using namespace std;const double PI = atan(1.)*4.;int getYear(double, double);int main (){ int iInput; double dX...2011-12-15 17:36:35 · 144 阅读 · 0 评论 -
POJ 1006 解题报告 Biorhythms
同理小学生计算题?还是我没想到什么?#include <iostream>using namespace std;int getTriple(int, int, int, int);int main (){ int iP; int iE; int iI; int iD; int iCount = 0; while...2011-12-15 17:39:06 · 183 阅读 · 0 评论 -
POJ 1007 解题报告 DNA Sorting
#include <iostream>#include <string>#include <map>using namespace std;class DNA{public: string strDNA; DNA(string);};DNA::DNA(string s){ strDNA = s;}...2011-12-15 17:43:37 · 173 阅读 · 0 评论 -
POJ 1008 解题报告 Maya Calendar
还是要细心啊,题目不难,历法转换。AC吧,这么简单的题烧这么长时间。。。丢人了。。。。 #include <iostream>#include <string>#include <cstdlib>#include <cstdio>using namespace std;int getTotalDays(...2011-12-16 17:54:59 · 161 阅读 · 0 评论 -
POJ 1009 解题报告 Edge Detection
1009是痛苦的一题啊。游程编码问题。先说思路:只处理变化的点。产生变化的点会影响周围的8个点的编码。没有产生变化的点的编码值与前一天相同。当然,有几个特殊情况需要注意。先上代码: #include <iostream>#include <algorithm>#include <vector>using namespace...2011-12-18 21:13:46 · 281 阅读 · 0 评论 -
POJ 1010 解题报告 STAMPS
考察多判。遍历所有组合,取出最好组合。上代码。 #include <iostream>#include <map>#include <cstring>#include <algorithm>using namespace std;int arrStampType[256];int arrCust...2011-12-18 21:15:24 · 161 阅读 · 0 评论 -
POJ 1001 解题报告 Exponentiation
高精度浮点数计算。花了我整整一天时间才写好,POJ上给的测试数据都通过,0的1次方和1的0次方之类的输入和加入一些干扰0的输入测试也都通过,但是提交后AC不了,显示Anwser Wrong,不知道什么问题,也没找出来。崩溃了。好好练练吧,鉴于道理已明了,先草草结贴,有时间再看。 #include <iostream>#include <vecto...2011-11-25 15:15:04 · 146 阅读 · 0 评论 -
POJ 1010 解题报告 STAMPS
考察多判。遍历所有组合,取出最好组合。上代码。#include #include #include #include using namespace std;int arrStampType[256];int arrCustomer[256];int arrAnswer[7]; // 0数据长度 1种类 6tie?void showInput();void原创 2011-12-13 20:29:34 · 659 阅读 · 1 评论 -
POJ 1009 解题报告 Edge Detection
1009是痛苦的一题啊。游程编码问题。先说思路:只处理变化的点。产生变化的点会影响周围的8个点的编码。没有产生变化的点的编码值与前一天相同。当然,有几个特殊情况需要注意。先上代码:#include #include #include using namespace std;typedef class Point{public: int iFirst; int i原创 2011-12-05 15:26:37 · 5846 阅读 · 1 评论 -
POJ 题目分类
OJ上的一些水题(可用来练手和增加自信)(poj3299,poj2159,poj2739,poj1083,poj2262,poj1503,poj3006,poj2255,poj3094)初期:一.基本算法: (1)枚举. (poj1753,poj2965) (2)贪心(poj1328,poj2109,poj2586) (3)递归和分治法.转载 2011-11-29 16:38:34 · 345 阅读 · 0 评论 -
POJ 1008 解题报告 Maya Calendar
还是要细心啊,题目不难,历法转换。AC吧,这么简单的题烧这么长时间。。。丢人了。。。。#include #include #include #include using namespace std;int getTotalDays(string&, string&, string&);string& turnHolly(int, string&);int main ()原创 2011-12-01 14:46:49 · 497 阅读 · 0 评论 -
POJ 1003 解题报告 Hangover
2011-11-27简单题。注意不要重复计算。使用二分查找的思想。AC。#include #include using namespace std;int getCards(map&, double);int binaryChop(map&, double, int, int);int main (){ double dLength; map mSt原创 2011-11-27 16:22:37 · 343 阅读 · 0 评论 -
POJ 1005 解题报告 I Think I Need a Houseboat
2011-11-27好吧,小朋友的数学题。#include #include using namespace std;const double PI = atan(1.)*4.;int getYear(double, double);int main (){ int iInput; double dX; double dY; cin >> iI原创 2011-11-27 17:16:34 · 447 阅读 · 0 评论 -
POJ 1004 解题报告 Financial Management
2011-11-27超水一题。#include using namespace std;int main (){ int i = 12; double dSum = 0; double d; while (i--) { cin >> d; dSum += d; } cout << "{1}quot; << dSum/12 << endl;}原创 2011-11-27 17:14:36 · 314 阅读 · 0 评论 -
POJ 1002 解题报告 487-3279
2011-11-25典型的字符串处理问题。刚开始用的vector,果断超时。题目本身没什么难度,只在选择容器上要考虑。AC咯。#include #include #include #include using namespace std;int nicknameToNumber(string&);int main (){ int iPhoneTotal;原创 2011-11-25 16:07:04 · 430 阅读 · 0 评论 -
POJ 1006 解题报告 Biorhythms
2011-11-27同理小学生计算题?还是我没想到什么?#include using namespace std;int getTriple(int, int, int, int);int main (){ int iP; int iE; int iI; int iD; int iCount = 0; while (cin >> iP >> iE >>原创 2011-11-27 17:54:40 · 365 阅读 · 0 评论 -
POJ 1001 解题报告 Exponentiation
2011-11-23高精度浮点数计算。花了我整整一天时间才写好,POJ上给的测试数据都通过,0的1次方和1的0次方之类的输入和加入一些干扰0的输入测试也都通过,但是提交后AC不了,显示Anwser Wrong,不知道什么问题,也没找出来。崩溃了。好好练练吧,鉴于道理已明了,先草草结贴,有时间再看。#include #include #include using name原创 2011-11-24 18:34:56 · 573 阅读 · 0 评论 -
POJ 1002 解题报告 487-3279
典型的字符串处理问题。刚开始用的vector,果断超时。题目本身没什么难度,只在选择容器上要考虑。AC咯。 #include <iostream>#include <string>#include <iomanip>#include <map>using namespace std;int nickname...2011-11-25 15:53:34 · 160 阅读 · 0 评论
分享