09 2013 档案
摘要:The cows have reconstructed Farmer John's farm, with its N barns (1 6 #include 7 #include 8 #include 9 #include10 using namespace std;11 #define INF 0x3f3f3f3f12 struct node13 {14 int v,next;15 }e[1001];16 int head[1001],I;17 int dp[181][181][181];18 int ch[1001],n,p,i;19 int a,b,res;20 int mi..
阅读全文
摘要:Problem DescriptionKeeping track of all the cows can be a tricky task so Farmer John has installed a system to automate it. He has installed on each cow an electronic ID tag that the system will read as the cows pass by a scanner. Each ID tag's contents are currently a single string with length
阅读全文
摘要:Problem DescriptionSeiji Hayashi had been a professor of the Nisshinkan Samurai School in the domain of Aizu for a long time in the 18th century. In order to reward him for his meritorious career in education, Katanobu Matsudaira, the lord of the domain of Aizu, had decided to grant him a rectangula
阅读全文
摘要:Problem DescriptionIn the new ACM-ICPC Regional Contest, a special monitoring and submitting system will be set up, and students will be able to compete at their own universities. However there’s one problem. Due to the high cost of the new judging system, the organizing committee can only afford to
阅读全文
摘要:Problem DescriptionN cities named with numbers 1 ... N are connected with one-way roads. Each road has two parameters associated with it : the road length and the toll that needs to be paid for the road (expressed in the number of coins). Bob and Alice used to live in the city 1. After noticing that
阅读全文
摘要:Problem DescriptionSquares and rectangles fascinated the famous Dutch painter Piet Mondriaan. One night, after producing the drawings in his 'toilet series' (where he had to use his toilet paper to draw on, for all of his paper was filled with squares and rectangles), he dreamt of filling a
阅读全文
摘要:Problem DescriptionFarmer John has purchased a lush new rectangular pasture composed of M by N (1 ≤ M ≤ 12; 1 ≤ N ≤ 12) square parcels. He wants to grow some yummy corn for the cows on a number of squares. Regrettably, some of the squares are infertile and can't be planted. Canny FJ knows that t
阅读全文
摘要:1056. Computer NetTime limit: 2.0 second Memory limit: 64 MBBackgroundComputer net is created by consecutive computer plug-up to one that has already been connected to the net. Each new computer gets an ordinal number, but the protocol contains the number of its parent computer in the net. Thus, pro
阅读全文
摘要:1182. Team Them Up!Time limit: 1.0 second Memory limit: 64 MBYour task is to divide a number of persons into two teams, in such a way, that:everyone belongs to one of the teams;every team has at least one member;every person in the team knows every other person in his team;teams are as close in thei
阅读全文
摘要:1416. ConfidentialTime limit: 2.0 second Memory limit: 64 MBZaphod Beeblebrox — President of the Imperial Galactic Government. And by chance he is an owner of enterprises that trade in secondhand pens. This is a complicated highly protable and highly competitive business. If you want to stay a leade
阅读全文
摘要:DescriptionYou are to write a program that has to generate all possible words from a given set of letters. Example: Given the word "abc", your program should - by exploring all different combination of the three letters - output the words "abc", "acb", "bac",
阅读全文
摘要:Problem DescriptionIn Pearlania everybody is fond of pearls. One company, called The Royal Pearl, produces a lot of jewelry with pearls in it. The Royal Pearl has its name because it delivers to the royal family of Pearlania. But it also produces bracelets and necklaces for ordinary people. Of cours
阅读全文
摘要:Problem DescriptionA Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate @ bills for a requested cash amount. The machine uses exactly N distinct bill denominations, say Dk, k=1,N, and for each denomination Dk the machine has a supply of nk bills. For exam
阅读全文

浙公网安备 33010602011771号