Problem A - How do you add?
10/4/12 1:19 PM
Problem A: How do you add?
Larry is very bad at math - he usually uses a calculator, which worked well
throughout college. Unforunately, he is now struck in a deserted island with his
good buddy Ryan after a sno
Problem F - Add All
9/5/12 9:12 PM
Problem F
Add All
Input: standard input
Output: standard output
Yup! The problem name reflects your task; just add a set of numbers. But you may feel yourselves
condescended, to write a C/C+ program just to add a set of
Problem B - Exact Sum
9/19/12 9:00 PM
Problem B - Exact Sum
Time Limit: 1 second
Peter received money from his parents this week and wants to spend it all buying books. But he does not read
a book so fast, because he likes to enjoy every single word while
D : Dynamic Frog :
D
9/19/12 8:59 PM
Next Generation Contest 3
Dynamic Frog
Time Limit: 2
seconds
With the increased use of pesticides, the local streams and rivers have
become so contaminated that it has become almost impossible for the
aquatic animals t
Problem F: Frequent values
9/4/12 8:27 PM
2007/2008 ACM International Collegiate Programming Contest
University of Ulm Local Contest
Problem F: Frequent values
You are given a sequence of n integers a1 , a2 , . , an in non-decreasing order. In addition to
9/12/12 9:52 PM
Problem D: Tour de France
A racing bicycle is driven by a chain connecting two sprockets. Sprockets are grouped
into two clusters: the front cluster (typically consisting of 2 or 3 sprockets) and the rear
cluster (typically consisting of b
10/11/12
M Crazy King
M - Crazy King
Time Limit: 1 sec
Memory Limit: 16MB
King Peter lives in kingdom A, and his daughter in kingdom B. King recieved a letter telling that her
daughter gave birth to a child. King is incredibly curious to see his grandchil
Problem E: The Bus Driver Problem
9/19/12 8:59 PM
IIUC ONLINE CONTEST 2008
Problem E: The Bus Driver Problem
Input: standard input
Output: standard output
In a city there are n bus drivers. Also there are n morning bus routes & n afternoon bus routes with
Problem D
9/4/12 8:28 PM
Problem H
Ahoy, Pirates!
Input: Standard Input
Output: Standard Output
In the ancient pirate ages, the Pirate Land was divided into two teams of pirates, namely, the Buccaneer and
the Barbary pirates. Each pirates team was not fix
Wedding Shopping
9/23/12 4:06 PM
D. Wedding Shopping
Background
One of our best friends is getting married and we all are nervous because he is the first of us who is doing
something similar. In fact, we have never assisted to a wedding, so we have no clo
8/30/12 1:14 PM
Problem C: Virtual Friends
These days, you can do all sorts of things online. For example, you can use various websites to make virtual
friends. For some people, growing their social network (their friends, their friends' friends, their fr
Event Planning
8/23/12 7:39 AM
Event Planning
As you didn't show up to the yearly general meeting of the
Nordic Club of Pin Collectors, you were unanimously elected
to organize this years excursion to Pin City. You are free to
choose from a number of week
Problem E: Grid Successors
8/25/12 6:27 PM
Problem E: Grid Successors
Consider a 3 x 3 grid of numbers g where each cell contains either a 0 or a 1.
We define a function f that transforms such a grid: each cell of the grid f(g)
is the sum (modulo 2) of it
Problem A: Social Constraints
9/12/12 9:52 PM
Problem A: Social Constraints
Socializing can be a very complicated thing
among teenagers. For example, finding a
good seating arrangement in a movie theater
can be a difficult task. Here is a list of
constrai
9/5/12 8:44 PM
Problem A: CD
Jack and Jill have decided to sell some of
their Compact Discs, while they still have
some value. They have decided to sell one
of each of the CD titles that they both own.
How many CDs can Jack and Jill sell?
Neither Jack nor
10/11/12 2:28 PM
D
Dominator
In graph theory, a node X dominates a node Y if every path from the predefined start node to Y must go through
X. If Y is not reachable from the start node then node Y does not have any dominator. By definition, every node
rea
Multitasking
9/4/12 8:28 PM
Multitasking
Calendars control our daily lives. For people like me, who are bad at multitasking, it is important to have at
most one task planned for any minute of my life. Your job is to make sure that my calendar is free of c
10/11/12 2:29 PM
C Battleships
Time Limit: 1 sec
Memory Limit: 32 MB
Battleships game is a pen and paper game that was invented by Clifford Von Wickler in the early 1900s. In
this game each player uses two N x N grids. One to arrange his ships and record
10/11/12 2:29 PM
C Battleships
Time Limit: 1 sec
Memory Limit: 32 MB
Battleships game is a pen and paper game that was invented by Clifford Von Wickler in the early 1900s. In
this game each player uses two N x N grids. One to arrange his ships and record
Problem I: I Can Guess the Data Structure!
8/30/12 1:11 PM
Problem I
I Can Guess the Data Structure!
There is a bag-like data structure, supporting two operations:
1x
Throw an element x into the bag.
2
Take out an element from the bag.
Given a sequence of