如果global
new-hander没有成功配置,会抛出一个std::bad_alloc的exception。#include#include#includeusing
namespace std;templateclass NewHandlerSupport{public: static ...
分类:
编程语言 时间:
2014-05-10 08:24:08
阅读次数:
456
1.C++ string 转换为 NSString std::string str("hello");
// NSString *str = [NSString stringWithString:str.c_str()]; NSString *ocstr =
[NSStr...
分类:
编程语言 时间:
2014-05-10 08:14:05
阅读次数:
381
kurXX最小生成树#include #include #include using
namespace std;#define M 501#define LIM 20000000struct edg{ int u,v; int
w;}all_e[M*M/2];bool operator > t; ...
分类:
其他好文 时间:
2014-05-10 00:29:13
阅读次数:
470
在Cocos2d-x中能够使用的字符串constchar*、std::string和cocos2d::__String等,其中const
char*是C风格的字符串,std::string是C++风格的字符串,它封装了const
char*。cocos2d::__String才是Cocos2d-x引...
分类:
其他好文 时间:
2014-05-09 23:58:33
阅读次数:
426
非递归版好像被卡掉了,其他2个板子都能过。
#include
#include
#include
#include
#include
using namespace std;
#define ll int
const int MAXN = 100100;//点数的最大值
const int MAXM = 400010;//边数的最大值
const int INF = 0x3f3f3f3f;
st...
分类:
其他好文 时间:
2014-05-09 22:55:23
阅读次数:
476
BFS。 1 #include 2 #include 3 #include 4
#include 5 using namespace std; 6 7 #define INF 0x3fffffff 8 9 typedef struct
node_st {10 int x, y, ...
分类:
其他好文 时间:
2014-05-09 20:18:48
阅读次数:
339
#include#include#include#includeusing namespace
std;int nn;#define in(x) scanf("%d",&x)#define in2(x,y)
scanf("%d%d",&x,&y)#define in3(x,y,z) scanf("%...
分类:
其他好文 时间:
2014-05-09 13:24:28
阅读次数:
275
uva11137 n3可转化为n2(立方和为n的方法数)/*ID:
neverchanjePROG:LANG: C++11*/#include#include#includetypedef long long ll;using
namespace std;int n;long long d[23][...
分类:
其他好文 时间:
2014-05-09 06:38:39
阅读次数:
382
#include
using namespace std;
const int MAXQSIZE = 5;
//队列类
template
struct LinkList
{
T * data;//指向连续的数据存储区域
int front;//头指针 指向第一个元素
int rear;//尾指针 如果队列不为空指向最后元素的下一个位置
};
//构造一个空队列
template
void...
分类:
其他好文 时间:
2014-05-09 06:07:53
阅读次数:
248
#includeusing namespace std;int main(){ int n =
0, sum; while (cin>>n) { sum = 0; // 这里要清零 for (int i =0; i <= n; i++)
{...
分类:
其他好文 时间:
2014-05-09 05:38:17
阅读次数:
241