码迷,mamicode.com
首页 >  
搜索关键字:while break continue    ( 40024个结果
输入输出外挂
int Scan() { int res=0,ch,flag=0; if((ch=getchar())=='-') flag=1; else if(ch>='0'&&ch'9') res=ch-'0'; while((ch=getchar())>='0'&&ch'9') res...
分类:其他好文   时间:2014-07-28 00:11:59    阅读次数:245
ffmpeg在android上输出滑屏问题处理
ffmpeg部分机器上有花屏的问题 原代码如下: while(av_read_frame(formatCtx, &packet)>=0 && !_stop && NULL!=window && bInit) { // Is this a packet from the video stream? if(packet.stream_index==videoStream) { ...
分类:移动开发   时间:2014-07-28 00:01:10    阅读次数:847
UVA 10608
并查集简单题#include #include using namespace std;#define max 30010int f[max];int getf(int k){ while(k!=f[k]){ k=f[k]; } return k;}void combine(int a,int b)...
分类:其他好文   时间:2014-07-27 23:31:09    阅读次数:193
HDU 1213
第一题并查集纪念#include using namespace std;int f[1010];int getf(int k){ while(k!=f[k]){ k=f[k]; } return k;}void combine(int a,int b){ in...
分类:其他好文   时间:2014-07-27 23:22:39    阅读次数:212
CodeForces 16E
状态压缩 动态规划DP[111.....1]=1表示所有鱼都在的几率为10代表已经挂了的,1代表没挂;#include "stdio.h"#define max 10;i--){ int bit=bitcount(i); if(bit==1)continue; double p=2*dp[i]...
分类:其他好文   时间:2014-07-27 23:19:49    阅读次数:316
sphinx的配置
## Sphinx configuration file sample## WARNING! While this sample file mentions all available options,# it contains (very) short helper descriptions on...
分类:其他好文   时间:2014-07-27 22:46:29    阅读次数:476
公约数和公倍数
#include#includeint main(){ int n; int a,b,r; int p,t; scanf("%d",&n); while(n--) { scanf("%d %d",&a,&b); if(a<b) { t=a; a=b...
分类:其他好文   时间:2014-07-27 22:21:19    阅读次数:186
glibc-2.19 之 strlen 实现
前几天遇到一个有意思的问题,实现strlen 不考虑线程安全:下面是我的实现:1 size_t strlen(const char* s)2 {3 const char* p = s;4 while (*p++);5 return p-1-s;6 }Glibc 2.19 的实...
分类:其他好文   时间:2014-07-27 22:00:49    阅读次数:274
string 对象析构的问题
情景:程序加载dll,dll中的函数调用另一个dll中的导出函数.stringgetName(){stringname="";regmatch(text,&name);returnname;}do{stringm_name=getName();}while(0);当m_name析构的时候,发生异常分析其中的原因,应该是name的内存不够,为了保存name的结果,在regmatch函..
分类:其他好文   时间:2014-07-27 14:20:56    阅读次数:218
string 对象析构的问题
情景:程序加载dll,dll中的函数调用另一个dll中的导出函数.stringgetName(){stringname="";regmatch(text,&name);returnname;}do{stringm_name=getName();}while(0);当m_name析构的时候,发生异常分析其中的原因,应该是name的内存不够,为了保存name的结果,在regmatch函..
分类:其他好文   时间:2014-07-27 14:20:49    阅读次数:276
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!