码迷,mamicode.com
首页 >  
搜索关键字:for loop    ( 3149个结果
搬山游戏
问题;          设有n座山,计算机与人作为比赛双方,轮流搬山,规定每次搬山数不超过k,谁搬最后一座山谁输。 #include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int arg...
分类:其他好文   时间:2015-04-03 21:07:16    阅读次数:153
歌德巴赫猜想
/* 2000以内的不小于4的正偶数都能分解成两个素数之和(验证这个猜想的正确性) */ #include #include #include int prime(int m); /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int...
分类:其他好文   时间:2015-04-01 23:53:01    阅读次数:177
要发就发
#include #include #include #define NUM 320 int number[NUM]; int prime(int m); /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc,...
分类:其他好文   时间:2015-04-01 23:51:44    阅读次数:143
两个数的最小公倍数
问题:          求两个数的最小公倍数 #include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv[]) { int m, n, b; i...
分类:其他好文   时间:2015-04-01 00:29:41    阅读次数:180
将真数分解为埃及分数
问题:          输入一个分数,将该分数分解为埃及分数。          真分数:分子小于分母的分数          埃及分数:分子为一的分数 #include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop...
分类:其他好文   时间:2015-04-01 00:29:02    阅读次数:127
两个数的最大公约数
问题:           求两个数的最大公约数。 //最大公约数 #include #include /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv[]) { int ...
分类:其他好文   时间:2015-04-01 00:28:51    阅读次数:119
oracle存储过程之immediate
CREATE or REPLACE PROCEDURE UPDATEUSERDATA Authid Current_User is    delsql   varchar2(400);       BEGIN          FOR T IN ( SELECT * FROM ORACLEUSER) LOOP           BEGIN            delsql := ...
分类:数据库   时间:2015-03-31 20:09:29    阅读次数:201
2015.03.30 LeetCode Merge Intervals 解题记录
今天下午做了一道题。leetcode merge intervals 属于比较难的题目。 首先用collections.sort 给list排序,然后用两个while loop来比较两个interval 的start, end 。 从而生成新的interal,再插入到新的list 返回结果。 下面给出自己的代码: /* 50 Merge Intervals https://leetcode.com/problems/merge-intervals/ Given a collection o...
分类:其他好文   时间:2015-03-31 14:47:07    阅读次数:130
oracle多表连接方式Hash Join Nested Loop Join Merge Join
在查看sql执行计划时,我们会发现表的连接方式有多种,本文对表的连接方式进行介绍以便更好看懂执行计划和理解sql执行原理。一、连接方式: 嵌套循环(NestedLoops (NL)) (散列)哈希连接(Hash Join (HJ)) (归并)排序合并连接(Sort Merge Join (SM...
分类:数据库   时间:2015-03-30 16:11:36    阅读次数:146
EventBus的使用
EventBus使用在介绍EventBus之前先捋顺以下Android自带的应用内通信方式有哪些?Android 应用内常用通信方式1.使用handler进行线程间通信handler是和Thread绑定的,主线程中创建Hander直接通过new Handler() 来创建即可。自定义线程中则还需要调用Looper.prepare Looper.loop来让Handler起作用,这里就不详细讲解原理及...
分类:其他好文   时间:2015-03-29 19:36:42    阅读次数:247
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!