F - Piggy-Bank
**Time Limit:**1000MS **Memory Limit:**32768KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea behind is simple. Whenever some ACM member has any small money, he takes all the coins and throws them into a piggy-bank. You know that this process is irreversible, the coins cannot be removed without breaking the pig. After a sufficiently long time, there should be enough cash in the piggy-bank to pay everything that needs to be paid.
E - Super Jumping! Jumping! Jumping!
**Time Limit:**1000MS **Memory Limit:**32768KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now.
C - Monkey and Banana
**Time Limit:**1000MS **Memory Limit:**32768KB 64bit IO Format:%I64d & %I64u
Submit Status
Description
A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the monkey is clever enough, it shall be able to reach the banana by placing one block on the top another to build a tower and climb up to get its favorite food.
**Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 26534 Accepted Submission(s): 9332 **
Problem Description
Nowadays, we all know that Computer College is the biggest department in HDU. But, maybe you don’t know that Computer College had ever been split into Computer College and Software College in 2002. The splitting is absolutely a big event in HDU! At the same time, it is a trouble thing too. All facilities must go halves. First, all facilities are assessed, and two facilities are thought to be same if they have the same value. It is assumed that there is N (0<N<1000) kinds of facilities (different value, different kinds).
I NEED A OFFER! # **Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 18287 Accepted Submission(s): 7320 **
饭卡 # **Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 14225 Accepted Submission(s): 4945 **
ZCC Loves Codefires Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 988 Accepted Submission(s): 500
Problem Description
Though ZCC has many Fans, ZCC himself is a crazy Fan of a coder, called “Memset137”. It was on Codefires(CF), an online competitive programming site, that ZCC knew Memset137, and immediately became his fan. But why? Because Memset137 can solve all problem in rounds, without unsuccessful submissions; his estimation of time to solve certain problem is so accurate, that he can surely get an Accepted the second he has predicted. He soon became IGM, the best title of Codefires. Besides, he is famous for his coding speed and the achievement in the field of Data Structures. After become IGM, Memset137 has a new goal: He wants his score in CF rounds to be as large as possible. What is score? In Codefires, every problem has 2 attributes, let’s call them Ki and Bi(Ki, Bi>0). if Memset137 solves the problem at Ti-th second, he gained Bi-KiTi score. It’s guaranteed Bi-KiTi is always positive during the round time. Now that Memset137 can solve every problem, in this problem, Bi is of no concern. Please write a program to calculate the minimal score he will lose.(that is, the sum of Ki*Ti).
Wooden Sticks Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 19008 Accepted: 8012 Description
There is a pile of n wooden sticks. The length and weight of each stick are known in advance. The sticks are to be processed by a woodworking machine in one by one fashion. It needs some time, called setup time, for the machine to prepare processing a stick. The setup times are associated with cleaning operations and changing tools and shapes in the machine. The setup times of the woodworking machine are given as follows: (a) The setup time for the first wooden stick is 1 minute. (b) Right after processing a stick of length l and weight w , the machine will need no setup time for a stick of length l’ and weight w’ if l <= l’ and w <= w’. Otherwise, it will need 1 minute for setup. You are to find the minimum setup time to process a given pile of n wooden sticks. For example, if you have five sticks whose pairs of length and weight are ( 9 , 4 ) , ( 2 , 5 ) , ( 1 , 2 ) , ( 5 , 3 ) , and ( 4 , 1 ) , then the minimum setup time should be 2 minutes since there is a sequence of pairs ( 4 , 1 ) , ( 5 , 3 ) , ( 9 , 4 ) , ( 1 , 2 ) , ( 2 , 5 ) . Input
简单贪心。 因为填的字母没有次数限制,所以最优策略很容易想到,就是在最后面填最大的。 不用实际去填,算出ans就可以。
简单贪心…. 需要注意的是数据是非负,所以有0的情况要考虑周全,基本都要特殊处理。 多WA了三次,不知道为什么交C++可以过,交G++就不行。
一开始算法想的有点问题。
坑点在于走廊两侧都有房间
也就是说room1和room2对应的位置是一样的
题意:求两个相等的圆环的相交的面积…. 简单计算几何+容斥原理? 扇形面积公式记错调了半天2333333333 这题不难…倒是从学长那里收获了几点关于代码规范的问题… 听说了学长在北京区域赛时把PI定义错了一位结果一直WA的教训…. 以后还是写acos(-1)吧 局部变量和全局变量因为【想怎么其变量名想得整个人都不好了】就起成了一样的…被学长给了差评。 哦,对!还有一个就是发现了cmath库里有一个奇葩的函数名叫y1.。。。。。。。 —————————————————————————————————————————————— 竟然CE了 提示 error:pow(int,int) is ambiguous 看来我对语言的掌握程度还是不行呀…..
Description
Matt has N friends. They are playing a game together.
Each of Matt’s friends has a magic number. In the game, Matt selects some (could be zero) of his friends. If the xor (exclusive-or) sum of the selected friends’magic numbers is no less than M , Matt wins.
题意是说用k重颜色填充n*m的方格,第i种颜色要用ci次,保证ci(i属于1..k)的和为n"m,问是否有可行解,若有,输出任意一种。 第一感觉是dfs.。。而且数据范围还那么小。但是鉴于我上次dfs写成汪的经历….嗯 不过群里有学长说似乎剪枝不太好想? 我一开始分了四类,o行o列,e行e列,e行o列,o行e列,(o是odd,e是even)然后将c[i]排序,先填大的C[I],感觉这样应该更容易找到解。交了一发,WA掉了。。发现当k较小的时候,也就是c[i]都相对较大的时候,先填大的C[I]的策略会出现错误。于是我换了下….按c[i]的大小从两边往中间…然后我还发现其实o行o列和e行e列可以归为一类,同理,后两种也可以归为一类。又交,又WA2333333 然后想了好久。。。 发现对于上面说的两类的处理顺序不同会得到不同的结果…….只有一种是对的。于是加了个judge函数判断冲突…如果冲突就换个顺序…..再交,A了。
ACM STEPS里的…这题前面一道是求LCM….结果接下来就是这么一道。。。 朴素会超….筛法会爆….题目顺序真是按照难度来的? 于是想到 Miller-Rabin素数测试……. 这个方法是基于费马小定理 我的理解就是… 如果我要判断n是否为素数 只要取k个数 如果满足 a^(n-1)mod n =1 那么n就很可能为素数。 证明什么的…暂时还是算了吧…论文里貌似扯了一大堆 第一次用,竟然真的A了。。。。 感觉更好的办法也许是先打一个比较小的素数表,然后每次random选取若干个进行判断…那样应该更可靠些? 本来想WA掉之后再改的。。。没想到这么写就A掉了。。。。杭电数据略水?