问题及代码:
Problem Description
How far can you make a stack of cards overhang a table? If you have one card, you can create a maximum overhang of half a card length. (We're assuming that the cards must ...
分类:
其他好文 时间:
2015-02-15 13:33:05
阅读次数:
205
问题及代码:
Problem Description
Fred Mapper is considering purchasing some land in Louisiana to build his house on. In the process of investigating the land, he learned that the state of Louisiana is...
分类:
其他好文 时间:
2015-02-15 12:13:22
阅读次数:
259
Problem Description
HDU ACM集训队的队员在暑假集训时经常要讨论自己在做题中遇到的问题.每当面临自己解决不了的问题时,他们就会围坐在一张圆形的桌子旁进行交流,经过大家的讨论后一般没有解决不了的问题,这也只有HDU ACM集训队特有的圆桌会议,有一天你也可以进来体会一下哦:),在一天在讨论的时候,Eddy想出了一个极为古怪的想法,如果他们在每一分钟内,一对相邻的两个ACM队...
分类:
其他好文 时间:
2015-02-15 10:48:09
阅读次数:
173
链表关系好混乱
/*
*Copyright (c)2014,烟台大学计算机与控制工程学院
*All rights reserved.
*文件名称:猴子选大王.cpp
*作 者:冷基栋
*完成日期:2015年2月12日
*版 本 号:v1.0
*
*问题描述:一群猴子,编号是1,2,3 ...m,这群猴子(m个)按照1-m的顺序围坐一圈。从第1只开始数,每数到第n个,该猴子就要离开此圈,这样...
分类:
其他好文 时间:
2015-02-12 22:52:07
阅读次数:
230
Font Size: ← →
Problem Description
A number sequence is defined as follows:
f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.
Given A, B, and n, you are to calculate the value of...
分类:
其他好文 时间:
2015-02-12 22:50:53
阅读次数:
178
Problem Description
As a unicorn, the ability of using magic is the distinguishing feature among other kind of pony. Being familiar with composition and decomposition is the fundamental course ...
分类:
移动开发 时间:
2015-02-06 21:52:01
阅读次数:
226
Problem Description
A snail is at the bottom of a 6-foot well and wants to climb to the top. The snail can climb 3 feet while the sun is up, but slides down 1 foot at night while sleeping. The snail ...
分类:
其他好文 时间:
2015-02-06 21:51:59
阅读次数:
272
Problem Description
The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 1...
分类:
其他好文 时间:
2015-02-06 21:51:26
阅读次数:
238
??
(2)编写函数void search(int x),输出链表中是否有值为x的结点。
#include
using namespace std;
struct Node
{
int data; //结点的数据
struct Node *next; //指向下一结点
};
Node *head=NULL; //将链表头定义为全局变量,以便于后...
分类:
其他好文 时间:
2015-01-21 16:41:04
阅读次数:
125
??
(3)编写函数delete_first_node(),删除链表中的第一个结点。
#include
using namespace std;
struct Node
{
int data; //结点的数据
struct Node *next; //指向下一结点
};
Node *head=NULL; //将链表头定义为全局变量,以便于后面操...
分类:
其他好文 时间:
2015-01-21 16:40:04
阅读次数:
158