#include
#include
#include
#define STACK_INIT_SIZE 100
#define STACKINCREMENT 10
#define OVERFLOW -1
#define OK 1
#define ERROR 0
typedef int Status;
typedef int SElemType;
typedef struct
{...
分类:
其他好文 时间:
2014-05-21 16:31:38
阅读次数:
215
关于include与extend的区别,在之前画UML图的时候并没有注意到,还是在画第二遍机房收费系统图验收的时候师傅提出来的,于是查了一些资料,我在机房收费系统中是这样用到include的:
我在一开始看过其他资料的时候大家都是这么用的,我也就想都没想惯性的用了include,但是也不知道原因,就自以为这两个用例都要用这个exportEx...
分类:
其他好文 时间:
2014-05-21 11:32:44
阅读次数:
288
#include
#include
typedef int elemType;
typedef struct Node{//定义单链表节点类型
elemType data;
Node *next;
}Node,*linkList;
//初始化链表,单链表的头指针为空
int initList(linkList &L)
{
L= (Node *)malloc(sizeof(Node));...
分类:
其他好文 时间:
2014-05-21 11:19:08
阅读次数:
228
题目链接:uva 11645 - Bits
题目大意:给出n,问从0到n这n+1个数种,数的二进制情况下,有多少11存在。
解题思路:和uva 11038一个类型的题目,只是这道题目是对于二进制下的情况。而且高精度部分可以用两个long long数解决。
#include
#include
typedef long long ll;
const int N = 100;
con...
分类:
其他好文 时间:
2014-05-21 11:17:49
阅读次数:
222
#include
#include
using namespace std;
class Point
{
public:
Point(double a,double b):x(a),y(b) {}
double getx()
{
return x;
}
double gety()
{
return y;
...
分类:
其他好文 时间:
2014-05-21 10:09:26
阅读次数:
309
#pragma once
#include "ThreadLock.h"
#include
#include
#include
#include
#include
#include
#include
#include
class QuoteLog
{
public:
static QuoteLog* getInstance();
void log...
分类:
其他好文 时间:
2014-05-21 10:03:49
阅读次数:
157
/**
* 多重背包:
* 有N种物品和一个容量为V的背包。第i种物品最多有Mi件可用,
* 每件耗费的空间是Ci,价值是Wi。
* 求解将哪些物品装入背包可使这些物品的耗费的空间总和不超过背包容量,且价值总和最大。
*/
#include
#include
int max(int a, int b){
if (a > b)return...
分类:
其他好文 时间:
2014-05-21 10:00:56
阅读次数:
206
#include
#include //要使用malloc(),必须包含此库文件
void main()
{
char count, *ptr1, *p;
ptr1 = malloc(27*sizeof(char));
ptr1[26] = 0;//字符串要加0
if (ptr1 == NULL)
{
puts("没有足够的空间卡可以分配!\n");
}
p = ptr1...
分类:
编程语言 时间:
2014-05-21 07:11:10
阅读次数:
275
SOl:将原题改为枚举N的每一对因子,计算其是否互素即可。
#include
#include
#include
using namespace std;
inline int gcd(int a,int b)
{
return b==0?a:gcd(b,a%b);
}
int main()
{
int n,T,i,j;
scanf("%d",&T);
while(T...
分类:
其他好文 时间:
2014-05-21 07:07:00
阅读次数:
273
一张图上分布着n台坏了的电脑,并知道它们的坐标。两台修好的电脑如果距离
#include
#include
#include
#include
#include
#include
const int MAXN=111111;
const int MAX_N=111111;
int n,d;
using namespace std;
struct po
{
int x,y;
boo...
分类:
Web程序 时间:
2014-05-21 06:29:47
阅读次数:
418