摘要:
Description Description 有一棵有n个节点的二叉树,它的节点编号为1到n,根节点编号是1,它的每条边都有一个给定的长度。请你求出该二叉树中距离根节点最远的节点的距离。 有一棵有n个节点的二叉树,它的节点编号为1到n,根节点编号是1,它的每条边都有一个给定的长度。请你求出该二叉树 阅读全文
摘要:
The sky was brushed clean by the wind and the stars were cold in a black sky. What a wonderful night. You observed that, sometimes the stars can form 阅读全文
摘要:
John is a manager of a CPU chip factory, the factory produces lots of chips everyday. To manage large amounts of products, every processor has a seria 阅读全文
摘要:
Have you ever played the video game Minecraft? This game has been one of the world's most popular game in recent years. The world of Minecraft is made 阅读全文
摘要:
头文件#include <string> 1/赋值assign 如:string s; string, s1(“123456”); s.assign(s1);//直接赋值,将s1的字符赋给s s.assign(s1, 3, 2);//将s1中包括(下标为3的字符)在内的往后两个字符赋值给s s.as 阅读全文
摘要:
Description Description "OK, you are not too bad, em... But you can never pass the next test." feng5166 says. "I will tell you an odd number N, and th 阅读全文
摘要:
Description 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表 阅读全文
摘要:
Description Description 我们想明白递归函数到底是怎么运作的,所以想用递归来计算当给定一个正整数n(n < 16)时,求出n + (n-1)……+1的值,同时进行一些输出 要求写一个int plus1(int a)形式的函数,在进入递归函数时,输出相关信息。在调用结束返回值前, 阅读全文
摘要:
Description Description Uniform Resource Identifiers (or URIs) are strings like http://icpc.baylor.edu/icpc/, mailto:foo@bar.org, ftp://127.0.0.1/pub/ 阅读全文
摘要:
Description Description 在一个大试场里,有n行m列的考生,lg和众多同学正在考试,这时,有一部分考生作弊,当然,监考老师syc能发现他们。但是只有一个监考老师,他由于高度近视,只能发现与他同行同列的作弊者,而且由于监考老师年老体弱,在考试过程中无法移动。现在已知n*m个考生中 阅读全文