10 2009 档案

摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 3965Accepted: 1505Special JudgeDescriptionMy birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N o... 阅读全文
posted @ 2009-10-31 23:33 Weiyu Wang 阅读(771) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 4863Accepted: 1058DescriptionWhen a thin rod of length L is heated n degrees, it expands to a new length L'=(1+n*C)*L, where C is the coefficie... 阅读全文
posted @ 2009-10-30 05:22 Weiyu Wang 阅读(711) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 1798Accepted: 784DescriptionEvery year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from ro... 阅读全文
posted @ 2009-10-28 02:41 Weiyu Wang 阅读(902) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 4105Accepted: 1620DescriptionFarmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has ... 阅读全文
posted @ 2009-10-28 00:02 Weiyu Wang 阅读(1136) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6358Accepted: 1384DescriptionA Compiler Mystery: We are given a C-language style for loop of type for (variable = A; variable != B; variable +=... 阅读全文
posted @ 2009-10-26 06:32 Weiyu Wang 阅读(1102) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 4943Accepted: 1047DescriptionConsider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (th... 阅读全文
posted @ 2009-10-24 02:58 Weiyu Wang 阅读(692) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4166Accepted: 1652DescriptionThis problem is based on an exercise of David Hilbert, who pedagogically suggested that one study the theory of 4n... 阅读全文
posted @ 2009-10-22 06:18 Weiyu Wang 阅读(731) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 5907Accepted: 1402DescriptionThe young and very promising cryptographer Odd Even has implemented the security module of a large system with tho... 阅读全文
posted @ 2009-10-19 07:01 Weiyu Wang 阅读(819) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 9478Accepted: 2376DescriptionImagine you are attending your math lesson at school. Once again, you are bored because your teacher tells things ... 阅读全文
posted @ 2009-10-17 02:46 Weiyu Wang 阅读(1057) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 17288Accepted: 4563DescriptionA single positive integer i is given. Write a program to find the digit located in the position i in the sequence... 阅读全文
posted @ 2009-10-17 02:13 Weiyu Wang 阅读(863) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 3153Accepted: 1414DescriptionTransmitting and memorizing information is a task that requires different coding systems for the best use of the a... 阅读全文
posted @ 2009-10-16 06:33 Weiyu Wang 阅读(803) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 2812Accepted: 877DescriptionThe cows, as you know, have no fingers or thumbs and thus are unable to play Scissors, Paper, Stone' (also known as... 阅读全文
posted @ 2009-10-16 05:13 Weiyu Wang 阅读(1177) 评论(1) 推荐(0)
摘要:Time Limit: 3000MSMemory Limit: 65536KTotal Submissions: 26714Accepted: 8915DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right... 阅读全文
posted @ 2009-10-14 12:09 Weiyu Wang 阅读(791) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 8125Accepted: 4497DescriptionIt is well known that a human gene can be considered as a sequence, consisting of four nucleotides, which are simp... 阅读全文
posted @ 2009-10-14 11:05 Weiyu Wang 阅读(798) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5823Accepted: 3802DescriptionThe cows don't use actual bowling balls when they go bowling. They each take a number (in the range 0..99), though... 阅读全文
posted @ 2009-10-13 13:25 Weiyu Wang 阅读(487) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 12078Accepted: 5098DescriptionA numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequ... 阅读全文
posted @ 2009-10-13 12:29 Weiyu Wang 阅读(860) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 2595Accepted: 1198DescriptionIn Pearlania everybody is fond of pearls. One company, called The Royal Pearl, produces a lot of jewelry with pear... 阅读全文
posted @ 2009-10-13 12:18 Weiyu Wang 阅读(649) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 3283Accepted: 963DescriptionIn the army, a platoon is composed by n soldiers. During the morning inspection, the soldiers are aligned in a stra... 阅读全文
posted @ 2009-10-13 10:59 Weiyu Wang 阅读(780) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 2856Accepted: 1252DescriptionFew know that the cows have their own dictionary with W (1 ≤ W ≤ 600) words, each containing no more 2... 阅读全文
posted @ 2009-10-13 09:34 Weiyu Wang 阅读(977) 评论(1) 推荐(0)
摘要:from http://imlazy.ycool.com/post.1603708.html 什么是二分图,什么是二分图的最大匹配,这些定义我就不讲 了,网上随便都找得到。二分图的最大匹配有两种求法,第一种是最大流(我在此假设读者已有网络流的知识);第二种就是我现在要讲的匈牙利算法。这个算法说 白了就是最大流的算法,但是它跟据二分图匹配这个问题的特点,把最大流算法做了简化,提高了效率。匈牙利算法其... 阅读全文
posted @ 2009-10-13 07:24 Weiyu Wang 阅读(750) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 9109Accepted: 3052DescriptionA Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate @ bills for a re... 阅读全文
posted @ 2009-10-13 02:27 Weiyu Wang 阅读(1206) 评论(2) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 30000KTotal Submissions: 2538Accepted: 1384DescriptionGigel has a strange "balance" and he wants to poise it. Actually, the device is different from any other ordinary ... 阅读全文
posted @ 2009-10-12 09:25 Weiyu Wang 阅读(1048) 评论(1) 推荐(1)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 4872Accepted: 2507DescriptionWhen a radio station is broadcasting over a very large area, repeaters are used to retransmit the signal so that e... 阅读全文
posted @ 2009-10-12 02:39 Weiyu Wang 阅读(1208) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 5414Accepted: 2567Special JudgeDescriptionSudoku is a very simple task. A square table with 9 rows and 9 columns is divided to 9 smaller square... 阅读全文
posted @ 2009-10-11 14:43 Weiyu Wang 阅读(1224) 评论(0) 推荐(0)
摘要:Time Limit: 1000MS  Memory Limit: 10000KTotal Submissions: 1307  Accepted: 764DescriptionYou have just been put in charge of developing a new shredder for the Shredding Company Alt... 阅读全文
posted @ 2009-10-11 13:01 Weiyu Wang 阅读(389) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 3311Accepted: 1346DescriptionA university network is composed of N computers. System administrators gathered information on the traffic between... 阅读全文
posted @ 2009-10-11 10:19 Weiyu Wang 阅读(926) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2779Accepted: 1167Special JudgeDescriptionYou are given two pots, having the volume of A and B liters respectively. The following operations ca... 阅读全文
posted @ 2009-10-11 05:09 Weiyu Wang 阅读(663) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 3134Accepted: 1911DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would al... 阅读全文
posted @ 2009-10-11 03:45 Weiyu Wang 阅读(1499) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 4446Accepted: 1908Special JudgeDescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of n whose decimal repre... 阅读全文
posted @ 2009-10-11 00:54 Weiyu Wang 阅读(913) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 13066Accepted: 3968DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at ... 阅读全文
posted @ 2009-10-10 23:33 Weiyu Wang 阅读(991) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5685Accepted: 2256DescriptionYou are trapped in a 3D dungeon and need to find the quickest way out! The dungeon is composed of unit cubes which... 阅读全文
posted @ 2009-10-10 13:04 Weiyu Wang 阅读(662) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 6342Accepted: 3061Description在一个给定形状的棋盘(形状可能是不规则的)上面摆放棋子,棋子没有区别。要求摆放时任意的两个棋子不能放在棋盘中的同一行或者同一列,请编程求解对于给定形状和大小的棋盘,摆放k个棋子的所有可行的摆放方案C。Input输入含有多组测试数... 阅读全文
posted @ 2009-10-10 12:12 Weiyu Wang 阅读(405) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2792Accepted: 1127DescriptionOn Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat diffe... 阅读全文
posted @ 2009-10-10 11:44 Weiyu Wang 阅读(617) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2934Accepted: 1418DescriptionThe cornfield maze is a popular Halloween treat. Visitors are shown the entrance and must wander through the maze ... 阅读全文
posted @ 2009-10-10 10:36 Weiyu Wang 阅读(946) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7832Accepted: 2671DescriptionBackground The knight is getting bored of seeing the same black and white squares again and again and has decided ... 阅读全文
posted @ 2009-10-10 07:05 Weiyu Wang 阅读(1519) 评论(1) 推荐(0)
摘要:Time Limit: 5000MSMemory Limit: 128000KTotal Submissions: 13696Accepted: 3384DescriptionYou are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible t... 阅读全文
posted @ 2009-10-10 03:53 Weiyu Wang 阅读(789) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 6104Accepted: 1892DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that h... 阅读全文
posted @ 2009-10-10 01:36 Weiyu Wang 阅读(978) 评论(0) 推荐(0)
摘要:Time Limit: 3000MSMemory Limit: 65536KTotal Submissions: 12536Accepted: 5529DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign l... 阅读全文
posted @ 2009-10-09 13:22 Weiyu Wang 阅读(1428) 评论(0) 推荐(1)
摘要:Time Limit: 3500MSMemory Limit: 65536KTotal Submissions: 6320Accepted: 2024DescriptionA square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a... 阅读全文
posted @ 2009-10-09 11:30 Weiyu Wang 阅读(872) 评论(0) 推荐(0)
摘要:Time Limit: 5000MSMemory Limit: 65536KTotal Submissions: 3409Accepted: 1514DescriptionConsider equations having the following form: a1x13+ a2x23+ a3x33+ a4x43+ a5x53=0 The coefficients are given integ... 阅读全文
posted @ 2009-10-09 04:55 Weiyu Wang 阅读(406) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 1015Accepted: 391DescriptionOrganizing a programming contest is not an easy job. To avoid making the problems too difficult, the organizer usua... 阅读全文
posted @ 2009-10-09 02:45 Weiyu Wang 阅读(575) 评论(0) 推荐(0)
摘要:Hash Tablehash function1. for(int j=0; j<K; ++j)   key=((key<<2)+(cnt[j]>>4))^(cnt[j]<<10);2. z = cnt.size()for(int j=0; j < K; ++j)   z = 3179(质数)* z + cn... 阅读全文
posted @ 2009-10-08 09:55 Weiyu Wang 阅读(855) 评论(2) 推荐(1)
摘要:hash tableDescriptionYou may have heard that no two snowflakes are alike. Your task is to write a program to determine whether this is really true. Your program will read information about a collectio... 阅读全文
posted @ 2009-10-08 06:20 Weiyu Wang 阅读(520) 评论(1) 推荐(0)
摘要:并查集DescriptionThere are so many different religions in the world today that it is difficult to keep track of them all. You are interested in finding out how many different religions students in your u... 阅读全文
posted @ 2009-10-08 03:53 Weiyu Wang 阅读(301) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2236Accepted: 1038DescriptionThe Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets... 阅读全文
posted @ 2009-10-07 10:11 Weiyu Wang 阅读(454) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4468Accepted: 2319DescriptionBessie wants to navigate her spaceship through a dangerous asteroid field in the shape of an N x N grid (1 <= N... 阅读全文
posted @ 2009-10-06 09:02 Weiyu Wang 阅读(706) 评论(0) 推荐(0)
摘要:拓扑排序DescriptionAn 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 largest. For example, the sorted sequenc... 阅读全文
posted @ 2009-10-04 05:34 Weiyu Wang 阅读(863) 评论(0) 推荐(0)
摘要:Time Limit: 7000MSMemory Limit: 65536KTotal Submissions: 12873Accepted: 4518DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n dist... 阅读全文
posted @ 2009-10-02 00:10 Weiyu Wang 阅读(913) 评论(0) 推荐(0)
摘要:brute force用第一个字符串从长到短生成所有的子串, 并和其他字符串匹配。DescriptionThe Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands o... 阅读全文
posted @ 2009-10-01 13:22 Weiyu Wang 阅读(513) 评论(0) 推荐(0)
摘要:brutal force1. 生成字典, 并按长度排序。2. 对于给定单词, 取得区间 [单词长度 - 1, 单词长度 + 1], 并匹配。3. 如果存在完全匹配的单词, 打印输出, 否则把可能的单词放到集合中。DescriptionYou, as a member of a development team for a new spell checking program, are to wri... 阅读全文
posted @ 2009-10-01 12:29 Weiyu Wang 阅读(831) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2598Accepted: 793DescriptionThe Borg is an immensely powerful race of enhanced humanoids from the delta quadrant of the galaxy. The Borg collec... 阅读全文
posted @ 2009-10-01 10:00 Weiyu Wang 阅读(836) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 11276Accepted: 4707DescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity t... 阅读全文
posted @ 2009-10-01 04:11 Weiyu Wang 阅读(361) 评论(0) 推荐(0)
摘要:Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6912Accepted: 3284DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is... 阅读全文
posted @ 2009-10-01 02:22 Weiyu Wang 阅读(656) 评论(0) 推荐(0)
摘要:Time Limit: 2000MSMemory Limit: 65536KTotal Submissions: 5256Accepted: 1851DescriptionAdvanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other f... 阅读全文
posted @ 2009-10-01 01:43 Weiyu Wang 阅读(675) 评论(0) 推荐(0)