hdu Hat's Tea】的更多相关文章

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1288 去买茶,需要正好的钱才行,另外花的钱的个数最多  其实是一个简单的贪心问题,小的多取一点,多的少取一点.反着想,算出超出部分数量. 代码: #include <stdio.h> #include <string.h> #include <math.h> #include <algorithm> #include <iostream> #incl…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1288 Hat's Tea Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2127    Accepted Submission(s): 484 Problem Description Hat is a member of PG Studio.…
Hat's Tea Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1139    Accepted Submission(s): 238 Problem Description Hat is a member of PG Studio. Hat codes a lot and so he often buys tea at tea ve…
这个要慢慢理解…… ;}…
import java.math.BigInteger; import java.util.*; public class Main { public static void main(String []args) { Scanner cin=new Scanner(System.in); BigInteger a,b,c,d,m; int n; while(cin.hasNext()){ m=new BigInteger("1"); a=new BigInteger("1&…
大数的位数设置很坑,设成700会越界,设成800会超空间,最后设成了750居然就过了.... #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> #include <cmath> #define LL long long using namespace std; /* * 完全大数模板 * 输出cin>>a * 输出a.print(…
A:HDU 1060 Leftmost Digit(求N^N的第一位数字 log10的巧妙使用) B:(还需要研究一下.....) C:HDU 1071 The area(求三个点确定的抛物线的面积,其中一个点是顶点) D:HDU 1077 Catching Fish(用单位圆尽可能围住多的点) E:HDU 1099 Lottery (求数学期望) F:HDU 1110 Equipment Box (判断一个大矩形里面能不能放小矩形) G:HDU 1155 Bungee Jumping(物理题,…
题目连接 http://acm.hdu.edu.cn/showproblem.php?pid=1250 Hat's Fibonacci Description A Fibonacci sequence is calculated by adding the previous two members the sequence, with the first two members being both 1.$F(1) = 1, F(2) = 1, F(3) = 1,F(4) = 1, F(n >…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1247 Problem DescriptionA hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.You are to find all the hat’s words in a dictionary. InputStandard…
传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1250 Hat's Fibonacci Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 12952    Accepted Submission(s): 4331 Problem Description A Fibonacci sequence…