
ACM/ICPC
文章平均质量分 76
fduan
这个作者很懒,什么都没留下…
展开
-
算法百题009:可数集
问题描述:有理数全体为一可数集合。 把表示所有有理数的分数按下列方法进行列举。1/1 1/2 1/3 1/4.....2/1 2/2 2/3....3/1 3/2 ....4/1..............我们以z字型方法给上表的每项编号。特定方法:第一项是1/1,然后是1/2、2/1、3/1、2/2、1/3、1/4、2/3……。编程输入项号N(1 分析原创 2011-06-13 21:09:00 · 807 阅读 · 0 评论 -
Solution of ZOJ 1078 Palindrome Number
We say that a number is a palindrom if it is the sane when read from left to right or from right to left. The objective of this problem is to verify if a set of given numbers are palindroms in any basis from 2 to 16.原创 2011-05-29 19:38:00 · 612 阅读 · 0 评论 -
Solution of ZOJ 1067 Color Me Less
A color reduction is a mapping from a set of discrete colors to a smaller one. The solution to this problem requires that you perform just such a mapping in a standard twenty-four bit RGB color space. The input consists of a target set of sixteen RGB color原创 2011-05-29 19:21:00 · 714 阅读 · 0 评论 -
Solution of ZOJ 2679 Old Bill
<br />Among grandfather��s papers a bill was found:<br />72 turkeys $_679_<br />The first and the last digits of the number that obviously represented the total price of those turkeys are replaced here by blanks (denoted _), for they are faded and are now原创 2011-05-17 16:29:00 · 779 阅读 · 0 评论 -
Solution of ZOJ 2840 File Search
Have you ever used file searching tools provided by an operating system? For example, in DOS, if you type "dir *.exe", the OS will list all executable files with extension "exe" in the current directory.原创 2011-05-17 15:36:00 · 1043 阅读 · 0 评论 -
Solution of ZOJ 2420 Calendar
<br />A calendar is a system for measuring time, from hours and minutes, to months and days, and finally to years and centuries. The terms of hour, day, month, year and century are all units of time measurements of a calender system.<br />According to the原创 2011-05-16 13:42:00 · 811 阅读 · 0 评论 -
Solution of ZOJ 2109 FatMouse' Trade
FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean.原创 2011-05-13 01:24:00 · 843 阅读 · 0 评论 -
Solution of ZOJ 2748 Free Kick
声明:转载或引用本文代码,请务必注明出处! http://blog.csdn.net/fduan思路分析:此题为一道几何题,可以证明当人墙与右边两条直线所成三角形为等腰三角形时,人墙长度最短。接下来就是非常简单的几何计算了。下面给出我的实现代码,有一点需要注意,即使用三角函数时,有可能得出的人数为负数,这时应输出0。原创 2011-05-12 22:44:00 · 772 阅读 · 0 评论 -
Solution of ZOJ 1205 Martian Addition
In the 22nd Century, scientists have discovered intelligent residents live on the Mars. Martians are very fond of mathematics. Every year, they would hold an Arithmetic Contest on Mars (ACM). The task of the contest is to calculate the sum of two 100-digit原创 2011-05-12 15:05:00 · 708 阅读 · 0 评论 -
Solution of ZOJ 1949 Error Correcting
A boolean matrix has the parity property when each row and each column has an even sum, i.e. contains an even number of bits which are set. Here's a 4 x 4 matrix which has the parity property: 1 0 1 00 0 0 01 1 1 10 1 0 1The sums of the rows原创 2011-05-12 12:02:00 · 799 阅读 · 0 评论 -
Solution of ZOJ 1188 DNA Sorting
One measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence ``DAABEC'', this measure is 5, since D is greater than four letters to its right and E is原创 2011-05-12 09:59:00 · 1818 阅读 · 0 评论 -
Solution of ZOJ 2095 Divisor Summation (Online Version)
Give a natural number n (1原创 2011-05-12 01:12:00 · 1349 阅读 · 0 评论 -
Solution of ZOJ 2850 Beautiful Meadow
Tom has a meadow in his garden. He divides it into N * M squares. Initially all the squares were covered with grass. He mowed down the grass on some of the squares and thinks the meadow is beautiful if and only if Not all squares are covered with grass原创 2011-05-11 22:32:00 · 1129 阅读 · 0 评论 -
Solution of ZOJ 2857 Image Transformation
Convert color images to a gray-level images.原创 2011-05-11 20:01:00 · 785 阅读 · 0 评论 -
Solution of ZOJ 1797 Least Common Multiplier
Calculating the least common multiple (LCM) of a set of positive integers.原创 2011-05-11 14:51:00 · 821 阅读 · 0 评论