码迷,mamicode.com
首页 >  
搜索关键字:c++ memset    ( 3691个结果
HDU 2098
水,用来熟悉内容#include #include #include #include #include using namespace std;const int Max=10050;bool prime[Max+10];int main(){ memset(prime,true,sizeof(p...
分类:其他好文   时间:2014-08-27 21:50:58    阅读次数:162
codeforces 367B
题目代码到是不难但是很难想通题目的解决方法。#includeusing namespace std;int person[110];int main(){ int n,m; while(cin>>n>>m) { memset(person,0,sizeof(perso...
分类:其他好文   时间:2014-08-27 14:41:57    阅读次数:199
计数排序
#include#include#includevoid CountingSort(int *A,int len,int k){ int *B = new int[len]; //输出数组 memset(B,0,len*sizeof(int)); int *C = new int[...
分类:其他好文   时间:2014-08-26 21:10:36    阅读次数:178
tarjan
hdu1269 迷宫城堡http://acm.hdu.edu.cn/showproblem.php?pid=1269模板。 1 #include 2 #include 3 #include 4 #define mt(a,b) memset(a,b,sizeof(a)) 5 using namespa...
分类:其他好文   时间:2014-08-26 15:23:26    阅读次数:212
LeetCode--Permutation Sequence
1 class Solution { 2 public: 3 string getPermutation(int n, int k) { 4 int fac[10]; 5 bool vis[10]; 6 memset(vis, 0, size...
分类:其他好文   时间:2014-08-25 14:50:34    阅读次数:137
关于memset() 函数的使用
第一次接触了memset() 函数。 感觉的确是一个...
分类:其他好文   时间:2014-08-24 11:45:22    阅读次数:248
无锁内存缓冲池
/* 无锁内存缓冲池 其特点如下: 池内存的申请和释放不会使用锁,只会用到微耗的interlockedincrement和interlockeddecrement函数 池内存总大小和池内内存块的大小是固定长度的,通过构造函数的参数指定; 分配出来的池内存是经过memset确认的物理内存; 池大小是固定的,若池中空闲内存不足以提供所需,则池内存分配函数利用malloc...
分类:其他好文   时间:2014-08-23 16:52:03    阅读次数:344
hdu 2795 Billboard
#include#include#include#include#include#include#include#define mem(a,b) memset(a,b,sizeof(a))#define ll __int64#define MAXN 1000#define INF 0x7ffffff...
分类:其他好文   时间:2014-08-23 01:01:59    阅读次数:231
UVa 10066 Twin Towers (DP 最长公共子序列)
题意  求两串数字最长公共子序列的长度 裸的lcs没啥说的 #include #include #include using namespace std; const int maxn=105; int a[maxn],b[maxn],d[maxn][maxn],na,nb; void lcs() { memset(d,0,sizeof(d)); ...
分类:Windows程序   时间:2014-08-22 16:20:39    阅读次数:312
hdu 4975最大流与4888类似但是有很吊的优化最大流
//来自潘神的优化 #include #include #include using namespace std; #define inf 0x3fffffff #define N 1100 struct node { int u,v,w,next; }bian[N*N*4]; int head[N],yong,dis[N],work[N]; void init(){ yong=0; memset...
分类:其他好文   时间:2014-08-21 21:13:14    阅读次数:238
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!