#include
#include
using namespace std;
template
class tree
{
private:
struct Node
{
T data;
Node* L;
Node* R;
Node(T d) :data(d), L(NULL), R(NULL){}
};
Node* root;
int Count;
publ...
分类:
其他好文 时间:
2015-04-26 09:19:05
阅读次数:
122
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using...
分类:
其他好文 时间:
2015-04-26 09:14:50
阅读次数:
108
h*w的木板,放进一些1*L的物品,求每次放空间能容纳且最上边的位子。每次找能放纸条而且是最上面的位置,询问完以后可以同时更新,所以可以把update和query写在同一个函数里。 1 #include 2 #include 3 #include 4 using namespace std; ...
分类:
其他好文 时间:
2015-04-26 09:11:20
阅读次数:
104
A.题意:求去掉d物品后容量为e最大背包。每个物品有三种属性,权值、容量、数量。#include using namespace std;const int V=1000, N=1005;void zop(int *d, int w, int v) { for(int i=V; i>=v; --i)...
分类:
其他好文 时间:
2015-04-26 08:04:28
阅读次数:
127
代码: 1 using System; 2 using System.Collections.Generic; 3 using System.ComponentModel; 4 using System.Data; 5 using System.Drawing; 6 using System.Lin...
参考文章《DirectX Leak Debugging》:http://masterkenth.com/blog/2014/03/07/directx-leak-debugging/
DX11在debug方面有许多改进,其中之一就是能输出未释放的DX对象,但默认情况下,是输出这个样子:
D3D11 WARNING: Process is terminating. Using sim...
分类:
其他好文 时间:
2015-04-26 01:21:23
阅读次数:
482
按照x轴建树,求线段树的区间最值。
模型转化就是: 矩阵最大交
#include
#include
#include
using namespace std;
#define lson (pos<<1)
#define rson (pos<<1|1)
const int ADD = 25555;
const int maxn = 80005;
int n,w,h,cnt;
struct Seg...
分类:
其他好文 时间:
2015-04-26 01:21:05
阅读次数:
136
#include
using namespace std;
//输入一个已经按升序排序过的数组和一个数字,
//在数组中查找两个数,使得它们的和正好是输入的那个数字。
//要求时间复杂度是O(n)。如果有多对数字的和等于输入的数字,输出任意一对即可。
//例如输入数组1、2、4、7、11、15和数字15。由于4+11=15,因此输出4和11。
void Grial(int a[],int x,i...
分类:
编程语言 时间:
2015-04-26 00:04:17
阅读次数:
273
在.net中导出数据到Excel其中使用的比较多的是NPOI类库,但是NPOI版本存在比较多,并且改变较大,官方提供的代码不太完备,所以在这里简单记录一下。
一、使用的类库包:
using NPOI.SS.UserModel;
using NPOI.HSSF.UserModel;
二、创建工作表(3个)
HSSFWorkbook hssfworkbook = new HSSFW...
分类:
其他好文 时间:
2015-04-26 00:02:37
阅读次数:
181
//引用复习
#include
using namespace std;
void show1()
{
cout
}
void show2()
{
cout
}
void show3()
{
cout
}
int main()
{
int one = 1;
int &r1(one); //左值...
分类:
编程语言 时间:
2015-04-25 22:50:54
阅读次数:
204