摘要:
Runaround NumbersRunaround numbers are integers with unique digits, none of which is zero (e.g., 81362) that also have an interesting property, exempl... 阅读全文
摘要:
Preface NumberingA certain book's prefaces are numbered in upper case Roman numerals. Traditional Roman numeral values use a single letter to represen... 阅读全文
摘要:
Hamming CodesRob KolstadGiven N, B, and D: Find a set of N codewords (1 7 #include 8 #include 9 using namespace std;10 int n,m,d,cnt=1;11 int topnum=... 阅读全文
摘要:
Healthy HolsteinsBurch & KolstadFarmer John prides himself on having the healthiest dairy cows in the world. He knows the vitamin content for one scoo... 阅读全文
摘要:
Sorting a Three-Valued SequenceIOI'96 - Day 2Sorting is one of the most frequently performed computational tasks. Consider the special sorting problem... 阅读全文
摘要:
Ordered FractionsConsider the set of all reduced fractions between 0 and 1 inclusive with denominators less than or equal to N.Here is the set when N ... 阅读全文
摘要:
The CastleIOI'94 - Day 1In a stroke of luck almost beyond imagination, Farmer John was sent a ticket to the Irish Sweepstakes (really a lottery) for h... 阅读全文
摘要:
Superprime RibButchering Farmer John's cows always yields the best prime rib. You can tell prime ribs by looking at the digits lovingly stamped across... 阅读全文
摘要:
Prime PalindromesThe number 151 is a prime palindrome because it is both a prime number and a palindrome (it is the same number when read forward as b... 阅读全文