- 博客(13)
- 资源 (5)
- 收藏
- 关注
原创 常用自写函数[更新ing]
1.求最大公约数;int gcd ( int x , int y){ return y == 0 ? x : gcd( y , x % y );}
2016-02-24 15:57:22 402
原创 A Bug's Life(削弱版食物链)
DescriptionBackground Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of t
2016-02-24 15:21:51 660
原创 The Suspects
DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best s
2016-02-24 15:17:51 309
原创 Find The Multiple
DescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than
2016-02-22 21:00:42 599 2
原创 二叉树(dfs)
样例输入:5 //下面n行每行有两个数2 3 //第i行的两个数,代表编号为i的节点所连接的两个左右儿子的编号。4 50 0 // 0 表示无0 00 0 样例输出:2 3 #include#include#define inf -1using namespace
2016-02-22 19:13:10 448
原创 Lake Counting(dfs)
DescriptionDue to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 Each square contains either water ('W') or dry land ('.')
2016-02-22 19:08:52 540
原创 经典dfs(depth-first search)
DFS主要在于参数的改变;样例输入:n=4 //给定n个数字a={1,2,4,7} //输入n个数据k=15 //目标数字样例输出:No题意:给定的数字在不重复使用的前提下能否达到目标,能输出Yes,否输出No#include#includeusing namesp
2016-02-22 19:07:13 547
原创 喝啤酒(预防老年痴呆的深度搜索)
每瓶啤酒2元,2个空酒瓶或4个瓶盖可换1瓶啤酒。10元最多可喝多少瓶啤酒?#include#includeusing namespace std;int dfs(int p, int g, int ans){ if(p < 2 && g < 4) return ans; int ret1 = 0; int ret2 = 0; if(p >= 2) r
2016-02-22 18:51:03 827
转载 C语言的位运算的优势 !
位运算加速技巧1. 如果乘上一个2的倍数数值,可以改用左移运算(Left Shift) 加速 300%x = x * 2;x = x * 64;//改为:x = x 1x = x 62. 如果除上一个 2 的倍数数值,可以改用右移运算加速 350%x = x / 2;x = x / 64;//改为:x = x >> 1;// 2 = 21
2016-02-22 15:13:51 480
原创 Oil Deposits
DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangular region of land at a time, and creates a grid
2016-02-22 14:57:48 471
原创 Catch That Cow
DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point
2016-02-22 14:55:10 469
原创 迷宫问题
迷宫问题Description定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0,};它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走或竖着走,不能斜着走,要求编程
2016-02-21 21:33:21 545
原创 Dungeon Master(逃脱大师)-BFS
Dungeon MasterDescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which may or may not be filled with rock. It tak
2016-02-21 16:49:41 769
守望先锋主题有视频资源版 java EE项目(包括mysql代码)
2018-01-13
jseclpise-1.8
2017-09-21
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人