摘要: 题目链接 Description N cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associated with it : the road leng 阅读全文
posted @ 2018-10-04 20:23 永不&言弃 阅读(555) 评论(0) 推荐(0) 编辑
摘要: 题目链接描述图1是一个城堡的地形图。请你编写一个程序,计算城堡一共有多少房间,最大的房间有多大。城堡被分割成mn(m≤50,n≤50)个方块,每个方块可以有0~4面墙。 1 2 3 4 5 6 7 ############################# 1 # | # | # | | # #####---#####--... 阅读全文
posted @ 2018-10-04 13:55 永不&言弃 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 题目链接 Problem Description 国庆期间,省城HZ刚刚举行了一场盛大的集体婚礼,为了使婚礼进行的丰富一些,司仪临时想出了有一个有意思的节目,叫做"考新郎",具体的操作是这样的:首先,给每位新娘打扮得几乎一模一样,并盖上大大的红盖头随机坐成一排;然后,让各位新郎寻找自己的新娘.每人只 阅读全文
posted @ 2018-10-04 13:18 永不&言弃 阅读(319) 评论(0) 推荐(0) 编辑
摘要: 题目链接 Problem DescriptionFibonacci numbers are well-known as follow: Now given an integer N, please find out whether N can be represented as the sum of 阅读全文
posted @ 2018-10-04 13:03 永不&言弃 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1 import java.math.BigInteger; 2 import java.util.Scanner; 3 4 public class Main { 5 6 public static void main(String[] args) { 7 int m; 8 String s; 9 阅读全文
posted @ 2018-10-04 12:50 永不&言弃 阅读(987) 评论(0) 推荐(0) 编辑
摘要: 题目链接 Problem Description Given a positive integer N, you should output the most right digit of N^N. Input The input contains several test cases. The f 阅读全文
posted @ 2018-10-04 12:35 永不&言弃 阅读(502) 评论(0) 推荐(0) 编辑
摘要: 题目链接 Description An army of ants walk on a horizontal pole of length l cm, each with a constant speed of 1 cm/s. When a walking ant reaches an end of 阅读全文
posted @ 2018-10-04 12:18 永不&言弃 阅读(327) 评论(0) 推荐(0) 编辑
摘要: 题目链接 Description A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = < x1, x2, . 阅读全文
posted @ 2018-10-04 12:04 永不&言弃 阅读(1317) 评论(0) 推荐(0) 编辑
摘要: 题目链接 Problem Description 下面是512汶川大地震部分受灾学校伤亡情况(惨痛!!)1、 四川省都江堰市 聚源中学伤亡情况:遇难学生人数(含失踪)320详细说明: 一栋教学楼被震垮,该楼18个班420多名学生被埋,截至目前仅有不到100名获救。2、 四川省绵阳市 北川县北川中学伤 阅读全文
posted @ 2018-10-04 10:30 永不&言弃 阅读(1187) 评论(0) 推荐(0) 编辑
摘要: 题目链接 Problem Description淄博某旅行社每天都要接待来自全国各地的游客,他们从各个城市来到张店区,游玩后又去淄博的其他旅游景点。从各个城市来张店的游客只是在网上报名,然后旅行社根据统计的人数,用大巴把他们从不同城市拉到张店。在张店玩一天后,这些游客又要到淄博其他景点玩,所以重新统 阅读全文
posted @ 2018-10-04 10:18 永不&言弃 阅读(407) 评论(0) 推荐(0) 编辑
摘要: 前1个数 dp(1)=1 子序列为1; 前2个数 在7前面有1小于7 dp(2) = d(1) + 1 = 2 子序列为1 7 前3个数 在3前面1比3更小dp(3) = dp(1) + 1 = 2,子序列1 3 前4个数 在5前面有1和3比5更小 dp(4) = dp(3) + 1 = 3 子序列 阅读全文
posted @ 2018-10-04 09:26 永不&言弃 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 题目链接 Problem Descriptionsdut 大学生艺术中心每天都有n个活动申请举办,但是为了举办更多的活动,必须要放弃一些活动,求出每天最多能举办多少活动。 Input输入包括多组输入,每组输入第一行为申请的活动数n(n<100),从第2行到n+1行,每行两个数,是每个活动的开始时间b 阅读全文
posted @ 2018-10-04 08:25 永不&言弃 阅读(127) 评论(0) 推荐(0) 编辑