01 2013 档案
摘要:One day, an ant called Alice came to an M*M chessboard. She wanted to go around all the grids. So she began to walk along the chessboard according to this way: (you can assume that her speed is one grid per second) At the first second, Alice was standing at (1,1). Firstly she went up for a grid, the
阅读全文
摘要:题目即为分饼,但是每个人要分到一样大,切只能是一整块,不能拼凑在一起,求每人分到最大的体积。。。。安神说我没真正理解二分搜索,确实,二分真的很神通广大,在这个题目我就死脑筋没转过弯,。。由于给的饼的数目和类型不确定。。。有些饼是可以舍弃的。。在这个处理上,用f>=V[I]/MID作为二分的条件最好了,即判断能不能切出这么多块MID体积大的饼出来。。。。其实这就是二分的思想,不要死脑筋。。二分可以变换很多形式,控制条件不同,达到不同的效果。。。这才是要去领会二分的精髓。话说代码又是参考某位大神的。#include <iostream>#include <cstdio>
阅读全文
摘要:Mishap in ClubPolycarpus just has been out of luck lately! As soon as he found a job in the "Binary Cat" cafe, the club got burgled. All ice-cream was stolen.On the burglary night Polycarpus kept a careful record of all club visitors. Each time a visitor entered t...
阅读全文
摘要:三分搜索法 二分法作为分治中最常见的方法,适用于单调函数,逼近求解某点的值。但当函数是凸性函数时,二分法就无法适用,这时三分法就可以“大显身手”~~ 如图,类似二分的定义Left和Right,mid = (Left + Right) / 2,midmid = (mid + Right) / 2; 如果mid靠近极值点,则Right = midmid;否则(即midmid靠近极值点),则Left = mid;程序模版如下:double Calc(Type a){ /* 根据题目的意思计算 */}void Solve(void){ double Left, Right; double mid, m
阅读全文
摘要: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
阅读全文
摘要:原文地址:http://hunteagle.iteye.com/blog/118551计算理论中,没有Hash函数的说法,只有单向函数的说法。所谓的单向函数,是一个复杂的定义,大家可以去看计算理论或者密码学方面的数据。用“人类”的语言描述单向函数就是:如果某个函数在给定输入的时候,很容易计算出其结果来;而当给定结果的时候,很难计算出输入来,这就是单项函数。各种加密函数都可以被认为是单向函数的逼近。Hash函数(或者成为散列函数)也可以看成是单向函数的一个逼近。即它接近于满足单向函数的定义。Hash函数还有另外的含义。实际中的Hash函数是指把一个大范围映射到一个小范围。把大范围映射到一个小范围
阅读全文
摘要:BabelfishTime Limit:3000MSMemory Limit:65536KTotal Submissions:26333Accepted:11301DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to he...
阅读全文
摘要:4 Values whose Sum is 0Time Limit:15000MSMemory Limit:228000KTotal Submissions:12224Accepted:3426Case Time Limit:5000MSDescriptionThe SUM problem can be formulated as follows: given four lists A, B, C, D of integer values, compute how many quadruplet (a, b, c, d ) ∈ A x B x C x D are such that a + b
阅读全文
摘要:Sacrament of the sumTime Limit:1000MSMemory Limit:65536KTotal Submissions:1628Accepted:756Description— The Brother of mine, the Head of Monastic Order wants to know tomorrow about the results long-term researches. He wants to see neither more nor less than the Su...
阅读全文
摘要: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
阅读全文
摘要:ProductThe ProblemThe problem is to multiply two integers X, Y. (0<=X,Y<10250)The InputThe input will consist of a set of pairs of lines. Each line in pair contains one multiplyer.The OutputFor each input pair of lines the output line should consist one integer the product.Sample Input12122222
阅读全文
摘要:Integer InquiryOne of the first users of BIT's new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and h...
阅读全文
摘要:PalindromesA regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when the string is read from left to right as when the string is read from right to left. A mirrored string is
阅读全文

浙公网安备 33010602011771号