题意:求2000.1.1(周六)过n天后,是哪年哪月哪日星期几
思路:看到过好多次了这种题,细心点模拟就是了
#include
#include
#include
#include
using namespace std;
char w[7][10]={"Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday" ,...
分类:
其他好文 时间:
2014-05-10 09:28:33
阅读次数:
266
#include "HelloWorldScene.h"
#include "SimpleAudioEngine.h"
using namespace cocos2d;
using namespace CocosDenshion;
CCScene* HelloWorld::scene()
{
CCScene *scene = CCScene::create();
HelloWo...
分类:
其他好文 时间:
2014-05-10 09:26:12
阅读次数:
337
一、创建卡片类
首先想想卡片是一个精灵,那么我们就继承精灵类。然后还要有数字,背景颜色。基本就这些,那么看代码吧。
Card.h代码
#ifndef _CARD_H_
#define _CARD_H_
#include "cocos2d.h"
USING_NS_CC ;
class CardSprite : public Sprite
{
public :
...
分类:
其他好文 时间:
2014-05-10 09:25:46
阅读次数:
280
【题目】
原文:
1.3 Design an algorithm and write code to remove the duplicate characters in a string without using any additional buffer. NOTE: One or two additional variables are fine. An
extra copy of...
分类:
其他好文 时间:
2014-05-07 08:48:12
阅读次数:
372
题目链接:uva 12105 - Bigger is Better
题目大意:有n根火柴,要组成一个数字能够整除m,并且最大。
解题思路:dp[i][j]表示用了i个火柴,组成的数字模掉m余j的情况,只不过状态保留的是字符串。
#include
#include
#include
#include
using namespace std;
const int...
分类:
其他好文 时间:
2014-05-07 07:59:52
阅读次数:
314
题目大意:
添加和删除一个数,然后输出中位数。
简单的Splay 维护Splay上有多少个节点就可以了
#include
#include
#define inf 1LL<<60
#define maxn 222222
#define keyTree (ch[ch[root][1]][0])
using namespace std;
typedef long...
分类:
其他好文 时间:
2014-05-07 07:46:42
阅读次数:
405
原题POJ 3487
稳定婚姻问题的解法,男士主动,女士被动,每次找一个光棍的男士对他最满意的女士求婚,如果女士是未婚或者女士当前的未婚夫在女士心目中不如他,就把男士定为女士的未婚夫,一直进行循环。
#include
#include
#include
#include
#include
#define maxn 1000
using namespace std;
int pref[maxn]...
分类:
其他好文 时间:
2014-05-07 07:43:34
阅读次数:
313
题目大意:
给出m个询问,问【l,r】之间的和 ,求出有多少次询问不和之前的矛盾的。
思路分析:
用并查集记录当前节点到根节点的和。
#include
#include
#include
#include
#define maxn 222222
using namespace std;
int set[maxn];
int sum[maxn];
in...
分类:
其他好文 时间:
2014-05-07 07:35:05
阅读次数:
386
Nido Framework at Use - The diagram below shows how Nido Framework reduces the size of your DAL and BLL.
Nido Framework is a reusable and highly generic code library developed using Microsoft ....
分类:
其他好文 时间:
2014-05-07 07:22:40
阅读次数:
333
#include
using namespace std;
class Base
{
public:
Base(){base = 1; cout
virtual ~Base(){cout
virtual void say(){cout
private:
int base;
static int count;
};...
分类:
编程语言 时间:
2014-05-07 06:59:24
阅读次数:
302