C++ 归档

  • 2002年就开始参加TopCoder的算法竞赛。当时一周举行两次,每个房间12个人参加比赛,前三名都有现金奖励。有空参加一下,练练算法,给头脑保鲜。 下面总结了一些题目中常用的STL库的用法。   #include <algorithm> #include <string> #include <vector> #include <map> #include <iostream>   using namespace std;   //递归 int GetN(int n) { if (n==1) return 1; else return GetN(n-1);...

    TopCoder竞赛:C++, STL 用法快速入门

    2002年就开始参加TopCoder的算法竞赛。当时一周举行两次,每个房间12个人参加比赛,前三名都有现金奖励。有空参加一下,练练算法,给头脑保鲜。 下面总结了一些题目中常用的STL库的用法。   #include <algorithm> #include <string> #include <vector> #include <map> #include <iostream>   using namespace std;   //递归 int GetN(int n) { if (n==1) return 1; else return GetN(n-1);...

    继续阅读...