原创 PTA-1006 Sign In and Sign Out (25 分)

At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one w

原创 PTA-1012 The Best Rank (25 分)

To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C -

原创 CCF-窗口

問題描述   在某圖形操作系統中,有 N 個窗口,每個窗口都是一個兩邊與座標軸分別平行的矩形區域。窗口的邊界上的點也屬於該窗口。窗口之間有層次的區別,在多於一個窗口重疊的區域裏,只會顯示位於頂層的窗口裏的內容。   當你點擊屏幕上一個點的

原创 將word文檔中的代碼段圖形化的方法

1.打開谷歌瀏覽器輸入http://www.planetb.ca/syntax-highlight-word 2.選擇相應的代碼段然後複製粘貼生成,再將其複製到word文檔裏即可 注意,只能用谷歌瀏覽器。 效果圖:

原创 PTA-1014 Waiting in Line (30 分)

Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting

原创 PTA-1013 Battle Over Cities (25 分)

It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all

原创 PTA-1011 World Cup Betting (20 分)

With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best playe

原创 PTA-1010 Radix (25 分)(部分正確)

Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 i

原创 PTA-1009 Product of Polynomials (25 分)

This time, you are supposed to find A×B where A and B are two polynomials. Input Specification: Each input file contain

原创 PTA-1008 Elevator (20 分)

The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers

原创 PTA-1007 Maximum Subsequence Sum (25 分)

Given a sequence of K integers { N​1​​, N​2​​, ..., N​K​​ }. A continuous subsequence is defined to be { N​i​​, N​i+1​​

原创 PTA-1005 Spell It Right (20 分)

Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the s

原创 PTA-1002 A+B for Polynomials (25 分)

This time, you are supposed to find A+B where A and B are two polynomials. Input Specification: Each input file contain

原创 PTA-1003 Emergency (25 分)

As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scatte

原创 PTA-1001 A+B Format (20 分)

Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by co