CC

自然万物都趋向从有序变得无序

0%

[题目链接](http://poj.org/problem?id=2409)

题目


这里写图片描述

"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 PR department found out that customers are interested in buying colored bracelets. However, over 90 percent of the target audience insists that the bracelets be unique. (Just imagine what happened if two women showed up at the same party wearing identical bracelets!) It's a good thing that bracelets can have different lengths and need not be made of beads of one color. Help the boss estimating maximum profit by calculating how many different bracelets can be produced.
阅读全文 »

[题目链接](http://acm.hdu.edu.cn/showproblem.php?pid=6038)

题目


You are given a permutation a from 0 to n−1 and a permutation b from 0 to m−1.
Define that the domain of function f is the set of integers from 0 to n−1, and the range of it is the set of integers from 0 to m−1.
Please calculate the quantity of different functions f satisfying that f(i)=bf(ai) for each i from 0 to n−1.

阅读全文 »

题目链接

题目


这里写图片描述

Talented Mr.Tang has n strings consisting of only lower case characters. He wants to charge them with Balala Power (he could change each character ranged from a to z into each number ranged from 0 to 25, but each two different characters should not be changed into the same number) so that he could calculate the sum of these strings as integers in base 26 hilariously.

阅读全文 »

题目链接

题目


 Michael takes the Discrete Mathematics course in this semester. Now it's close to the final exam, and he wants to take a complete review of this course.

The whole book he needs to review has N chapter, because of the knowledge system of the course is kinds of discrete as its name, and due to his perfectionism, he wants to arrange exactly N days to take his review, and one chapter by each day.
阅读全文 »

题目链接

题目


 Because of the sucessfully calculation in Under Attack I, Doctor is awarded with Courage Cross and promoted to lieutenant. But the war seems to end in never, now Doctor has a new order to help anti-aircraft troops calculate the proper number of supply sites needed for SAMs in battle regions.
阅读全文 »

题目链接

题目


An undirected graph is a set V of vertices and a set of E∈{V*V} edges.An undirected graph is connected if and only if for every pair (u,v) of vertices,u is reachable from v.
You are to write a program that tries to calculate the number of different connected undirected graph with n vertices.
For example,there are 4 different connected undirected graphs with 3 vertices.

阅读全文 »

题目链接

题目


 Because of recent update of ZOJ, some special judges were broken. You're requested to fix the special judge for Problem 9999.

In Problem 9999, there is only one case in where the standard output is two real number x and y. The special judge uses two parameters: one is the sum of the two numbers in standard output (x and y); the other is the sum of the two numbers in the output of submitted solution (p and q). If the absolute value of the difference of these two parameters does not exceed k, the submitted solution will be accepted.
阅读全文 »

题目链接

题目


Write a program to convert numbers in one base to numbers in a second base. There are 62 different digits:
{ 0-9,A-Z,a-z }
HINT: If you make a sequence of base conversions using the output of one conversion as the input to the next, when you get back to the original base, you should get the original number.
阅读全文 »

题目链接:

题目


Given a set of points with integer coordinates xi, yi, i = 1…N, your program must find all the squares having each of four vertices in one of these points.

Input

Input file contains integer N followed by N pairs of integers xi yi.
Constraints
-104 ≤ xi, yi ≤ 104, 1 ≤ N ≤ 2000. All points in the input are different.

阅读全文 »