- 博客(18)
- 收藏
- 关注
原创 【图论】【RQNOJ】产生数
<br />题目描述<br /> 给出一个整数 n(n<10^30) 和 k 个变换规则(k<=15)。<br /> 规则:<br /> 一位数可变换成另一个一位数:<br /> 规则的右部不能为零。<br /> 例如:n=234。有规则(k=2):<br /> 2-> 5<br /> 3-> 6<br /> 上面的整数 234 经过变换后可能产生出的整数为(包括原数):<br /> 234<br /> 534<br /> 264<br /> 564<br />
2010-06-30 14:17:00 2004 1
原创 【C++学习】关于unsigned long long的输出问题
<br />VC 6 / MinGW G++ v3.x 用%I64d / %I64u否则用%lld / %llu
2010-06-25 18:13:00 7367
原创 【搜索】【USACO】Overfencing
<br />Farmer John went crazy and created a huge maze of fences out in a field. Happily, he left out two fence segments on the edges, and thus created two "exits" for the maze. Even more happily, the maze he created by this overfencing experience is a `perf
2010-06-15 11:24:00 971
原创 【其他】【USACO】The Tamworth Two
<br />A pair of cows is loose somewhere in the forest. Farmer John is lending his expertise to their capture. Your task is to model their behavior. <br />The chase takes place on a 10 by 10 planar grid. Squares can be empty or they can contain: an obstacle
2010-06-15 07:39:00 704
原创 【其他】【USACO】Controlling Companies
<br />Some companies are partial owners of other companies because they have acquired part of their total shares of stock. For example, Ford owns 12% of Mazda. It is said that a company A controls company B if at least one of the following conditions is sa
2010-06-14 17:56:00 610
原创 【动态规划】【USACO】Money Systems
<br />The cows have not only created their own government but they have chosen to create their own money system. In their own rebellious way, they are curious about values of coinage. Traditionally, coins come in values like 1, 5, 10, 20 or 25, 50, and 100
2010-06-14 15:08:00 1287
原创 【其他】【USACO】Zero Sum
<br />Consider the sequence of digits from 1 through N (where N=9) in increasing order: 1 2 3 ... N. <br />Now insert either a `+' for addition or a `-' for subtraction or a ` ' [blank] to run the digits together between each pair of digits (not in front o
2010-06-14 11:36:00 1043
原创 【动态规划】【USACO】Cow Pedigrees
<br /> <br />Farmer John is considering purchasing a new herd of cows. In this new herd, each mother cow gives birth to two children. The relationships among the cows can easily be represented by one or more binary trees with a total of N (3 <= N < 2
2010-06-14 11:03:00 1286
原创 【其他】【USACO】Party Lamps
<br />To brighten up the gala dinner of the IOI'98 we have a set of N (10 <= N <= 100) colored lamps numbered from 1 to N. <br />The lamps are connected to four buttons: <br /> Button 1: When this button is pressed, all the lamps change their state: those
2010-06-11 17:45:00 797
原创 【其他】【USACO】Runaround Numbers
Runaround numbers are integers with unique digits, none of which is zero (e.g., 81362) that also have an interesting property, exemplified by this demonstration: If you start at the left digit (8 in our number) and count that number of digits to the right
2010-06-11 07:33:00 978
原创 【动态规划】【USACO】Subset Sums
<br />For many sets of consecutive integers from 1 through N (1 <= N <= 39), one can partition the set into two sets whose sums are identical. <br />For example, if N=3, one can partition the set {1, 2, 3} in one way so that the sums of both subsets are id
2010-06-10 21:27:00 2050
原创 【搜索】【USACO】Preface Numbering
<br />A certain book's prefaces are numbered in upper case Roman numerals. Traditional Roman numeral values use a single letter to represent a certain subset of decimal numbers. Here is the standard set: I 1 L 50 M 1000 V 5
2010-06-10 18:12:00 1022
原创 【搜索】【USACO】Hamming Codes
<br />Given N, B, and D: Find a set of N codewords (1 <= N <= 64), each of length B bits (1 <= B <= 8), such that each of the codewords is at least Hamming distance of D (1 <= D <= 7) away from each of the other codewords. The Hamming distance between a pa
2010-06-10 17:42:00 587
原创 【搜索】【USACO】Healthy Holsteins
<br />Farmer John prides himself on having the healthiest dairy cows in the world. He knows the vitamin content for one scoop of each feed type and the minimum daily vitamin requirement for the cows. Help Farmer John feed his cows so they stay healthy whil
2010-06-10 17:15:00 1509
原创 【其他】【USACO】Ordered Fractions
<br />Consider the set of all reduced fractions between 0 and 1 inclusive with denominators less than or equal to N. <br />Here is the set when N = 5: 0/1 1/5 1/4 1/3 2/5 1/2 3/5 2/3 3/4 4/5 1/1<br />Write a program that, given an integer N between 1 and
2010-06-10 15:33:00 1074
原创 【图论】【USACO】The Castle
<br />In a stroke of luck almost beyond imagination, Farmer John was sent a ticket to the Irish Sweepstakes (really a lottery) for his birthday. This ticket turned out to have only the winning number for the lottery! Farmer John won a fabulous castle in th
2010-06-10 15:10:00 2024 1
原创 【搜索】【USACO】Checker Challenge
Examine the 6x6 checkerboard below and note that the six checkers are arranged on the board so that one and only one is placed in each row and each column, and there is never more than one in any diagonal. (Diagonals run from southeast to northwest and sou
2010-06-10 07:31:00 496
原创 【想想想】期末考之前
<br />高二就要过去了啊~ <br />经历了好多东西 APIO 盐酸什么什么片 甲流 还有些想不起来的东西 ……<br /> <br />明天就是期末考试了 比别的学校都要早呢。然后就步入了高三。<br /> <br />仿佛高二没弄出什么成就就过去了啊……放假可以在家四天,计划做三十多套题,要完成啊seve。<br /> <br />期末考……前两次不知道怎么人品爆发了,竟然都是前一百,可是班里都考得很烂。<br /> <br />找到自己高一之前用的博客,发现那时候好开朗啊~<br /> <br
2010-06-01 18:25:00 470
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人