using System;using System.Collections.Generic;using
System.Linq;using System.Text;namespace SU{ /// /// 中文转拼音 /// public class
PinYin ...
分类:
其他好文 时间:
2014-05-23 06:46:51
阅读次数:
395
#include#include#include#include#includeusing
namespace std; vector > ret;vector sub;int num = 0;void helper(int* str, int
n,int i) ///递归求组合{ if(i ==....
分类:
其他好文 时间:
2014-05-23 06:42:21
阅读次数:
232
struts2
的命名空间action里的name是个无关紧要的东西,namespace为‘/’表示所有
为‘/名字’,不管怎么访问只要名称空间些对了就不会错,/时你的请求地址可以直接写**Action_方法名’也可以在方法名前随便写个名称空间,反正当链接请求后找不到你写的命名空间就去找所有的下面看...
分类:
其他好文 时间:
2014-05-23 06:14:24
阅读次数:
218
1.安装系统:别的没什么说的,就是安的时候把网线拔了,不然到 configure
apt的时候会卡起很久不走的2.配置网络 编辑/etc/network/interface打开/etc/networt/interface
添加下面几句:auto eth0iface inet eth0 static ...
分类:
系统相关 时间:
2014-05-23 06:09:49
阅读次数:
341
#include
using namespace std;
class Box//盒子类
{
public:
//定义一个构造函数用于初始化对象数组
Box(int h, int w, int l);
int volume();//计算盒子的体积
private:
int height;//盒子的高
int width;//盒子的宽
int length;//盒子的长
};
...
分类:
其他好文 时间:
2014-05-21 17:09:16
阅读次数:
212
一次AC
二维树状数组,有模版很好办
注意二维树状数组这个下标是[1][1]的
#include
#include
#include
#include
#include
#include
using namespace std;
const int Max = 1030;
int row, col, ar[Max][Max];
// 二维的其实下标为[1][1],这个要记得。
...
分类:
其他好文 时间:
2014-05-21 16:23:34
阅读次数:
271
挺简单的
N个元素扩展为 3*N个
i-A i-B i-C
A吃B吃C吃A
挑战程序设计的89面
#include
#include
#include
#include
#include
using namespace std;
int N,K;
const int MAX_N=333333;
//并查集
int par[MAX_N];
int rank[MAX_N];//树的...
分类:
其他好文 时间:
2014-05-21 16:03:48
阅读次数:
216
#include
#include
using namespace std;
class Point
{
public:
Point(double a,double b):x(a),y(b) {}
double getx()
{
return x;
}
double gety()
{
...
分类:
其他好文 时间:
2014-05-21 14:44:07
阅读次数:
281
构造函数:构造函数是一种特殊的成员函数
构造函数的特点:
1 构造函数的函数名和类名相同
2 构造函数没有返回值
3 构造函数用于初始化对象
通过一个实例说明构造函数的作用
#include
using namespace std;
class Time//时间类
{
public:
void set_time();//设置时间
void show_time();//...
分类:
其他好文 时间:
2014-05-21 14:38:17
阅读次数:
263
析构函数和构造函数是一对,就像C语言中的malloc和free,C++中的new和delete一样
先从一个实例说起:
#include
#include
using namespace std;
class Student
{
public:
Student(int n, string nam, char s)
{
num = n;
name = nam;
sex...
分类:
其他好文 时间:
2014-05-21 12:33:43
阅读次数:
259