码迷,mamicode.com
首页 >  
搜索关键字:using password: yes    ( 53562个结果
第十二周项目3-摩托车继承自行车和电动车
#include #include #include using namespace std; enum vehicleStaus {rest, running}; //车辆状态:泊车、行进 class vehicle //车辆类,虚基类 { protected: int maxSpeed; //最大车速 int currentSpeed;...
分类:其他好文   时间:2014-05-15 15:05:01    阅读次数:262
Divide Two Integers
Divide two integers without using multiplication, division and mod operator. public class Solution { public int divide(int dividend, int divisor) { int sign = 1; if (dividend < 0) { ...
分类:其他好文   时间:2014-05-15 14:40:50    阅读次数:285
HDU 1693 Eat the Trees
插头DP,多条回路求回路数。 可以当作模版来记。注重理解轮廓线。 #include #include #include #include using namespace std; const int HASH=10007; const int STATE=5000; //状态数 const int MAXD=15; int code[MAXD],maze[MAXD][MAXD];...
分类:其他好文   时间:2014-05-15 11:23:33    阅读次数:344
二分查找需要注意的Bug
#include #include using namespace  std; //下面一个移位是一样的,>>相当于除去2,主要是要用right-left,否则对于大数据来说会产生溢出问题。切记 int binarySearch(int arr[],int len,int number) {     int left=0;     int right=len-1;     in...
分类:其他好文   时间:2014-05-15 07:14:38    阅读次数:272
九度 1339
#include #include #include #include using namespace std; #ifdef ONLINE_JUDGE #define FINPUT(file) 0 #define FOUTPUT(file) 0 #else ...
分类:其他好文   时间:2014-05-15 06:27:05    阅读次数:230
12 周 长颈鹿类对动物类的继承 private继承方式下
#include using namespace std; class Animal { public: Animal() {} void eat() { cout << "eat\n"; } protected: void play() { cout << "play\n"; }...
分类:其他好文   时间:2014-05-15 06:21:51    阅读次数:234
hdu AC me
/* * hdu AC Me * date 2014/5/13 * state AC */ #include #include #include #include using namespace std; const int MAXN=100001; char Arr[MAXN]; int cnt[26]; int main() { //cout << "Hello wor...
分类:其他好文   时间:2014-05-15 06:16:24    阅读次数:247
12周 长颈鹿类对动物类的继承 public继承方式
#include using namespace std; class Animal //动物类 { public: Animal() {} void eat(){ cout << "eat\n"; } protected: void play() { cout << "play\n"; ...
分类:其他好文   时间:2014-05-15 06:02:54    阅读次数:360
HDU 4285 circuits
插头DP。 题目要求构造出K条回路的方案数,而且不能出现环套环。 Sol:通过增加标记为来记录形成的回路数,假如不形成环的话就是在形成新的环路,此时,两边的插头个数要为偶数。 #include #include #include #include using namespace std; const int MAXD=15; const int STATE=1000010; const i...
分类:其他好文   时间:2014-05-15 03:53:23    阅读次数:272
HDU 3377 Plan
插头DP。 从左上角到右下角,每个格子都有Val,每个格子只能经过一次,可以不经过,求最大的分数之和。 #include #include #include #include using namespace std; const int MAXD=15; const int HASH=10007; const int STATE=1000010; int N,M; int maz...
分类:其他好文   时间:2014-05-15 03:43:02    阅读次数:175
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!