码迷,mamicode.com
首页 >  
搜索关键字:return    ( 60766个结果
数组和指针问题
1.........考虑一下 代码 输出什么 ? void?func(int?arg[10]) { cout?<<?sizeof?(arg)<<endl; } int?main() { int?arg[10]; func(arg); cout?<<?sizeof?arg<<endl; system("pause"); return...
分类:编程语言   时间:2015-06-20 17:13:15    阅读次数:110
【算法】7 一张图体会栈和队列
所谓“一图胜千言”,不知道我这张图能够胜几句话呢?...
分类:编程语言   时间:2015-06-20 17:09:36    阅读次数:133
PHP数组与对象之间用递归转换
一些简单的对象与数组的相互转换的问题,采用递归写了两个方法如下?12345678functionarrayToObject($e){if(gettype($e)!='array')return;foreach($eas$k=>$v){if(gettype($v)=='array'||getType(...
分类:编程语言   时间:2015-06-20 17:04:06    阅读次数:131
Pascal's Triangle
Description:GivennumRows, generate the firstnumRowsof Pascal's triangle.For example, givennumRows= 5,Return[ [1], [1,1], [1,2,1], [1,3,3,1],...
分类:其他好文   时间:2015-06-20 17:01:48    阅读次数:99
Pascal's Triangle II
Description:Given an indexk, return thekthrow of the Pascal's triangle.For example, givenk= 3,Return[1,3,3,1].Note:Could you optimize your algorithm t...
分类:其他好文   时间:2015-06-20 16:56:15    阅读次数:113
Binary Tree Level Order Traversal II
Description:Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to r...
分类:其他好文   时间:2015-06-20 15:33:52    阅读次数:99
UVa401 Palindromes
#include #include char mirror(char c){ static const char m[] = "A 3 HIL JM O 2TUVWXY51SE Z 8 "; if ('A' <= c && c <= 'Z') return m[c-'A']; else retu.....
分类:其他好文   时间:2015-06-20 14:18:19    阅读次数:111
SGU 246. Black & White(数论)
题意: 有2*n-1个黑色和白色的珠子组成的环形项链,求至少需要多少颗黑色珠子才能使任意排列的项链中都存在两个黑珠间有n个珠子. (2*n-1using namespace std;int n, ans, d;int gcd( int a, int b ){ return b == 0 ...
分类:其他好文   时间:2015-06-20 13:05:33    阅读次数:113
poj3086---数论
#include #include int T(int n){ int sum=0,i; for(i=1;i<=n;i++) { sum+=i; } return sum;}int main(){ int n,tmp,k,cout=0; sca...
分类:其他好文   时间:2015-06-20 13:03:39    阅读次数:113
UVa272 TEX Quotes
#include int main(){ int c, q = 1; while ((c = getchar()) != EOF) { if (c == '"') { printf(q ? "``" : "''"); q ^= 1; } else putchar(c); } return 0;}
分类:其他好文   时间:2015-06-20 13:01:11    阅读次数:110
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!