http://pat.zju.edu.cn/contests/pat-a-practise/1013 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
http://pat.zju.edu.cn/contests/pat-a-practise/1055 Forbes magazine publishes every year its list of billionaires based on the annual ranking of the world's wealthiest people. Now you are supposed to simulate this job, but concentrate only on
http://pat.zju.edu.cn/contests/pat-a-practise/1007 Given a sequence of K integers { N1, N2, ..., NK }. A continuous subsequence is defined to be { Ni, Ni+1, ..., Nj } where 1 <= i <= j <= K. The Maximum Subsequence
http://pat.zju.edu.cn/contests/pat-a-practise/1003 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
http://pat.zju.edu.cn/contests/pat-a-practise/1069 For any 4-digit integer except the ones with all the digits being the same, if we sort the digits in non-increasing order first, and then in non-decreasing order, a new number can be
http://www.patest.cn/contests/mooc-ds/02-1 Given a constant K and a singly linked list L, you are supposed to reverse the links of every K elements on L. For example, given L being 1→2→3→4→5→6, if K = 3, then you must output 3→2→1→6→5→4; if K =
http://pat.zju.edu.cn/contests/pat-a-practise/1038 Given a collection of number segments, you are supposed to recover the smallest number from them. For example, given {32, 321, 3214, 0229, 87}, we can recover many numbers such like 32-321-3214-02
http://pat.zju.edu.cn/contests/pat-a-practise/1082 Given an integer with no more than 9 digits, you are supposed to read it in the traditional Chinese way. Output "Fu" first if it is negative. For example, -123456789 is read as "Fu yi Yi er
http://pat.zju.edu.cn/contests/pat-a-practise/1031 Given any string of N (>=5) characters, you are asked to form the characters into the shape of U. For example, "helloworld" can be printed as: h de ll rlowo That is, the characters
http://pat.zju.edu.cn/contests/pat-a-practise/1010 Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is "yes", if 6 is a decimal number and 110 is a binary number. Now for any pair of