摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1117这题理解题意最重要。一张纸,有正反两面,将这张纸对折,则一面又分成了两个半页。将若干张纸这样对折,并将这些纸堆叠起来,可以得到一本小册子。现在就要为这个小册子的每个半页编号。下图是小册子只有一张纸时的情况。#include <iostream>#include <string>using namespace std;const int SHEETS_NUM = 30;class Sheet{public: int frontRight, frontLeft, backL 阅读全文
posted @ 2012-09-04 21:36 peaceful 阅读(185) 评论(0) 推荐(0) 编辑
摘要: 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1107这题条件较多,模拟过程较复杂,但只要细心些就行。我的代码较长。#include <iostream>#include <vector>using namespace std;const int SIZE = 12;class Disciple{public: //门派 char group[2]; //内力,武力,生命值 int innerVal, physicalVal, healthVal; //坐标 int coor_x, coor_y; //是... 阅读全文
posted @ 2012-09-04 19:48 peaceful 阅读(227) 评论(0) 推荐(0) 编辑