- 博客(7)
- 资源 (1)
- 收藏
- 关注
原创 110604 Expressions
#include #include #include #include #include #include using namespace std; static const int STEP = 4; static const int UNIT = pow(10, STEP); class Integer { public: Integer(char* buf, int le
2013-11-26 16:54:34 606
原创 110603 Counting
#include #include using namespace std; class Integer { public: Integer(char* buf, int len) { for (int i = 0; i < len; ++i) m_data.push_back(buf[i] - '0'); } Integer() {} void Print()
2013-11-25 12:36:19 628
原创 110903 The Tourist Guide
#include #include #include #include using namespace std; class TouristGuid { public: TouristGuid(int cities, int roads) { int city1, city2, capacity; m_cities.resize(cities); for (int i
2013-11-20 15:45:19 794
原创 110902 Playing with Wheels
#include #include #include #include using namespace std; static void GetDigitsFromNumber(int number, int& thousands, int& hundreds, int& tens, int& ones) { ones = number % 10; number /= 10; t
2013-11-20 15:43:37 835
原创 110901 Bicoloring
#include #include #include using namespace std; class Graph { public: Graph(int vertexCnt) { m_vertexCnt = vertexCnt; int edges; cin >> edges; m_relations = new bool*[m_vertexCnt];
2013-11-20 15:42:09 712
原创 110602 How Many Pieces of Land
// Max = 1 + C(n, 2) + C(n, 4) // Refer to http://en.wikipedia.org/wiki/Dividing_a_circle_into_areas or // http://www.arbelos.co.uk/Papers/Chords-regions.pdf #include #include #include using
2013-11-18 13:25:15 610
原创 110601 How many Fibs
#include #include #include using namespace std; class Integer { public: Integer(const char* buf, int len) { Init(buf, len); } Integer() {} void Init(const char* buf, int len) { for (
2013-11-15 16:40:29 589
c++语言的设计和演化
2009-07-22
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人