hdoj 1060】的更多相关文章

代码: #include <stdio.h>#include <math.h> int main(){    int t;    while(scanf("%d",&t)!=EOF)    {        while(t--)        {            __int64 n;            scanf("%I64d",&n);            double x=n*log10(n*1.0);    …
数学题小关,做得很悲剧,有几道题要查数学书... 记下几道有价值的题吧 The area(hdoj 1071) http://acm.hdu.edu.cn/showproblem.php?pid=1071 直线方程易求,曲线方程要推公式...设y=a*x^2+b*x+c,则顶点坐标为(-b/(2a),4ac-b^2)/(4a)),又从题目中已知顶点坐标为(x1,y1),以及另一点(x2,y2),则有 y2=a*x2*x2+b*x2+c y1=a*x1*x1+b*x1+c x1=-b/(2*a)…
HDOJ 题目分类 //分类不是绝对的 //"*" 表示好题,需要多次回味 //"?"表示结论是正确的,但还停留在模块阶 段,需要理解,证明. //简单题看到就可以敲的 1000:    入门用: 1001:    用高斯求和公式要防溢出 1004:1012: 1013:    对9取余好了 1017:1021: 1027:    用STL中的next_permutation() 1029:1032:1037:1039:1040:1056:1064:1065: 10…
HDOJ 题目分类 /* * 一:简单题 */ 1000:    入门用:1001:    用高斯求和公式要防溢出1004:1012:1013:    对9取余好了1017:1021:1027:    用STL中的next_permutation()1029:1032:1037:1039:1040:1056:1064:1065:1076:    闰年 1084:1085:1089,1090,1091,1092,1093,1094, 1095, 1096:全是A+B1108:1157:1196:1…
FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 56784    Accepted Submission(s): 19009 Problem Description FatMouse prepared M pounds of cat food, ready to trade with the cats g…
Nasty Hacks Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3049    Accepted Submission(s): 2364 Problem Description You are the CEO of Nasty Hacks Inc., a company that creates small pieces of…
Box of Bricks Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5994    Accepted Submission(s): 2599 Problem Description Little Bob likes playing with his box of bricks. He puts the bricks one up…
Description 一个有根树,你只能进行增加操作,问你将所有叶节点到根的路径权值相同至少需要增加几次. Sol 我也不知道该叫什么算法... 反正就是记录一下到子节点到当前节点的最大距离统计答案就可以了. Code /************************************************************** Problem: 1060 User: BeiYu Language: C++ Result: Accepted Time:960 ms Memory…
Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contest is over, they will count the balloons of each color…
卧槽....最近刷的cf上有最短路,本来想拿这题复习一下.... 题意就是在输出最短路的情况下,经过每个节点会增加税收,另外要字典序输出,注意a到b和b到a的权值不同 然后就是处理字典序的问题,当松弛时发现相同值的时候,判断两条路径的字典序 代码 #include "stdio.h" const int MAXN=110; const int INF=10000000; bool vis[MAXN]; int pre[MAXN]; int cost[MAXN][MAXN],lowcos…