二分三分
文章平均质量分 76
u011123263
这个作者很懒,什么都没留下…
展开
-
删除元素
描述题意很简单,给一个长度为n的序列,问至少删除序列中多少个数,使得删除后的序列中的最大值最小值输入多组测试数据,每组测试数据包含两行。第一行一个整数n( n 第二行依次输入n个数a1,a2……an,(1 输出输出占一行,至少要删除数的个数。样例输入65 4 3 3 8 6样例输出1/* 解题报告: 用二分把所有元原创 2013-10-21 18:56:49 · 535 阅读 · 0 评论 -
Gamblers
A group of n gamblers decide to play a game:At the beginning of the game each of them will cover up his wager on the table and the assitant must make sure that there are no two gamblers have put t原创 2013-11-11 10:47:52 · 739 阅读 · 0 评论 -
一元三次方程求解
Problem Description有形如:ax^3+bx^2+cx+d=0这样的一个一元三次方程。给出该方程中各项的系数(a,b,c,d均为实数),并约定该方程存在三个不同实根(根的范围在-100至100之间),且根与根之差的绝对值>=1。要求由小到大依次在同一行输出这三个实根(根与根之间留有空格),并精确到小数点后2位。 提示:记方程f(x)=0,若存在2个数x1和x2,且x原创 2013-11-13 22:08:25 · 1353 阅读 · 0 评论 -
Greatest Number
DescriptionSaya likes math, because she think math can make her cleverer.One day, Kudo invited a very simple game:Given N integers, then the players choose no more than four integers from them原创 2013-12-17 19:00:58 · 720 阅读 · 0 评论 -
A New Year Gift
Problem DescriptionWindbreaker was planning to send his friends some necklaces as New Year gifts. To show sincerity ,he decided to make the necklaces all by himself. He bought some kinds of pearls原创 2014-04-17 22:02:48 · 809 阅读 · 0 评论 -
选数问题
Problem DescriptionGiven a set of N numbers, we want to select R*C numbers from it, and filled the selected numbers into a R*C matrix(R rows with C numbers in each row).We define D(i) as the diffe原创 2014-07-28 15:29:42 · 417 阅读 · 0 评论 -
星星
Problem DescriptionLucy loves stars very much. There are N (1 <= N <= 1000) stars in the sky. Assume the sky is a flat plane. All of the stars lie on it with a location (x, y), -10000 <= x, y <= 1000原创 2014-07-29 20:24:50 · 376 阅读 · 0 评论 -
复制书稿
Problem Description现在要把m本有顺序的书分给k个人复制(抄写),每一个人的抄写速度都一样,一本书不允许给两个(或以上)的人抄写,分给每一个人的书,必须是连续的,比如不能把第一、第三和第四本书给同一个人抄写。现在请你设计一种方案,使得复制时间最短。复制时间为抄写页数最多的人用去的时间。Input输入有多组数据,每组数据第1行两个整数m,k(k<=m<=500);第2行m原创 2014-07-31 17:07:56 · 678 阅读 · 0 评论