码迷,mamicode.com
首页 >  
搜索关键字:while    ( 28479个结果
What Great .NET Developers Ought To Know (More .NET Interview Questions)
A while back, I posted a list ofASP.NET Interview Questions.Conventional wisdomwas split, with about half the folks saying I was nuts and that it was ...
分类:Web程序   时间:2014-10-20 09:54:40    阅读次数:385
常见笔试题(二)
6、用obj-c写一个冒泡排序-(void)mySort:(NSMutableArray*)mutArray { idtmpObj=nil; unsignedlongflag=mutArray.count-1;//flag:最大脚标 while(flag>0){ intk=flag; flag=0; for(intj=0;j<k;j++){ intorder=NSOrderedAscending;//或NSOrderedDescending if([[mutArray[..
分类:其他好文   时间:2014-10-20 02:19:53    阅读次数:213
SDUTOJ 2476Period
#include #include #include #define N 1000010 using namespace std; char s[N]; int next[N]; void getnext(char s[]) { int j=-1,i=0,len; next[0]=-1; len=strlen(s); while(i<=len) { if(j==-1||...
分类:其他好文   时间:2014-10-19 23:20:35    阅读次数:330
C++动态数组的实现
1 #include 2 using namespace std; 3 int main() 4 { 5 int n; 6 while(cin>>n) 7 { 8 int *p=new int[n+1]; 9 p[0]=0;10 ...
分类:编程语言   时间:2014-10-19 22:36:05    阅读次数:181
C语言 十进制转换二进制
十进制转换二进制主要采用的是连除倒取余的方法 代码如下 int num = 8; int tempArr[32]={0}; int i = 0; while (num / 2 != 1 ) { tempArr[i] = num % 2; num /=2; i++; } ...
分类:编程语言   时间:2014-10-19 22:35:48    阅读次数:195
C 实现strcmp,strcpy,strcat函数
基于C语言的strcmp,strcpy,strcat函数的实现。C语言是一个程序员的基础,一定要重视。 char* strcat ( char * dst , const char * src ) { char * cp = dst; while( *cp ) cp++; /* find end of dst */ while( *cp...
分类:其他好文   时间:2014-10-19 18:44:12    阅读次数:239
UVa 11790 - Murcia's Skyline
题目:给你一排建筑的长度和高度,求最长的上横高度和下降高度。 分析:dp,最大上升子序列。 说明:有长度,不能直接用单调队列优化。 #include #include #include using namespace std; int h[2000],w[2000],u[2000],l[2000]; int main() { int T,n; while (~scanf("%...
分类:其他好文   时间:2014-10-19 18:42:40    阅读次数:192
关于开源的RTP——jrtplib的使用
session.BeginDataAccess(); if (session.GotoFirstSource()){ do{ RTPPacket *packet; while ((packet = session.GetNextPacket()) != 0){ ...
分类:其他好文   时间:2014-10-19 17:04:28    阅读次数:1156
SDUTOJ 2772 KMP简单应用
#include #include #include #define N 10000001 using namespace std; char s[N],s1[N]; int next[N]; void getnext(char s1[]) { int j=-1,i=0,len; next[0]=-1; len=strlen(s1); while(i<len) { if(j==-1|...
分类:其他好文   时间:2014-10-19 14:22:00    阅读次数:175
关于 折半查找 while 条件 < , <=
int bin_search(int a[],int len,int key) {     int low=0; int high=len-1; while(low //体 不执行。 {  int mid=low+(high-low)/2; if(a[mid]==key) return mid; else if(a[mid] low=mid+1; else high=mi...
分类:其他好文   时间:2014-10-19 14:19:27    阅读次数:147
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!