Pat
文章平均质量分 80
Amber0130
这个作者很懒,什么都没留下…
展开
-
Pop Sequence
Given a stack which can keep MMM numbers at most. Push NNN numbers in the order of 1,2,3,...,N1, 2, 3, ..., N1,2,3,...,N and pop randomly. You are supposed to tell if a given sequence of numbers is a possible pop sequence of the stack. For example, if MMM原创 2021-01-24 12:35:28 · 64 阅读 · 0 评论 -
Battle Over Cities
It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we need to repair any other highways to keep the rest of the c原创 2021-01-22 19:19:10 · 62 阅读 · 0 评论 -
Maximum Subsequence Sum
Given a sequence of KKK integers {N1N_1N1,N2N_2N2,…NkN_kNk}. A continuous subsequence is defined to be {NiN_iNi,Ni+1N_{i+1}Ni+1,…NjN_jNj}where 1≤i≤j≤K1≤i≤j≤K1≤i≤j≤K. The Maximum Subsequence is the continuous subsequence which has the largest sum of i原创 2021-01-21 18:47:22 · 91 阅读 · 0 评论 -
Emergency (25分)
As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the length of each road between any pair of cities are marked原创 2021-01-20 12:22:59 · 135 阅读 · 0 评论