出题:请实现给定String的类定义;分析:注意检查标准类构造注意事项;解题: 1 #include
2 #include 3 /** 4 * 检查是否需要构造函数 5 * 检查是否需要无参构造函数 6 * 检查是否需要成员变量(函数)私有 7 *
检查是否需要在构造函数预初始化成员变量...
分类:
其他好文 时间:
2014-05-19 10:32:35
阅读次数:
217
-------------------------------source---------------------------------#include
#include #include #include #include /* 函数声明 */void tty_write_message1(s...
分类:
系统相关 时间:
2014-05-19 10:30:33
阅读次数:
468
1. vs 中新建win32 dll 项目 testdll添加实现文件
test.cpp#include "stdafx.h" #include using namespace std;int Add(int plus1, int
plus2){ int add_result = plus1 ...
分类:
编程语言 时间:
2014-05-19 10:25:52
阅读次数:
309
题意:题意就是输入N以EOF结尾,形成1-N的数字序列,然后选取一个幸运数字,每隔幸运数字的长度就将数字从序列中删掉,选取幸运数字的规则是最开始是2,之后删掉数字之后每次选取序列中除1和选过的幸运数字外最小的。3#include#include#include
#includeusing names...
分类:
其他好文 时间:
2014-05-19 10:20:26
阅读次数:
303
题意:就是一个人走到一个城市就会记录与该城市相连的城市有多少,最后判断这些城市是否全部相连;样例输入87 7
4 3 3 3 2 1105 4 3 3 2 2 2 1 1
1样例输出NOYES解题思路:其实就是判断无向连通图,sum#include#include#include #includeu...
分类:
其他好文 时间:
2014-05-19 10:13:47
阅读次数:
306
题目链接:POJ 2828 Buy Tickets【题意】给了你 n(1 7 #include
8 #include 9 using namespace std;10 const int MAX = 200005;11 12 int pos[MAX],
val[MAX], ans[MAX];13.....
分类:
其他好文 时间:
2014-05-19 10:10:34
阅读次数:
282
题目链接:HDU 2795 Billboard【题意】给你一张h*w(1 7 #include
8 #include 9 using namespace std;10 const int MAX = 200005;11 12 int tree[MAX=
val)26 {27 ...
分类:
其他好文 时间:
2014-05-19 10:09:17
阅读次数:
419
题目描述Given an N*N(N#include#include#includeusing
namespace std;const int maxn=1001;int group[maxn][maxn];bool vis[maxn][maxn];int
dx[4]={0,0,1,-1};int ...
分类:
其他好文 时间:
2014-05-19 09:06:30
阅读次数:
379
给定n
k以及n个人已参加的比赛数,让你判断最少还能参加k次比赛的队伍数,每对3人,每个人最多参加5次比赛#include using namespace
std;int main(){ int n,k, cnt = 0; cin >> n >> k; for(int i = 0 ...
分类:
其他好文 时间:
2014-05-19 08:40:56
阅读次数:
239
不知为何,这个代码只能得95分放一下傻逼代码。。。#include#include#include#includeusing namespace std;int
n,K;int nn2=1,nn=1,nod;#define N 1000000#define ed(x) (x>>1)#define a...
分类:
其他好文 时间:
2014-05-17 17:55:40
阅读次数:
425