uva12657

maksyuki 发表于 oj 分类,标签:
0
uva12657

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 left to Y (ignore this if X is already the left of Y )

• 2 X Y : move box X to the right to Y >>继续阅读

uva442

maksyuki 发表于 oj 分类,标签:
0
uva442

Suppose you have to evaluate an expression like A*B*C*D*E where A,B,C,D and E are matrices. Since matrix multiplication is associative, the order in which multiplications are performed is arbitrary. However, the number of elementary multiplications n >>继续阅读

uva514

maksyuki 发表于 oj 分类,标签:
0
uva514

There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was possible to establish only a surface track. Moreover, it turned >>继续阅读

uva12504

maksyuki 发表于 oj 分类,标签: ,
0
uva12504

In this problem, a dictionary is collection of key-value pairs, where keys are lower-case letters, and values are non-negative integers. Given an old dictionary and a new dictionary, find out what were changed.

Each dictionary is formatting as foll >>继续阅读

uva1597

maksyuki 发表于 oj 分类,标签: ,
0
uva1597

The word “search engine” may not be strange to you. Generally speaking, a search engine searches the web pages available in the Internet, extracts and organizes the information and responds to users’ queries with the most relevant pages. World famous >>继续阅读

uva1596

maksyuki 发表于 oj 分类,标签: ,
0
uva1596

In this problem, we consider a simple programming language that has only declarations of onedimensional integer arrays and assignment statements. The problem is to find a bug in the given program.

The syntax of this language is given in BNF as foll >>继续阅读

uva230

maksyuki 发表于 oj 分类,标签:
0
uva230

I mean your borrowers of books — those mutilators of collections, spoilers of the symmetry of shelves, and creators of odd volumes. – (Charles Lamb, Essays of Elia (1823) ‘The Two Races of Men’)

Like Mr. Lamb, librarians have their problems with bo >>继续阅读

uva1595

maksyuki 发表于 oj 分类,标签:
0
uva1595

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 to cut the figure into two identical halves. The figure on the right is not left-right symmetric as i >>继续阅读

uva10391

maksyuki 发表于 oj 分类,标签:
0
uva10391

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 exactly two other words in the dictionary.

Input

Standard input consists of a number of lowercase w >>继续阅读

uva10763

maksyuki 发表于 oj 分类,标签:
0
uva10763

Your non-profit organization (iCORE - international Confederation of Revolver Enthusiasts) coordinates a very successful foreign student exchange program. Over the last few years, demand has sky-rocketed and now you need assistance with your task.

>>继续阅读

uva1594

maksyuki 发表于 oj 分类,标签:
0
uva1594

A Ducci sequence is a sequence of n-tuples of integers. Given an n-tuple of integers (a1, a2, · · · , an), the next n-tuple in the sequence is formed by taking the absolute differences of neighboring integers:

(a1, a2, · · · , an) → (|a1 − a2|, |a2 >>继续阅读

uva221

maksyuki 发表于 oj 分类,标签: ,
0
uva221

An elevation of a collection of buildings is an orthogonal projection of the buildings onto a vertical plane. An external elevation of a city would show the skyline and the faces of the “visible” buildings of the city as viewed from outside the city >>继续阅读

uva814

maksyuki 发表于 oj 分类,标签: ,
0
uva814

For an electronic mail application you are to describe the SMTP-based communication that takes place between pairs of MTAs. The sender’s User Agent gives a formatted message to the sending Message Transfer Agent (MTA). The sending MTA communicates wi >>继续阅读

uva207

maksyuki 发表于 oj 分类,标签:
0
uva207

A PGA (Professional Golf Association) Tour event is a golf tournament in which prize money is awarded to the best players. The tournament is broken into four rounds of 18 holes apiece. All players are eligible to play the first two rounds. Only those >>继续阅读

uva1592

maksyuki 发表于 oj 分类,标签: ,
0
uva1592

Peter studies the theory of relational databases. Table in the relational database consists of values that are arranged in rows and columns.

There are different normal forms that database may adhere to. Normal forms are designed to minimize the red >>继续阅读

uva400

maksyuki 发表于 oj 分类,标签: ,
0
uva400

The computer company you work for is introducing a brand new computer line and is developing a new Unix-like operating system to be introduced along with the new computer. Your assignment is to write the formatter for the ls function.

Your program >>继续阅读