HDOJ-ACM Steps】的更多相关文章

(都是递推求值,呵呵,好开心- - ) 今天又是在自习室通宵(文明玩的停不下来了) 游戏玩完想想该水题了,于是打开了HDOJ的ACM STEPS(这是个好东西,就像他的名字,一步步来的) 2.3.x貌似都推断题- - ~由于本人比较懒,就直接找题解了,水到了3.1.x 读完3.1.1  啊哈,这题不用找题解也会推~~斐波那契= = (3.1.2是数据比较大的斐波那契,改用 long long 就好了) (用VSCode敲的,这东西界面不错,功能也好,而且轻,就是debug比较烦-= 超级楼梯 T…
数学题小关,做得很悲剧,有几道题要查数学书... 记下几道有价值的题吧 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)…
上网搜了一下这道题的解法,主要有两个方法,一种是采用母函数的方法,一种是采用0/1背包的方法. 先说一下母函数,即生成函数,做个比喻,母函数就是一个多项式前面的系数的一个整体的集合,而子函数就是这个多项式每一项前面的系数.主要用于解决组合问题,类似于钱币的组合问题.利用母函数解题时,首先要写出表达式,通常是多项式的乘积形式,类似于:(x^(v[K]*n1[K])+x^(v[K]*(n1[K]+1))+x^(v[K]*(n1[K]+2))+...+x^(v[K]*n2[K])). 例如,对于有n种…
acm与oi很大的一个不同就是在输入格式上.oi往往是单组数据,而acm往往是多组数据,而且题目对数据格式往往各有要求,这8道a+b(吐槽..)涉及到了大量的常用的输入输出格式.https://wenku.baidu.com/view/1753515189eb172dec63b715.html 这篇文章是对这8道题的总结.为了我的方便和懒惰,就不放代码了..…
小数化分数2   Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)  Total Submission(s): 3420 Accepted Submission(s): 1258 Problem Description Ray 在数学课上听老师说,任何小数都能表示成分数的形式,他开始了化了起来,很快他就完成了,但他又想到一个问题,如何把一个循环小数化成分数呢? 请你写一个程序不但可以将…
Leftmost Digit   Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)  Total Submission(s): 3377 Accepted Submission(s): 1485 Problem Description Given a positive integer N, you should output the leftmost digit of N^N. Inp…
Largest prime factor   Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)  Total Submission(s): 6130 Accepted Submission(s): 1886 Problem Description Everybody knows any number can be combined by the prime number. Now, y…
1月26号至3月4号 每天给自己一个计划.做有意义的事情,不要浪费时间. 8:00——11:30 acm训练 11:30——13:00 午休 13:00——17:30  acm训练 17:30——18:30  晚饭+休息或锻炼 18:30——23:00 acm训练 23:30准时睡觉 具体的训练内容: 1.一直以来对于acm练习都比较迷茫,不知道怎么下手.一直以来也都是自己在摸索着,挺后悔当初没有跟上大部队的步伐,按照老师说的一步步去做.不过我想每个人都会有一条只属于自己的ac之路.正如周教主说…
Problem Description Eddy usually writes articles ,but he likes mixing the English letter uses, for example "computer science" is written frequently "coMpUtEr scIeNce" by him, this mistakes lets Eddy's English teacher be extremely disco…
http://acm.hdu.edu.cn/showproblem.php?pid=1087 Online Judge Online Exercise Online Teaching Online Contests Exercise Author F.A.QHand In HandOnline Acmers Forum |DiscussStatistical Charts Problem ArchiveRealtime Judge StatusAuthors Ranklist       C/C…
http://acm.hdu.edu.cn/showproblem.php?pid=2955 如果认为:1-P是背包的容量,n是物品的个数,sum是所有物品的总价值,条件就是装入背包的物品的体积和不能超过背包的容量1-P. 在这个条件下,让装入背包的物品的总价值,也就是bag[i].[v]的和最大 bag.v是每一件物品的价值,bag.p是每件物品的体积 像上面这样想是行不通的.下面有解释 这道题麻烦的是概率这东西没法用个循环表示出来,根据我以往的经验,指望着把给出的测试数据乘上一百或者一万这种…
http://acm.hdu.edu.cn/showproblem.php?pid=1548 Online Judge Online Exercise Online Teaching Online Contests Exercise Author F.A.QHand In HandOnline Acmers Forum |DiscussStatistical Charts Problem ArchiveRealtime Judge StatusAuthors Ranklist       C/C…
Online Judge Online Exercise Online Teaching Online Contests Exercise Author F.A.QHand In HandOnline Acmers Forum |DiscussStatistical Charts Problem ArchiveRealtime Judge StatusAuthors Ranklist       C/C++/Java ExamsACM StepsGo to JobContest LiveCast…
题目链接:http://code.hdu.edu.cn/game/entry/problem/show.php?chapterid=1&sectionid=2&problemid=22 题目意思:给出一个数,观察其二进制表示,从右往左看,记录遇到第一个出现1的位置pos,做2 ^ pos 的运算. 这几天杭电的告示:Exercise Is Closed Now!  再加上想用一些简单的题目来调剂一下,因此就做ACM Steps  吧. 用了递归的方法来做. #include <ios…
Eddy's mistakes[HDU1161] Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 6014    Accepted Submission(s): 3405 Problem DescriptionEddy usually writes articles ,but he likes mixing the English let…
https://www.cpfn.org/bbs/viewtopic.php?f=85&t=5940&sid=ccbcf716d21191452e7c08a97b502337&start=10 相关博客: HDU 1717 小数化分数2(ACM Steps 2.1.8)…
原地址:http://www.byywee.com/page/M0/S607/607452.html 总结了一下ACM STEPS的各章内容,趁便附上我的Steps题号(每人的不一样). 别的,此文首要目标是为了装逼: 大牛请疏忽: 摸索欲斗劲强的请疏忽: 其实不乐于从A+B刷起的可以找到须要的响应题号操练-- 1.1 根蒂根基输入输出:LCY的 A+B 8题 (1089~1096) 1.2 C说话根蒂根基:根蒂根基入门题 (2104,2088,1076,2095,1061,1170,3361,…
Problem Description Eddy usually writes articles ,but he likes mixing the English letter uses, for example "computer science" is written frequently "coMpUtEr scIeNce" by him, this mistakes lets Eddy's English teacher be extremely disco…
Problem Description Eddy usually writes  articles ,but he likes mixing the English letter uses, for example "computer science" is written frequently "coMpUtEr scIeNce" by him, this mistakes lets Eddy's English teacher be extremely disc…
并不是很精简,随便改改A过了就没有再简化了. 1020. Problem Description Given a string containing only 'A' - 'Z', we could encode it using the following method: 1. Each sub-string containing k same characters should be encoded to "kX" where "X" is the only c…
太简单了...题目都不想贴了 //算n个数的最小公倍数 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int gcd(int a, int b) { ?a:gcd(b,a%b); } int lcm(int a, int b) { return a/gcd(a,b)*b; } int main() { int T; scanf("%d",&…
Online Judge Online Exercise Online Teaching Online Contests Exercise Author F.A.Q Hand In Hand Online Acmers Forum | Discuss Statistical Charts Problem Archive Realtime Judge Status Authors Ranklist C/C++/Java Exams ACM Steps Go to Job Contest LiveC…
Eddy's mistakes Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7588    Accepted Submission(s): 4274 Problem Description Eddy usually writes articles ,but he likes mixing the English letter use…
#include<cstdio> #include<cstring> using namespace std; int n,m,jiecheng[11]; double a[12],b[12]; int main() { //freopen("hdu1521.in","r",stdin); int x; jiecheng[0]=1; for(int i=1;i<=10;++i) jiecheng[i]=jiecheng[i-1]*i;…
Problem Description Eddy usually writes  articles ,but he likes mixing the English letter uses, for example "computer science" is written frequently "coMpUtEr scIeNce" by him, this mistakes lets Eddy's English teacher be extremely disc…
#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<sstream> #include<algorithm> #include<queue> #include<deque> #include<iomanip> #include<vector> #include<cmath>…
DAY 5 之前整过一个DP 动态规划  DP 啥是DP? DP等价于DAG!!! (1)无后效性:DP的所有状态之间组成一个DAG (2)最优子结构 (3)阶段性 (4)转移方程:如何计算状态 一般是顺序转移 有时候乱序,因为DP 是DAG,可以拓扑排序,然后从头for一遍 (5)状态:题目要算的东西 以斐波那契数列为例,求斐波那契数列第n项 边界条件: 1.递推: 用其他计算好的结果得到自己的结果 2.递归:自己的值更新其他值 任何DP都可以写出这两种,但是会出现情况,一种hin难写,另一种…
The number of steps nid=24#time" style="padding-bottom:0px; margin:0px; padding-left:0px; padding-right:0px; color:rgb(83,113,197); text-decoration:none; padding-top:0px"> Time Limit: 1000ms   Memory limit: 65536K  有疑问?点这里^_^ 题目描写叙述 Mary…
题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=2059 起点和终点,共n+2个点,n+2个状态,简单DP即可. //11512698 2014-08-21 17:11:55 Accepted 2059 //62MS 368K 969 B G++ 空信高手 //起点和终点,共n+2个点,n+2个状态,简单DP即可 #include<iostream> #include<cstdio> using namespace std; ; co…
题目地址: http://acm.hdu.edu.cn/showproblem.php?pid=2673 拍两次序,交替输出 #include<iostream> #include<algorithm> #include<cstdio> using namespace std; #define MAX_NUMBER 10000 bool myfunction1 (int i,int j) { return (i<j); } bool myfunction2 (in…