随笔分类 - HDU
摘要:B -Power StringsTime Limit:3000MSMemory Limit:65536KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as m
阅读全文
摘要:F -DividingTime Limit:1000MSMemory Limit:10000KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionMarsha and Bill own a collection of marbles. They want to split the collection among themselves so that both receive an equal share of the marbles. This would be easy if all the marbles had the sa
阅读全文
摘要:B -Piggy-BankTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionBefore 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
阅读全文
摘要:A -饭卡Time Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusDescription电子科大本部食堂的饭卡有一种很诡异的设计,即在购买之前判断余额。如果购买一个商品之前,卡上的剩余金额大于或等于5元,就一定可以购买成功(即使购买后卡上余额为负),否则无法购买(即使金额足够)。所以大家都希望尽量使卡上的余额最少。某天,食堂中有n种菜出售,每种菜可购买一次。已知每种菜的价格以及卡上的余额,问最少可使卡上的余额为多少。Input多组数据。对于每组数据:第一行为正整数n,表示菜的数量。n#i
阅读全文
摘要:Monkey and BananaTime Limit:2000MSMemory Limit:65536KB64bit IO Format:%lld & %lluSubmitStatusDescriptionA 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...
阅读全文
摘要:Time Limit:10000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionIgnatius花了一个星期的时间终于找到了传说中的宝藏,宝藏被放在一个房间里,房间的门用密码锁起来了,在门旁边的墙上有一些关于密码的提示信息:密码是一个C进制的数,并且只能由给定的M个数字构成,同时密码是一个给定十进制整数N(0#include #include #include #include #include #include using namespace std;int n,m,k;int re[
阅读全文
摘要:A -胜利大逃亡(续)Time Limit:2000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusDescriptionIgnatius再次被魔王抓走了(搞不懂他咋这么讨魔王喜欢)……这次魔王汲取了上次的教训,把Ignatius关在一个n*m的地牢里,并在地牢的某些地方安装了带锁的门,钥匙藏在地牢另外的某些地方。刚开始Ignatius被关在(sx,sy)的位置,离开地牢的门在(ex,ey)的位置。Ignatius每分钟只能从一个坐标走到相邻四个坐标中的其中一个。魔王每t分钟回地牢视察一次,若发现Ignati
阅读全文
摘要:Fire NetTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 4145 Accepted Submission(s): 2370 Problem DescriptionSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing
阅读全文
摘要:题目即为分饼,但是每个人要分到一样大,切只能是一整块,不能拼凑在一起,求每人分到最大的体积。。。。安神说我没真正理解二分搜索,确实,二分真的很神通广大,在这个题目我就死脑筋没转过弯,。。由于给的饼的数目和类型不确定。。。有些饼是可以舍弃的。。在这个处理上,用f>=V[I]/MID作为二分的条件最好了,即判断能不能切出这么多块MID体积大的饼出来。。。。其实这就是二分的思想,不要死脑筋。。二分可以变换很多形式,控制条件不同,达到不同的效果。。。这才是要去领会二分的精髓。话说代码又是参考某位大神的。#include <iostream>#include <cstdio>
阅读全文
摘要:Strange fuctionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1612Accepted Submission(s): 1206Problem DescriptionNow, here is a fuction:F(x) = 6 * x^7+8*x^6+7*x^3+5*x^2-y*x (0 <= x <=100)Can you find the minimum value when x is between 0 and
阅读全文
摘要:Can you solve this equation?Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4276Accepted Submission(s): 1989Problem DescriptionNow,given the equation 8*x^4 + 7*x^3 + 2*x^2 + 3*x + 6 == Y,can you find its solution between 0 and 100;Now please try yo
阅读全文
摘要:Can you find it?Time Limit: 10000/3000 MS (Java/Others)Memory Limit: 32768/10000 K (Java/Others)Total Submission(s): 6515Accepted Submission(s): 1706Problem DescriptionGive you three sequences of numbers A, B, C, then we give you a number X. Now you need to calculate if you can find the three number
阅读全文
摘要:FatMouse' TradeTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 25Accepted Submission(s) : 1Problem DescriptionFatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean. The
阅读全文
摘要:Fibonacci AgainTime Limit : 2000/1000ms (Java/Other)Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 13Accepted Submission(s) : 5Problem DescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).InputInput consists of a sequence of lin
阅读全文
摘要:N!Time Limit : 10000/5000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 54 Accepted Submission(s) : 11Problem DescriptionGiven an integer N(0 ≤ N ≤ 10000), your task is to calculate N!InputOne N in one line, process to the end of file.OutputFor each N, output N! in one
阅读全文
摘要:2095 find your present (2)Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them will be yours.Each present has a card number on it, and your presen
阅读全文
摘要:Problem DescriptionProblems in Computer Science are often classified as belonging to a certain class of problems (e.g., NP, Unsolvable, Recursive). In this problem you will be analyzing a property of an algorithm whose classification is not known for all possible inputs. Consider the following algor
阅读全文

浙公网安备 33010602011771号