
ACM


Golden System
Piegirl got bored with binary, decimal and other integer based counting systems. Recently she discovered some interesting properties about number , in particular that q 2 = q + 1, and she […]


Distributed Join
Piegirl was asked to implement two table join operation for distributed database system, minimizing the network traffic. Suppose she wants to join two tables, A and B. Each […]

No to Palindromes
Paul hates palindromes. He assumes that string s is tolerable if each its character is one of the first p letters of the English alphabet and s doesn’t contain any palindrome contiguous substring of length […]


Substitutes in Number
Andrew and Eugene are playing a game. Initially, Andrew has string s, consisting of digits. Eugene sends Andrew multiple queries of type ” d i → t i“, that means “replace […]

Restore Cube
Peter had a cube with non-zero length of a side. He put the cube into three-dimensional space in such a way that its vertices lay […]

World of Darkraft – 2
Roma found a new character in the game “World of Darkraft – 2”. In this game the character fights monsters, finds the more and more […]

Cheap Travel
Ann has recently started commuting by subway. We know that a one ride subway ticket costs a rubles. Besides, Ann found out that she can buy a […]

Wonder Room
The start of the new academic year brought about the problem of accommodation students into dormitories. One of such dormitories has a a × b square meter wonder room. […]

Number of Ways
You’ve got array a[1], a[2], …, a[n], consisting of n integers. Count the number of ways to split all the elements of the array into three contiguous parts so that the […]

Increase Sequence
Peter has a sequence of integers a 1, a 2, …, a n. Peter wants all numbers in the sequence to equal h. He can perform the operation of “adding one on the […]

Information Graph
There are n employees working in company “X” (let’s number them from 1 to n for convenience). Initially the employees didn’t have any relationships among each other. On each […]

Design Tutorial: Learn from Math
One way to create a task is to learn from math. You can generate some random math statement or modify some theorems to get something […]

Design Tutorial: Learn from Life
One way to create a task is to learn from life. You can choose some experience in real life, formalize it and then you will […]

Design Tutorial: Make It Nondeterministic
A way to make a new task is to make it nondeterministic or probabilistic. For example, the hard task of Topcoder SRM 595, Constellation, is […]

Design Tutorial: Inverse the Problem
There is an easy way to obtain a new task from an old one called “Inverse the problem”: we give an output of the original […]

Design Tutorial: Learn from a Game
One way to create task is to learn from game. You should pick a game and focus on part of the mechanic of that game, […]
