摘要:
Given two positive integers a and b,find suitable X and Y to meet the conditions: X+Y=a Least Common Multiple (X, Y) =bInputInput includes multiple se 阅读全文
摘要:
We have a special convex that all points have the same distance to origin point. As you know we can get N segments after linking the origin point and 阅读全文
摘要:
A box contains black balls and a single red ball. Alice and Bob draw balls from this box without replacement, alternating after each draws until the r 阅读全文
摘要:
In this problem, we will define a graph called star graph, and the question is to find the minimum distance between two given nodes in the star graph. 阅读全文
摘要:
There are nnn rectangles on the plane. The problem is to find the area of the union of these rectangles. Note that these rectangles might overlap with 阅读全文
摘要:
Let SSS be a sequence of integers s1s_{1}s1, s2s_{2}s2, ........., sns_{n}sn Each integer is is associated with a weight by the following rul 阅读全文
摘要:
You are given a list of train stations, say from the station 111 to the station 100100100. The passengers can order several tickets from one station t 阅读全文
摘要:
描述 You are given a list of integers a0, a1, …, a2^k-1. You need to support two types of queries: 1. Output Minx,y∈[l,r] {ax∙ay}. 2. Let ax=y. 输入 The f 阅读全文
摘要:
描述 Ming is going to travel for n days and the date of these days can be represented by n integers: 0, 1, 2, …, n-1. He plans to spend m consecutive da 阅读全文