`
ysshuai19
  • 浏览: 14934 次
  • 性别: Icon_minigender_1
  • 来自: 西安
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论
文章列表
考察多判。 遍历所有组合,取出最好组合。 上代码。   #include <iostream> #include <map> #include <cstring> #include <algorithm> using namespace std; int arrStampType[256]; int arrCustomer[256]; int arrAnswer[7]; // 0数据长度 1种类 6tie? void showInput(); void cal(); void calReques ...
1009是痛苦的一题啊。游程编码问题。 先说思路:只处理变化的点。产生变化的点会影响周围的8个点的编码。没有产生变化的点的编码值与前一天相同。当然,有几个特殊情况需要注意。 先上代码:   #include <iostream> ...
还是要细心啊,题目不难,历法转换。 AC吧,这么简单的题烧这么长时间。。。丢人了。。。。   #include <iostream> #include <string> #include <cstdlib> #include <cstdio> using namespace std; int getTotalDays(string&, string&, string&); string& turnHolly(int, string&); int main () { ...
  #include <iostream> #include <string> #include <map> using namespace std; class DNA{ public: string strDNA; DNA(string); }; DNA::DNA(string s) { strDNA = s; } int calculateInversionsNum(const string&); bool operator<(const DNA&, const DNA&) ...
同理小学生计算题? 还是我没想到什么? #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 (cin >> iP >> iE >> iI >> iD) { iCount ++; if (-1 == iP && - ...
好吧,小朋友的数学题。 #include <iostream> #include <math.h> using namespace std; const double PI = atan(1.)*4.; int getYear(double, double); int main () { int iInput; double dX; double dY; cin >> iInput; int iCount = iInput; while (iInput --) { cin >& ...
超水一题。 #include <iostream> 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; }  
简单题。 注意不要重复计算。 使用二分查找的思想。 AC。 #include <iostream> #include <map> using namespace std; int getCards(map<int, double>&, double); int binaryChop(map<int, double>&, double, int, int); int main () { double dLength; map<int, double> mStdLengt ...
典型的字符串处理问题。 刚开始用的vector,果断超时。题目本身没什么难度,只在选择容器上要考虑。 AC咯。   #include <iostream> #include <string> #include <iomanip> #include <map> using namespace std; int nicknameToNumber(string&); int main () { int iPhoneTotal; cin >> iPhoneTotal; map<in ...
高精度浮点数计算。 花了我整整一天时间才写好,POJ上给的测试数据都通过,0的1次方和1的0次方之类的输入和加入一些干扰0的输入测试也都通过,但是提交后AC不了,显示Anwser Wrong,不知道什么问题,也没找出来。崩溃了。 好好练练吧,鉴于道理已明了,先草草结贴,有时间再看。     #include <iostream> #include <vector> #include <string> using namespace std; void getResult(vector< vector<int> ...
Global site tag (gtag.js) - Google Analytics