- 博客(38)
- 收藏
- 关注
原创 1038 Bugs Integrated, Inc.//状态压缩DP
Bugs Integrated, Inc.Time Limit: 15000MS Memory Limit: 30000KTotal Submissions: 5762 Accepted: 2069Case Time Limit: 5000MSDescriptionBugs Integrated, Inc. is a major manufacturer of advanced memory chips. They are launching production of a new six tera
2011-02-28 16:27:00 1361 2
原创 1023 The Fun Number System
<br />The Fun Number SystemTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 6859 Accepted: 2132<br />DescriptionIn a k bit 2's complement number, where the bits are indexed from 0 to k-1, the weight of the most significant bit (i.e., in position
2011-02-28 10:45:00 1232
原创 1064 Cable master
<br />Cable masterTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 10943 Accepted: 2254<br />DescriptionInhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to or
2011-02-28 09:39:00 1520
原创 1010 STAMPS
STAMPSTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 10034 Accepted: 2661DescriptionHave you done any Philately lately? You have been hired by the Ruritanian Postal Service (RPS) to design their new postage software. The software allocates stamp
2011-02-27 15:32:00 1536
原创 1029 False coin
False coinTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12014 Accepted: 3229<br />DescriptionThe "Gold Bar"bank received information from reliable sources that in their last group of N coins exactly one coin is false and differs in weight from
2011-02-27 10:01:00 1242
原创 2945 Find the Clones //trie
Find the ClonesTime Limit: 5000MS Memory Limit: 65536KTotal Submissions: 5151 Accepted: 1898<br />DescriptionDoubleville, a small town in Texas, was attacked by the aliens. They have abducted some of the residents and taken them to the a spaceship orbiting
2011-02-26 20:28:00 1016
原创 1056 IMMEDIATE DECODABILITY //trie
<br />IMMEDIATE DECODABILITYTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 6973 Accepted: 3341<br />DescriptionAn encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symb
2011-02-26 19:24:00 551
原创 hdu 1251 统计难题//trie树
统计难题<br />Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131070/65535 K (Java/Others)<br />Total Submission(s): 6162 Accepted Submission(s): 2292<br /><br />Problem DescriptionIgnatius最近遇到一个难题,老师交给他很多单词(只有小写字母组成,不会有重复的单词出现),现在老师要他统计出以某个字符串为前缀的单
2011-02-26 16:37:00 610
原创 1035 Spell checker
<br />Spell checkerTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 10052 Accepted: 3713<br />DescriptionYou, as a member of a development team for a new spell checking program, are to write a module that will check the correctness of given words
2011-02-26 10:59:00 867
原创 1065 Wooden Sticks
<br />Wooden SticksTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 11769 Accepted: 4803<br />DescriptionThere 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
2011-02-25 19:47:00 2167
原创 1062 昂贵的聘礼 //枚举+最短路
昂贵的聘礼Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 18265 Accepted: 4869<br />Description年轻的探险家来到了一个印第安部落里。在那里他和酋长的女儿相爱了,于是便向酋长去求亲。酋长要他用10000个金币作为聘礼才答应把女儿嫁给他。探险家拿不出这么多金币,便请求酋长降低要求。酋长说:"嗯,如果你能够替我弄到大祭司的皮袄,我可以只要8000金币。如果你能够弄来他的水晶球,那么只要5000金币就行了。"探险
2011-02-25 16:29:00 608
原创 1018 Communication System
Communication SystemTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 14238 Accepted: 4987<br />DescriptionWe have received an order from Pizoor Communications Inc. for a special communication system. The system consists of several devices. For eac
2011-02-25 11:39:00 929
原创 1032 Parliament
ParliamentTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 12309 Accepted: 5124<br />DescriptionNew convocation of The Fool Land's Parliament consists of N delegates. According to the present regulation delegates should be divided into disjoint gr
2011-02-25 09:53:00 1030
原创 1083 Moving Tables
<br /> Moving TablesTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 15753 Accepted: 5146<br />DescriptionThe famous ACM (Advanced Computer Maker) Company has rented a floor of a building whose shape is in the following figure. <br /><br />The flo
2011-02-25 08:50:00 1092 1
原创 1094 Sorting It All Out//传递闭包+拓扑排序
Sorting It All OutTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 15391 Accepted: 5194DescriptionAn ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to larg
2011-02-24 21:32:00 682
原创 1042 Gone Fishing //贪心
Gone FishingTime Limit: 2000MSMemory Limit: 32768KTotal Submissions: 19059Accepted: 5368<br />DescriptionJohn is going on a fishing trip. He has h hours available (1 <= h <= 16), and there are n lakes in the area (2 <= n <= 25) all reachable
2011-02-24 17:19:00 1555
原创 1019 Number Sequence
Number SequenceTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 22588Accepted: 6019<br />DescriptionA single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2.
2011-02-24 15:19:00 674
原创 1013 Counterfeit Dollar
Counterfeit DollarTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 27942Accepted: 8742<br />DescriptionSally Jones has a dozen Voyageur silver dollars. However, only eleven of the coins are true silver dollars; one coin is counterfeit e
2011-02-24 11:28:00 866
原创 1017 Packets
PacketsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 28741Accepted: 9462<br />DescriptionA factory produces products packed in square packets of the same height h and of the sizes 1*1, 2*2, 3*3, 4*4, 5*5, 6*6. These products are al
2011-02-24 10:07:00 1187
转载 位运算简介及实用技巧(一):基础篇
<br />转自Matrix67<br /> <br /> <br />去年年底写的关于位运算的日志是这个Blog里少数大受欢迎的文章之一,很多人都希望我能不断完善那篇文章。后来我看到了不少其它的资料,学习到了更多关于位运算的知识,有了重新整理位运算技巧的想法。从今天起我就开始写这一系列位运算讲解文章,与其说是原来那篇文章的follow-up,不如说是一个remake。当然首先我还是从最基础的东西说起。<br /><br />什么是位运算?<br /> 程序中的所有数在计算机内存中都是以二进制的形式
2011-02-17 11:15:00 1011
原创 2773 Happy 2006 //欧拉函数的应用
Happy 2006Time Limit: 3000MS Memory Limit: 65536KTotal Submissions: 5258 Accepted: 1576<br />DescriptionTwo positive integers are said to be relatively prime to each other if the Great Common Divisor (GCD) is 1. For instance, 1, 3, 5, 7, 9...are all relati
2011-02-14 10:32:00 988
原创 2478 Farey Sequence //欧拉函数
Farey SequenceTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 7076 Accepted: 2610<br />DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1 arranged in
2011-02-13 17:28:00 674
原创 1026 Cipher //置换群
CipherTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 13690 Accepted: 3460<br />DescriptionBob and Alice started to use a brand-new encoding scheme. Surprisingly it is not a Public Key Cryptosystem, but their encoding and decoding is based on sec
2011-02-13 15:34:00 1376
原创 3270 Cow Sorting //利用置换排序
Cow SortingTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 3610 Accepted: 1196<br />Description<br />Farmer John's N (1 ≤ N ≤ 10,000) cows are lined up to be milked in the evening. Each cow has a unique "grumpiness" level in the range 1...100,000
2011-02-13 13:28:00 3066 1
原创 1286 Necklace of Beads
Necklace of BeadsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 3389 Accepted: 1417<br />DescriptionBeads of red, blue or green colors are connected together into a circular necklace of n beads ( n < 24 ). If the repetitions that are produced by
2011-02-13 10:27:00 835
原创 2154 Color//POLYA
ColorTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 2967 Accepted: 1016<br />DescriptionBeads of N colors are connected together into a circular necklace of N beads (N<=1000000000). Your job is to calculate how many different kinds of the neckla
2011-02-13 09:41:00 699
原创 2409 Let it Bead //polya 定理
Let it BeadTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 2209 Accepted: 1363<br />Description"Let it Bead" company is located upstairs at 700 Cannery Row in Monterey, CA. As you can deduce from the company name, their business is beads. Their P
2011-02-12 16:09:00 911
原创 zoj 1850 Factovisors
<br /> FactovisorsTime Limit: 1 Second Memory Limit: 32768 KB<br />The factorial function, n! is defined thus for n a non-negative integer: <br /><br />0! = 1<br />n! = n * (n - 1)! (n > 0)<br />We say that a divides b if there exists an integer k s
2011-02-08 18:15:00 886
原创 zoj 1222 Just the Facts
<br />Just the FactsTime Limit: 1 Second Memory Limit: 32768 KBThe expression N!, read as "N factorial," denotes the product of the first N positive integers, where N is nonnegative. So, for example,<br />N N! <br />0 1 <br />1 1 <br />2 2 <br /
2011-02-08 13:57:00 1984 1
原创 poj 1150 The Last Non-zero Digit
<br />The Last Non-zero DigitTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 3137 Accepted: 840<br />DescriptionIn this problem you will be given two decimal integer number N, M. You will have to find the last non-zero digit of the NPM.This m
2011-02-08 13:21:00 1283
原创 poj 2891 Strange Way to Express Integers 中国剩余定理
<br />Strange Way to Express IntegersTime Limit: 1000MS Memory Limit: 131072KTotal Submissions: 4191 Accepted: 1100<br />Description<br /> Elina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. Th
2011-02-07 15:46:00 2371 1
转载 扩展欧几里德算法 线性同余方程 中国剩余定理
<br /><br />链接地址:http://hi.baidu.com/%B1%BF%D0%A1%BA%A2_shw/blog/item/0676025d56a87d4afbf2c093.html<br />对这位作者表示感谢<br /> <br />哎呀,经过这两三天的奋斗,终于搞懂了一类问题——用扩展欧几里德算法求解线性同余方程。其实这类问题应该是比较基础也比较简单的,但我由于几乎没有一点数论的基础,所以还是难为了我不久,等现在彻底搞明白以后再看真的觉得是挺简单的,有关这类问题的题目也不是很多,我就做
2011-02-07 14:45:00 947
原创 POJ 2115 C Looooops
<br />C LooooopsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 9301 Accepted: 2117<br />DescriptionA Compiler Mystery: We are given a C-language style for loop of type <br />for (variable = A; variable != B; variable += C)<br /> statement;<
2011-02-07 13:50:00 1327
原创 zoj 2657 Appointment 扩展欧几里得
<br /> AppointmentTime Limit: 1 Second Memory Limit: 32768 KB <br />Two crickets gets know with each other on freecity bbs. They feel very happy chatting with each other, so they want to meet the other. Fortunately, they find they both live the
2011-02-07 11:22:00 1099
原创 BUPT 1501 多彩瓜 并查集
<br /> <br />多彩瓜Submit: 1325 Accepted:318Time Limit: 2000MS Memory Limit: 65535KDescription<br /> dalong的舅舅最近到外地旅游时给dalong带回来一种神奇的水果:多彩瓜。这种瓜太漂亮了,它有很多层,每一层都是一种颜色。由于多彩瓜放久了会变坏,dalong决定每天吃一层,可是多彩瓜有好多层,每天吃一层的话还没吃完多彩瓜就坏了,因为多彩瓜颜色很多,dalong把一些很相近的颜色认为是同一种颜色
2011-02-04 22:02:00 806
原创 poj 1061 青蛙的约会
<br /><br />有些数学题都忘了怎么做了,重新做!青蛙的约会Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 56311 Accepted: 8537<br />Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为止。可是它们出发之前忘记了一件很重要的事情,既没有问清楚对方的特征,也没有约定见面的具体位置。不过青蛙们都是很乐观的,
2011-02-04 20:58:00 541
原创 hdu 1005 矩阵乘法
<br /> Number Sequence<br />Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)<br />Total Submission(s): 37082 Accepted Submission(s): 7790<br />Problem DescriptionA number sequence is defined as follows:<br /><br
2011-02-04 15:37:00 1406
原创 hdu A + B Problem II
<br />A + B Problem IITime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)<br />Total Submission(s): 71329 Accepted Submission(s): 13022<br /><br /><br />Problem DescriptionI have a very simple problem for you. Given
2011-02-03 18:50:00 1693
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人