码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
leetcode Longest Common Prefix
如果字符串数组只有一个,那么最长前缀就是它本身;如果有多个,我们把第一个设为当前最长前缀,拿当前最长前缀去和第二个比较,再选出最长前缀,一次往后即可!代码:#include#include#includeusing namespace std;string longestCommonPrefix(v...
分类:其他好文   时间:2015-04-11 16:09:23    阅读次数:131
hdu1730Northcott Game NIM博弈
//必胜局面是所有的黑子和白子都相邻, //本题想要达到黑子和白子之间都相邻,即走完它们之间的所有空格 //就相当于一个NIM博弈 #include #include #include using namespace std ; int main() {    // freopen("in.txt","r",stdin) ;     int n , m ;     int t...
分类:其他好文   时间:2015-04-11 14:54:50    阅读次数:111
hdu4764 Stone 巴什博弈
//先到n-1的赢 #include #include #include using namespace std ; int main() {     int n , k;     while(scanf("%d%d",&n,&k)  , n+k)     {         if((n-1)%(k+1) == 0) printf("Jiang\n") ;         e...
分类:其他好文   时间:2015-04-11 14:52:57    阅读次数:114
visual studio2010 “类视图”和“对象浏览器”图标
“类视图”和“对象浏览器”显示一些图标,这些图标表示代码实体,例如命名空间、类、函数和变量。下表以图文并茂的形式说明了这些图标。图标说明图标说明namespace方法或函数类运算符接口Property结构字段或变量UnioneventEnum常量TypeDef枚举项模块映射项内部外部声明delega...
分类:其他好文   时间:2015-04-11 14:37:55    阅读次数:122
POJ3468---线段树模版--A Simple Problem with Integers
#include #include #include #define ll __int64 #define M 100007 using namespace std; struct node { ll l,r,mid,val,mark; }tree[M<<2]; ll s[M]; void build(ll left,ll right,ll i)//建树 { tree[i].l=l...
分类:其他好文   时间:2015-04-11 11:51:42    阅读次数:147
C++ 虚函数表解析(转)——转自陈皓
http://blog.csdn.net/haoelC++ 虚函数表解析 - 陈皓专栏 【空谷幽兰,心如皓月】 - 博客频道 - CSDN.NEThttp://blog.csdn.net/haoel/article/details/1948051/#includeusing namespace st...
分类:编程语言   时间:2015-04-11 11:46:42    阅读次数:136
二位数组与指针
#include#includeusing namespace std;void disparry(int a[2][3]){printf("\n%d,%d,%d",a[0][0],a[0][1],a[0][2]);}int main(void){ int arr[2][3]={{2,3,1...
分类:编程语言   时间:2015-04-11 10:16:17    阅读次数:142
[转帖]c++ 面试整理
1. 继承方式public 父类的访问级别不变protected 父类的public成员在派生类编程protected,其余的不变private 父类的所有成员变成private#include using namespace std;class base{ public: ...
分类:编程语言   时间:2015-04-11 10:11:58    阅读次数:133
ZOJ 3776 Pokemon Master
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5263 题意:     比较Calem和Serena手上牌的总和的大小,谁大就输出谁的名字,相同输出Draw。 代码: #include using namespace std; int main() { int t,n,m,sum1,sum2,tmp; c...
分类:其他好文   时间:2015-04-11 09:03:39    阅读次数:106
C++刷题二
(一) 有一分数序列: 2/1 3/2 5/3 8/5 13/8 21/13...... 求出这个数列的前N项之和,保留两位小数。 #include #include using namespace std; int main() { int i,N; double m=2.0,n=1.0,s,sum=0; cin>>N; for(i=0;i<N;i++) ...
分类:编程语言   时间:2015-04-11 09:00:12    阅读次数:159
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!