摘要: DescriptionA square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that rotating about its centre by 90 degrees gives the same polygon. It is not the only polygon with the latter property, however, as a regular octagon also has 阅读全文
posted @ 2013-08-21 16:06 孔凡凯凯 阅读(301) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven m sequences, each contains n non-negative integer. Now we may select one number from each sequence to form a sequence with m integers. It's clear that we may get n ^ m this kind of sequences. Then we can calculate the sum of numbers in each sequence, and get n ^ m values. What w 阅读全文
posted @ 2013-08-21 16:02 孔凡凯凯 阅读(205) 评论(0) 推荐(0) 编辑
摘要: DescriptionOur Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment Black Box is empty and i equals 0. This Black Box processes a sequence of commands (transactions). There are two types of transactions: ADD (x): put element x i. 阅读全文
posted @ 2013-08-21 15:59 孔凡凯凯 阅读(295) 评论(0) 推荐(0) 编辑