ZOJ - 3866 Cylinder Candy 【数学】】的更多相关文章

3866 - Cylinder Candy Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu Submit Status Practice ZOJ 3866 Description Edward the confectioner is making a new batch of chocolate covered candy. Each candy center is shaped as a cy…
题目链接 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3866 思路 积分 参考博客 https://blog.csdn.net/u012377575/article/details/45285895 AC代码 #include <cstdio> #include <cstring> #include <ctype.h> #include <cstdlib> #include &l…
G - Cylinder Candy Time Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu Submit Status Practice ZOJ 3866 Description Edward the confectioner is making a new batch of chocolate covered candy. Each candy center is shaped as a cylin…
Cylinder Candy Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge Edward the confectioner is making a new batch of chocolate covered candy. Each candy center is shaped as a cylinder with radius r mm and height h mm. The candy center needs to…
Cylinder Candy Time Limit: 2 Seconds Memory Limit: 65536 KB Special Judge Edward the confectioner is making a new batch of chocolate covered candy. Each candy center is shaped as a cylinder with radius r mm and height h mm. The candy center needs to…
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=494 题目大意: 一只蜗牛要从爬上n英寸高的地方,他速度为u每分钟,他爬完u需要休息1分钟,且他休息时下滑d英寸,问他什么时候爬出去. 吐槽: 小学的数学题编程了编程题,简直丧心病狂. 思路: 数据量小直接模拟即可. 也可以用数学推导 模拟板: #include<cstdio> int main() { int n,u,d; while(~scanf("%d%d%d…
题 题意 给你一串数,a1...an,从左到右每次让一个数减小c,如果这个数小于c,那就减为0.第n个数减小后,又从第一个开始从左到右.如果这次某个数减小到0,那就改变方向,如果遇到已经是0的,就跳过.且总共最多减少n+5次,求最后变为0的数是第几个. 分析 Input 1 8 80200 100 100 100 100 80 160 200 Output 3 样例分析: 最多可以减少8+5=13次,于是最后减为0的就是第三个数了: 200 100 100 100 100 80 160 200…
GCD Expectation Time Limit: 4 Seconds                                     Memory Limit: 262144 KB                             Edward has a set of n integers {a1, a2,...,an}. He randomly picks a nonempty subset {x1, x2,…,xm} (each nonempty subset has…
思路:易知结果为 ∑(n-k)*C(n+k,k)*(p^(n+1)*q^k+q^(n+1)*p^k). 注意不能直接算,注意点技巧!!!看代码 代码如下: #include<iostream> #include<stdio.h> #include<algorithm> #include<iomanip> #include<cmath> using namespace std; int main(){ ; double p,q,ans1,ans2,…
Ant Time Limit: 1 Second      Memory Limit: 32768 KB There is an ant named Alice. Alice likes going hiking very much. Today, she wants to climb a cuboid. The length of cuboid's longest edge is n, and the other edges are all positive integers. Alice's…