Tags: refresh Principle Ultraviolet A 4683 This question refers to a set with a maximum of 12 elements. Find the nth number that can only be divided by one of the sets and only one number. (N I did this by using the refresh principle. First, we will accumulate the number of elements that can be divisible by each number. Of course, there will be duplicates. If a number is composed of two numbers in a set, it must be an integer multiple of all t
Label: style HTTP color Io OS AR for SP on
Link to the question: Ultraviolet A 11354-Bond
Given a graph, each time you ask the minimum value of the dangerous value of the crossing edge on two node paths.
Solution: first, create the minimum number of generations, and then split the tree chains based on the tree.
#include
Ultraviolet A 11354-bond (tree link Division)
Label: ACM algorithm DP Algorithm
Ultraviolet A 10306 e-coins (full backpack: Two-Dimensional restrictions)
Http://uva.onlinejudge.org/index.php? Option = com_onlinejudge Itemid = 8 page = show_problem problem = 1247
Question:
For each example, two numbers N and m are given, respectively, indicating that there are n kinds of coins. For each coin, there are two values: x, y, the question requires you to select some coins to satisfy M * m = x
Link to the question: Ultraviolet 11374 Airport Express
Airport Express
Time limit:1000 ms
Memory limit:Unknown
64bit Io format:% LLD % LlU
[Submit] [Go Back] [Status]
Description
Problem D: Airport Express
In a small city called iokh, a train service,Airport-Express, Takes residents to the airport more quickly than other transports. There are two types of trains in airport-Express,Economy-xpre
Ultraviolet A 10888-Warehouse
Question Link
It is a box-pushing game. It takes at least a few steps to ask.
Idea: Create an edge for each box and target location, and set the weight value to negative weight. Then perform a perfect match for the bipartite graph. Note that the location weight cannot be reached should be set to the minimum value.
Code:
#include
Ultraviolet A 10888-warehouse (perfect match
Ultraviolet A 12125-March of the Penguins
Question Link
Given some ice cubes, each ice cube has some penguins. Each ice cube has a limit on the number of jumps. Each Ice Cube is in a coordinate. Now, every penguin jumps to D, ask all penguins if they can jump to a point. If they can output all the frozen ice cubes, print-1 if there is no solution.
Idea: Maximum stream. Split points indicate the limit on the number of ice cubes, and then enumerate the
Ultraviolet A 1486-transportation
Question Link
A directed graph carries K goods, with some sides, each side having a coefficient A. If there is X goods on the side, you have to pay the money of a X, minimum transportation cost from 1 to n
Idea: The cost flow. The maximum capacity of this question side is only 5. Therefore, you can split the edge, one side into a C side, and each line has a capacity of 1, the corresponding cost is a * (I ^ 2-(I-1) ^ 2
Label: style HTTP color Io OS AR for SP on Ultraviolet A 11280-flying to Fredericton Question Link Question: given the cost between some countries and two countries, I have some questions about the minimum cost of transferring a maximum of K flights each time. Train of Thought: Dijkstra deformation. If you open one dimension more, it means the number of connections. Code: # Include Ultraviolet A 1128
Ultraviolet A 11853-paintball
Question Link
It is to give some circles and determine whether they can go from the left to the right without passing through these circles. If you can ask the start and end positions to the north as far as possible, the output position
Idea: Every time I find a circle DFS that exceeds the upper boundary, if it can reach the lower boundary, it will be unable to reach the partition. If it is left and right boundary, I need
Label: style HTTP color Io OS AR for SP on Ultraviolet A 1395-slim Span Question Link Given some knots and edges, it is required to generate the tree with the smallest SLB degree. the SLB degree is defined as: the most powerful side in the Spanning Tree minus the value of the least weighted side. Idea: similar to the algorithm for creating the Minimum Spanning Tree, You can enumerate the start edge in one step. Code: # include
# include
Ultraviolet A 11732 strcmp () anyone? (Trie, right brother, left son)
ACM
Question address:Ultraviolet A 11732 strcmp () anyone?
Question:Question about strcmp Function==The statement is executed several times.
Analysis:Big white questions.I heard that I want to use trie from my left son and right brother to save space. I learned it by the way.Start to record the number of records first, and then traverse the statistics. The result is wrong...Later I
// Factovisors (factorial and division) // PC/Ultraviolet IDs: 110704/10139, popularity: A, success rate: average level: 2 // verdict: accepted // submission date: 2011-06-11 // UV Run Time: 0.312 S // copyright (c) 2011, Qiu. Metaphysis # Yeah dot net // The idea is relatively simple. Calculate the number M and number 2-n gcd. If GCD is greater than 1, m/= GCD, if the last M is not // 1, it indicates that M cannot divide N !, Note that the input may
// Slash maze (diagonal line maze) // PC/Ultraviolet IDs: 110904/705, popularity: B, success rate: average level: 2 // verdict: accepted // submission date: 2011-09-28 // UV Run Time: 0.012 S // copyright (c) 2011, Qiu. Metaphysis # Yeah dot net // [Problem description] // you can get a small maze by filling a rectangle with a slash (/) and a backslash (\). For example: //// (because gedit cannot insert an image, please refer to the image of the origi
// Ultraviolet A Problem 113-power of cryptography // verdict: accepted // submission date: 2011-11-25 // ultraviolet A Run Time: 0.312 S // All Rights Reserved (c) 2011, Qiu. Metaphysis # Yeah dot net // [solution] // This question can be classified as a high-precision arithmetic question. //// A simple large number operation. Use the template code. Use the binary method to search for K values. Is it bette
// Yahtzee (Yahtzee game) // PC/Ultraviolet IDs: 110208/10149, Popularity: C, Success rate: average Level: 3 // copyright ownership (C), Qiu, 2011. Metaphysis at yeah dot net // Verdict: Accepted // Submission Date: 2011-05-16 // ultraviolet A Run Time: 0.088 s // You can select any of the 13 scoring methods for each group of shards. The selected scoring method cannot be selected again. If each group of wor
Ultraviolet A 11637,
Link to the question: Ultraviolet A 11637-Garbage Remembering Exam
The answer to the question is very detailed in big white.
Solution: For an ordered sequence, consider the probability that each location is valid. C (2 then kn −1 −x) then A (2k2k) then A (n −1 −xn −1 −x) A (n −1n −1)X is the number of positions at which the distance from the current location is less than or equal to k.
Ultraviolet A 11256,
Link to the question: Ultraviolet A 11256-Repetitive Multiple
Given a number n, the minimum k must be found so that k limit n is the repeated number defined in the question.
Solution: enumerate the cycle length of k limit n. For example, if the current enumeration is 2, u = 1001,1001001, 1001001001 ..., take d = gcd (n, u), then k = u/d, a = n/d (because n ∗ k = u ∗ a) and ensure that t
Ultraviolet A 11317,
Link to the question: Ultraviolet A 11317-GCD + LCM
Given n, find 1 ~ The product GCD of the greatest convention in n and the product LCM of the least common multiple are the digits in the decimal system.
Solution: in the case of n, phi [n/I] times for the case where the maximum public approx. Is I. Calculate LCM and divide the product by GCD.
#include
Ultraviolet A 10526,
Link to the question: Ultraviolet A 10526-Intellectual Property
Given two texts, I would like to explain where the following text copied the previous one and output n plagiarism locations (if less than n copies are all output ), output is prioritized by length, with the same length at the top.Note: space indicates that the carriage return is a single character. A segment of characters c
(White Book Training Program) ultraviolet A 11134 Fabled Rooks (Greedy), 11134 fabled
Subject address: Ultraviolet A 11134
This is because the rows and columns are irrelevant and have no impact on each other. Therefore, you can separate rows or columns for calculation. This is equivalent to converting to selecting n different integers in the period [1, n], so that the I-th integer is within the Closed range
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.