上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页
摘要: 题目描述 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 ass 阅读全文
posted @ 2018-07-19 16:50 RhythmLian 阅读(98) 评论(0) 推荐(0)
摘要: 题目描述 Problems involving the computation of exact values of very large magnitude and precision are common. For example, the computation of the national 阅读全文
posted @ 2018-07-19 16:43 RhythmLian 阅读(140) 评论(0) 推荐(0)
摘要: 题目描述 给定一个非负整数数组,假定你的初始位置为数组第一个下标。 数组中的每个元素代表你在那个位置能够跳跃的最大长度。 请确认你是否能够跳跃到数组的最后一个下标。 例如:$A = [2,3,1,1,4]$ 能够跳跃到最后一个下标,输出true; $A = [3,2,1,0,4]$ 不能跳跃到最后一 阅读全文
posted @ 2018-07-19 16:34 RhythmLian 阅读(476) 评论(0) 推荐(0)
摘要: 题目描述 输入一个长度为n的整数序列,从中找出一段不超过m的连续子序列,使得整个序列的和最大。例如 1,-3,5,1,-2,3当m=4时,S=5+1-2+3=7当m=2或m=3时,S=5+1=6 输入 第一行两个数n,m(n,m<=300000)第二行有n个数,要求在n个数找到最大子序和 输出 一个 阅读全文
posted @ 2018-07-19 16:07 RhythmLian 阅读(296) 评论(0) 推荐(0)
摘要: 题目描述 Snuke loves constructing integer sequences.There are N piles of stones, numbered 1 through N. The pile numbered i consists of ai stones.Snuke wil 阅读全文
posted @ 2018-07-19 01:54 RhythmLian 阅读(320) 评论(0) 推荐(0)
摘要: 题目描述 经过了几周的辛苦工作,贝茜终于迎来了一个假期.作为奶牛群中最会社交的牛,她希望去拜访N(1<=N<=50000)个朋友.这些朋友被标号为1..N.这些奶牛有一个不同寻常的交通系统,里面有N-1条路,每条路连接了一对编号为C1和C2的奶牛(1 <= C1 <= N; 1 <= C2 <= N 阅读全文
posted @ 2018-07-19 01:28 RhythmLian 阅读(155) 评论(0) 推荐(0)
摘要: 题目描述 贝西从大牛那里收到了N块巧克力。她不想把它们马上吃完,而是打算制定一个计划, 使得在接下来的D天里,她能够尽量地快乐。贝西的快乐指数可以用一个整数来衡量,一开始的时候是0,当她每天晚上睡觉的时候,快乐指数会减半(奇数时向下取整)。贝西把她的巧克力按照收到的时间排序,并坚持按照这个顺序来吃巧 阅读全文
posted @ 2018-07-19 00:49 RhythmLian 阅读(286) 评论(0) 推荐(0)
摘要: 题目描述 贝西和其他奶牛们都喜欢巧克力,所以约翰准备买一些送给她们。奶牛巧克力专卖店里 有N种巧克力,每种巧克力的数量都是无限多的。每头奶牛只喜欢一种巧克力,调查显示, 有Ci头奶牛喜欢第i种巧克力,这种巧克力的售价是P。 约翰手上有B元预算,怎样用这些钱让尽量多的奶牛高兴呢?下面举个例子:假设约翰 阅读全文
posted @ 2018-07-19 00:29 RhythmLian 阅读(353) 评论(0) 推荐(0)
摘要: 题目描述 Given two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(ab) is an integer.This problem 阅读全文
posted @ 2018-07-18 23:53 RhythmLian 阅读(137) 评论(0) 推荐(0)
摘要: 题目描述 A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two ad 阅读全文
posted @ 2018-07-18 21:02 RhythmLian 阅读(164) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页