HDU 4950 Monster 题目链接 题意:给定怪兽血量h,你攻击力a.怪物回血力b,你攻击k次要歇息一次,问是否能杀死怪兽 思路:签到题,注意最后一下假设打死了怪,那么怪就不会回血了 思路: #include <cstdio> #include <cstring> typedef long long ll; ll h, a, b, k; bool solve() { if (a >= h) return true; if (b >= a) return fals…
题目链接:pid=4950http://acm.hdu.edu.cn/showproblem.php?pid=4950">http://acm.hdu.edu.cn/showproblem.php?pid=4950 Monster Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 220 Accepted Submission…
Monster 题目链接: http://acm.hust.edu.cn/vjudge/contest/123554#problem/I Description Teacher Mai has a kingdom. A monster has invaded this kingdom, and Teacher Mai wants to kill it. Monster initially has h HP. And it will die if HP is less than 1. Teache…
http://acm.hdu.edu.cn/showproblem.php?pid=4927 给定一个长度为n的序列a,每次生成一个新的序列,长度为n-1,新序列b中bi=ai+1−ai,直到序列长度为1.输出最后的数. n有3000果断用大数,类似杨辉三角推出每个数对最终结果的贡献,利用公式:c[n][m] = c[n][m-1]*(n-m+1)/m防超时 import java.math.BigInteger; import java.util.*; public class Main {…
Toxophily Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 1429 Accepted Submission(s): 739 Problem Description The recreation center of WHU ACM Team has indoor billiards, Ping Pang, chess an…
River Problem Time Limit: 6000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 721 Accepted Submission(s): 282 Problem Description The River of Bitland is now heavily polluted. To solve this problem, the King…
Monster Time Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1383 Accepted Submission(s): 363 Problem Description One day, v11 encounters a group of monsters in a foreast. In order to defend the…