Description Inhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised
转载 2018-06-02 00:08:00
90阅读
Problem DescriptionInhabitants ofthe Wonderland have decided to hold a regional programming contest.The Judging Committee has volunteered and has p...
转载 2016-03-28 23:07:00
120阅读
2评论
Cable master Problem Description Inhabitants of
原创 2023-04-21 10:42:37
53阅读
题目:输入N=4K=11L = {8.02, 7.43, 4.57, 5.39}输出2.00题变成了求满足C(x)条件的最大的x。在区间初...
原创 2023-06-27 10:23:51
80阅读
题意n根电缆,分k段,k段相同,让分的段尽可能大理想状态下最
原创 2022-09-19 09:59:29
39阅读
Problem DescriptionInhabitants ofthe Wonderland have decided to hold a regional programming contest.The Judging Committee has volunteered and has p...
转载 2016-03-28 23:07:00
113阅读
2评论
简单,二分法,可是在oj上交的时候会有精度的限制,所以仅仅能把数扩得大一点,并且在扩的时候为防止尾
转载 2014-10-11 10:26:00
56阅读
2评论
题解:很显然的二分检索,在算法艺术上看过原题,不过这里要注意精度:#include int n,m; double a[10001]; bool test(double x){ int num=0,i; for(i=1;i=m){ return true; }else{ return false; } } int main(){ while(scanf("%d%d",&n,&m),n||m){ int i ; double sum=0; ...
转载 2014-02-09 08:30:00
60阅读
2评论
题意:给出n条线段,以米的单位给出,小数点后两位(精确到厘米),要你对这些线段裁剪,裁剪出m条等长的线段,并且让这些线段尽可能长另外线段的长度不能小于1厘米,如果筹不够m条,输出0.00 #include#include#include#include#includeusing namespace std;const int maxn=10010;double num[maxn];doub...
转载 2014-03-18 15:46:00
131阅读
2评论
题目链接:点击打开链接 有n段绳子,给定n段绳子的长度,单位为厘米。求能够把这些绳子分成k段的最长的段的长度。题目中的trick是最小是1cm,长度不能小于1cm,因此要转换成int来解,然后二分可以截得的绳子的长度。 #include #include #include using namespace std;#define INF 100000000int l[10009];int n, k;bool C(int len){ if (len == 0) return false; int sum = 0; for (int i=0; i= k) return true; return fa
转载 2013-08-22 18:41:00
116阅读
2评论
Cable master POJ - 1064 题目大意: 有N条绳子,它们的长度分别为Li。如果从他们中切割出K条长度相同的绳子的话,这K条绳子每条最长能有多长?答案保留到小数点后2位 二分答案: 可以认为是最大化最小值,答案范围左右边界分别为0和最长绳子的长度 不知道为什么在check(mid)
转载 2017-06-18 15:15:00
69阅读
题目链接https://vjudge.net/problem/POJ-1064当然我是在Virtual Judge上面写的,可以直接去POJ去提交。这个题目感觉并不是很困难的样子,主要就是一个二分的思想,之前写的时候,主要是结尾判断的时候,没有向下取整,直接四舍五入的,导致一直提交失败,甚至写了不只一个版本的代码。下面,我随便给出两个版本的结果,都能过。#include <iostream>#include <cstdio>#include <cmath>
原创 2021-08-28 17:23:58
255阅读
Problem Description Inhabitants of the
原创 2023-02-02 11:09:43
82阅读
Cable masterTime Limit:1000MS
原创
VII
2023-05-26 15:00:34
39阅读
Cable masterTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (
原创 2023-04-23 21:43:02
329阅读
Cable masterTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2473Accepted Submission(s): 922Problem...
转载 2015-07-30 16:19:00
83阅读
2评论
Inhabitants of the
原创 2023-02-20 00:52:25
76阅读
problemsolutioncodes#include<cstdio>#include<algorithm>#include<cmath>using namespace std;int n, k;double a[10000];bool C(double x){ int sum = 0; for(int i ...
原创 2023-02-08 12:00:44
151阅读
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6195Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Connecting the display screen and signal sourc...
原创 2021-07-14 10:42:04
135阅读
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6195Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Problem Description Connecting the display screen and signal sourc...
原创 2022-02-03 15:04:05
22阅读
  • 1
  • 2
  • 3
  • 4
  • 5