/*
* Copyright (c) 2013, 烟台大学计算机学院
* All rights reserved.
* 作 者:马广明
* 完成日期:2014 年 5 月 13 日
* 问题介绍: 班长信息
* 版 本 号:v1.0
*/
#include
#include
using namespace std;
class Stu //声明基类
{
pu...
分类:
其他好文 时间:
2014-05-15 15:17:02
阅读次数:
241
线性推,矩阵乘法+快速幂求通项。
传送门:点击打开链接
#include
#include
#include
#include
using namespace std;
#define LL long long
struct Mat{
LL f[2][2];
};
LL MOD;
Mat mul(Mat a,Mat b)
{
LL i,j,k;
...
分类:
其他好文 时间:
2014-05-15 14:53:10
阅读次数:
225
#include
using namespace std;
class Teacher
{
public:
Teacher(string nam,int ag,string add,string tel,string se,string ti):
name(nam),age(ag),addr(add),telnum(tel),sex(se),title...
分类:
其他好文 时间:
2014-05-15 14:41:33
阅读次数:
222
插头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
用 栈 stack 来模拟
题目意思:http://blog.csdn.net/mobius_strip/article/details/12765319
下面的代码有坑,输出格式需要调。
#include
#include
#include
#include
#include
using namespace std;
const int maxn=25+5;
stacks[maxn];
i...
分类:
其他好文 时间:
2014-05-15 07:22:04
阅读次数:
273
#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
#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
插头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
插头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
/*
* hdu OpenDoorManAndCloseDoorMan
* date 2014/5/13
* state AC
*/
#include
#include
#include
#include
using namespace std;
struct DoorMan
{
char name[20];
int startH,startM,startS;
...
分类:
其他好文 时间:
2014-05-14 14:58:40
阅读次数:
247