随笔分类 - vj刷题练习
刷题练习
摘要:Raju and Meena love to play with Marbles. They have got a lot of marbles with numbers written on them. At the beginning, Raju would place the marbles
阅读全文
摘要:Alex is administrator of IP networks. His clients have a bunch of individual IP addresses and he decided to group all those IP addresses into the smal
阅读全文
摘要:We have a machine for painting cubes. It is supplied with three different colors: blue, red and green. Each face of the cube gets one of these colors.
阅读全文
摘要:Trees are fundamental in many branches of computer science (Pun definitely intended). Current stateof-the art parallel computers such as Thinking Mach
阅读全文
摘要:A number of K balls are dropped one by one from the root of a fully binary tree structure FBT. Each time the ball being dropped first visits a non-ter
阅读全文
摘要:Suppose you have to evaluate an expression like ABCDE where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which
阅读全文
摘要:I mean your borrowers of books — those mutilators of collections, spoilers of the symmetry of shelves, and creators of odd volumes. – (Charles Lamb, E
阅读全文
摘要:You have n boxes in a line on the table numbered 1*...n* from left to right. Your task is to simulate 4 kinds of commands: • 1 X Y : move box X to the
阅读全文
摘要:You’re typing a long text with a broken keyboard. Well it’s not so badly broken. The only problem with the keyboard is that sometimes the “home” key o
阅读全文
摘要:There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were
阅读全文
摘要:You’re typing a long text with a broken keyboard. Well it’s not so badly broken. The only problem with the keyboard is that sometimes the “home” key o
阅读全文
摘要:You have n boxes in a line on the table numbered 1*...n* from left to right. Your task is to simulate 4 kinds of commands: • 1 X Y : move box X to the
阅读全文
摘要:The only printer in the computer science students’ union is experiencing an extremely heavy workload. Sometimes there are a hundred jobs in the printe
阅读全文
摘要:The figure shown on the left is left-right symmetric as it is possible to fold the sheet of paper along a vertical line, drawn as a dashed line, and t
阅读全文
摘要:You are to find all the two-word compound words in a dictionary. A two-word compound word is a word in the dictionary that is the concatenation of exa
阅读全文
摘要:函数模板时通用的函数描述,他们使用泛型来定义函数,其中的泛型可以用具体的类型代替。将类型作为参数传递给模板,编译器可以生成该类型的函数。 模板建立 //examples template <typename AnyType> void Swap(AnyType& a, AnyType& b) { A
阅读全文
摘要:In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the following strategy. Every
阅读全文
摘要:Your non-profit organization (iCORE - international Confederation of Revolver Enthusiasts) coordinates a very successful foreign student exchange prog
阅读全文
摘要:Some message encoding schemes require that an encoded message be sent in two parts. The fifirst part,called the header, contains the characters of the
阅读全文
摘要:Dr. Tuple is working on the new data-mining application for Advanced Commercial Merchandise Inc. One of the subroutines for this application works wit
阅读全文