void CWriteWnd::OpenFileDialog(){ OPENFILENAME ofn; TCHAR szFile[MAX_PATH] = _T(""); ZeroMemory(&ofn, sizeof(ofn)); ofn.lStructSize = sizeof(ofn); o.....
1 #include 2 #include 3 using namespace std; 4 int main(){ 5 string s; 6 int i,sum; 7 getline(cin,s); 8 for(i=0;i='0')10 ...
分类:
其他好文 时间:
2014-07-06 23:41:23
阅读次数:
279
1 #include 2 using namespace std; 3 int main(){ 4 int i,n,a[1000],c[10]={0},max=0; 5 cin>>n; 6 for(i=0;i>a[i]; 8 for(i=0;i<n;++i) 9 ...
分类:
其他好文 时间:
2014-07-05 18:40:55
阅读次数:
244
建立一个有向图的邻接表,首先要构思好它的邻接表里面包含哪些结构数据,然后根据哪些数据来建立相应的结构体。但也要注意数据的输入。#include #include #define MAX_SIZE 10typedef struct ArcNode //弧节点结构体{ ...
分类:
其他好文 时间:
2014-07-05 11:14:30
阅读次数:
177
1、sum over用法
sum(col1) over(partition by col2 order by col3 )
以上的函数可以理解为:按col2 进行分组(partition ),每组以col3 进行排序(order),并进行连续加总(sum)
表a,内容如下:
B C D
02 02 1
02 03 2
02 04 3
02 05...
分类:
其他好文 时间:
2014-07-04 07:09:15
阅读次数:
503
问题:证明\[\sum_{k=1}^{n}\frac{1}{k}\notin\mathbb N,\forall n\geq2.\]证明 首先根据Chebyshev定理,在$(\frac{n}{2},n]$上必存在素数$p$,那么显然$p\mid n!$且\[p\mid\frac{n!}{k},k=....
分类:
其他好文 时间:
2014-07-03 23:41:26
阅读次数:
370
1 #include 2 #include 3 using namespace std; 4 int main(){ 5 string s; 6 int i,sum=0; 7 bool flag=false,f=false; 8 getline(cin,s); 9 ...
分类:
其他好文 时间:
2014-07-03 23:32:12
阅读次数:
304
1:参数传递的值传递与引用传递
A:值传递:基本数据类型传递都是值传递
B:引用传递(地址传递):对象数据类型都是引用传递。
2:类变量与成员变量(实例变量,对象变量)
类变量:通过类名调用,类变量被所有的实例共享。
final static int MAX = 20;
//Java中定义常量
对象变量:通过对象调用(对...
分类:
其他好文 时间:
2014-07-03 13:43:42
阅读次数:
159
拖了好久才写的。
【BZOJ2821】接触分块大法。这道题略有点新颖。首先我们先分块,然后统计每块中每个数出现的个数。
下面是联立各个方块,预处理出第I个方块到第J个方块出现正偶数次数的个数。
for (i=1;i<=s;i++)
{
for (j=i;j<=s;j++)
{
sum[i][j]=sum[i][j-1];
for (k=a[j].l...
分类:
其他好文 时间:
2014-07-03 13:38:35
阅读次数:
160
Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.
分类:
其他好文 时间:
2014-07-03 13:02:23
阅读次数:
200