MySQL源码自定义了hash表,因为hash表具有O(1)的查询效率,所以,源码中大量使用了hash结构。下面就来看下hash表的定义:【源代码文件include/hash.h
mysys/hash.c】typedef uint my_hash_value_type;typedef uchar *...
分类:
数据库 时间:
2014-05-09 10:50:26
阅读次数:
485
昨天看到博客园有个面试者笔试出现此题,昨天大概给出思路,今天经过思考将实现,并做出优化改进
,逻辑易懂,基本都可以看懂,经过初步测试正确。代码如下: 1 // MindryBuffer.cpp : 定义控制台应用程序的入口点。 2 // 3 4
#include "stdafx.h" 5...
分类:
编程语言 时间:
2014-05-09 04:01:06
阅读次数:
399
过程式析构:测试案例:test.cpp#include using namespace
std;class Test{public: Test(int dt=0){data=dt;} ~Test(){coutusing namespace
std;class Test{public: Test...
分类:
编程语言 时间:
2014-05-09 03:52:15
阅读次数:
374
2951:浮点数求高精度幂总时间限制:1000ms内存限制:65536kB描述有一个实数 R (
0.0 4 #include 5 #define SIZE 126 6 #define LEN 5 7 8 int a[SIZE],b[LEN]; 9 10
int mul( int alen,i...
分类:
其他好文 时间:
2014-05-09 03:28:02
阅读次数:
379
题目链接题意 : 求n的n次方的个位数是多少。思路 :
自己写一下看一下规律,会发现0,1,5,6的个位数怎么乘都是原来这个数,剩下的数也还是有规律。 1 #include 2 #include 3 #include
4 5 using namespace std ; 6 7 int a[...
分类:
Web程序 时间:
2014-05-09 03:13:46
阅读次数:
341
1.“属性页->配置属性->c/c++->常规->附加包含目录”中添加“$(AMDAPPSDKROOT)\include”2.“属性页->配置属性->链接器->常规->附加库目录“下添加:
$(AMDAPPSDKROOT)\lib\x86 或者:D:\NVIDIA\NVIDIA GPU Compu....
分类:
其他好文 时间:
2014-05-09 02:58:44
阅读次数:
394
这题wa了很多词,题目本身很简单,把a/b搞反了,半天才检查出来。 1 #include 2
#include 3 #include 4 5 char isPrime[100001]; 6 7 int main() { 8 int i, j, q, p,
maxi, maxj, m...
分类:
其他好文 时间:
2014-05-08 23:55:19
阅读次数:
515
#include#include#include#includeusing namespace
std;const int M=1000;int main(){ string china; int
a[M]={-1},b[M]={-1},i,indexa,indexb,len,m; ...
分类:
其他好文 时间:
2014-05-08 23:27:02
阅读次数:
540
#include using namespace std;void CountSort(int*
a,int k,int n){ int s = 1; for(int i=0;i=0;i--){ tmp1 = a[i]; tmp2 = a[i] % s;
...
分类:
其他好文 时间:
2014-05-08 22:42:33
阅读次数:
382
#include "stdafx.h"#include #include using
namespace std;HANDLE hMutex;DWORD WINAPI Fun(LPVOID lp){ while(1){
WaitForSingleObject(hMutex,INFINITE); .....
分类:
编程语言 时间:
2014-05-08 22:41:35
阅读次数:
406