摘要:
1050. String Subtraction (20)时间限制10 ms内存限制32000 kB代码长度限制16000 B判题程序StandardGiven two strings S1 and S2, S = S1 - S2 is defined to be the remaining string after taking all the characters in S2 from S1. Your task is simply to calculate S1 - S2 for any given strings. However, it might not be that simpl 阅读全文
摘要:
1020. Tree Traversals (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueSuppose that all the keys in a binary tree are distinct positive integers. Given the postorder and inorder traversal sequences, you are supposed to output the level order traversal sequence of the corresponding binar 阅读全文
摘要:
1013. Battle Over Cities (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueIt 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 a 阅读全文
摘要:
1012. The Best Rank (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueTo evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - English. At the mean 阅读全文
摘要:
1003. Emergency (25)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueAs 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 bet 阅读全文
摘要:
1038. Recover the Smallest Number (30)时间限制400 ms内存限制32000 kB代码长度限制16000 B判题程序Standard作者CHEN, YueGiven 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-0229-87 or 阅读全文