poj1003】的更多相关文章

[POJ1003]Hangover 试题描述 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 assuming that the cards must be perpendicular to the table.) With two cards you can m…
这两题比较简单,就不做分析了,描述下题目,就上代码吧. [题目描述] 1003,其实就是求这个方程的最小n:1/2 + 1/3 + 1/4 + ... + 1/(n + 1) >= c: 1004,其实就是算个平均数,直接除12 [附:完整代码] 1003题: /* POJ-1003 Hangover */ #include <iostream> using namespace std; int main() { double c; while(cin>>c) { if (c…
Hangover Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 121079   Accepted: 59223 Description 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 a…
这题很有内涵,先用简单方法 public static void acm1003(double a) { ) { return; } ; ) { / b; a = a - c; b++; } Console.WriteLine(b - + " card(s)"); }…
题目大意:超越悬挂 你可以把卡片最远堆到距离桌子多远?如果你有一张卡片,你可以堆卡片长度的一半如果有两张卡片那么可以堆1/2+1/3=5/6,如果有n张卡片那么可以堆1/2+1/3+1/4+.....1/n+1/(n+1),最上面的可以漏出来1/2,依次往下,最下面的可以漏出来1/(n+1),如下图所示   下面给一个长度问最少多少张卡片才可以超过这个长度 easy 了,直接模拟吧 #include<stdio.h> ; i<maxn; i++)         a[i]= a[i-]+…
直接用库函数二分即可. #include <iostream> #include <cstring> #include <cstdlib> #include <cstdio> #include <cmath> #include <cctype> #include <algorithm> #include <numeric> #define eps 1e-8 using namespace std; ]; int…
Hangover   Description 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 assuming that the cards must be perpendicular to the table.) With two cards you can m…
ACM训练计划建议 From:freecode#  Date:2015/5/20 前言: 老师要我们整理一份训练计划给下一届的学弟学妹们,整理出来了,费了不少笔墨,就也将它放到博客园上供大家参考. 菜鸟之作,大牛勿喷,如有不当或补充之处,欢迎指出. 本建议书分为三个阶段,大一.大二.大三.大四暂没整理,一方面是大四要面临考验和找工作的问题,坚持继续acm的很少,另一方面,本人还没大四…… 下面以个人经验分析一下这三个阶段建议学习的内容和具体的训练计划. 正文: 大一(第一阶段): 大一是时间最充…
题目 完成情况 poj1000:A+B problem 完成 poj1002:电话上按键对应着数字.现在给n个电话,求排序.相同的归一类 完成 poj1003:求最小的n让1+1/2+1/3+...+1/n大于给的一个实数 完成 poj1004:求一堆实数的平均数 完成 poj1005:由坐标 (0,0) 开始,以半圆为形状每年侵蚀50m^2,问(0,0)开始到(x,y)结束需要多长时间 完成 poj1006:三个周期是常数.现在给三个周期出现高峰的时候,问下一次出现高峰是什么时候 中国剩余定理…
转载请注明出处:優YoU http://blog.csdn.net/lyy289065406/article/details/6642573 最近AC题:2528   更新时间:2011.09.22  已AC题数:146 初级题已在2011.06.30全部完成 部分解题报告添加新内容,除了原有的“大致题意”和“解题思路”外, 新增“Source修正”,因为原Source较模糊,这是为了帮助某些狂WA的同学找到测试数据库,但是我不希望大家利用测试数据打表刷题 PS:部分题目的评论中也有给出了测试数…