Professional Documents
Culture Documents
This exam consists of 20 problems and should be taken over a period of 3 hours. If you do not
know the answer to a problem, leave it blank. Each correct answer has +2 points and each
incorrect answer leads to -1. The problems in this sample exam were adapted from the past
iterations of the Iranian National Olympiad in Informatics (INOI) and the Iranian National
Mathematics Olympiad (INMO).
18Problem 1. Six gears are positioned as in the diagram below. The large gears have 32 teeth
each. The medium gears have 16 teeth and the small gear has 8. We want gear a to have a full
clockwise rotation. How many times and in which direction should we rotate b to achieve this?
a) 1 clockwise rotation
b) 1 counter-clockwise rotation
c) 2 clockwise rotations
d) 2 counter-clockwise rotations
e) It is impossible to rotate a using b
18Problem 2. Sundar STEM School has invited the top 12 participants of this contest to a
ceremony. Upon entrance, each guest gets a number between 1 and 12. Then, they are seated
at a round table in no particular order. The guests are offered delicious laddus. Each guest
looks at his own number and the number of the person on his right and takes as many laddus
as the maximum of the two numbers. How many laddus should the school prepare to make sure
there is no shortage?
a) 78
b) 114
c) 42
d) 156
e) 72
18Problem 3. In this diagram, our goal is to color the circles with the three colors red, green,
and blue, such that for every circle and the two connected circles below it, either (i) they all have
the same color, or (ii) they have three different colors. How many such colorings exist?
a) 8402
b) 8541
c) 927
d) 827
e) 342
18Problem 4. Onewayistan is a country with 5 cities numbered 1 to 5. In this country, we can
build a road from city i to city j only if i < j. If such a road is built, one can use it to go from i to j
but not from j to i. We want to build a number of roads such that from each of the cities 1, 2, 3,
4, there is a unique path to city 5. In how many ways can we do this?
a) 1024
b) 256
c) 3125
d) 24
e) 5
20Problem 5. We have put a number of blue rectangular paper sheets of different sizes on a
table. The table looks like the following diagram when seen from above. What is the minimum
number of paper sheets?
a) 4
b) 5
c) 6
d) 7
e) 8
20Problem 6. In the map shown on the right, how many paths from A to B visit
each number 0, 1, 2, 3, 4 exactly once?
a) 4
b) 7
c) 8
d) 15
e) 16
For example, if we give the input 9 to this algorithm, it outputs 2. Suppose we gave the
algorithm all integers from 1 to 2021 and collected all of its outputs. What is the largest number
we collected?
a) 9
b) 10
c) 11
d) 20
e) 694
20Problem 8. We write all the even numbers in a sequence right after each other, i.e. we write
2468101214… . What is the 1388th letter of this sequence?
a) 2
b) 4
c) 6
d) 8
e) 9
20Problem 9. We wrote the numbers 1 to 9 in the table below in a way that the sum of numbers
in each column, row, and diagonal became equal. Which of the following numbers cannot be in
the top left corner?
a) 2
b) 4
c) 6
d) 8
e) 9
20Problem 10. Russian Roulette is a deadly game in which a participant puts one or more
bullets into a revolver and, after randomly rotating the revolver, aims it at his head and pulls the
trigger. Suppose that the revolver has 7 slots and that it rotates by one slot (clockwise) each
time the trigger is pulled. A participant puts 3 bullets in the revolver at uniformly-chosen random
slots. After a random rotation, he pulls the trigger twice. With what probability will he survive?
a) 1/7
b) 12/49
c) 4/7
d) 16/49
e) 2/7
20Problem 11. Consider an 8-bit binary number a8a7...a1 in which each ai is either 0 or 1. In
each step, we can perform one of the following operations on this number:
1. Shift: We can change it to a1a8a7...a2
2. Changing the first bit: We can change it to a8a7...a2b1 in which b1 is 1-a1.
Using how many operations can we transform 10000010 to 11110000?
a) 5
b) 6
c) 7
d) 8
e) 9
28Problem 12. An exam with 100 points was given to two groups of students. Each group had
50 students. After grading, it turned out that the average points of group A was higher than
group B. What is the maximum possible number of students in group B who scored higher than
everyone in group A?
a) 1
b) 25
c) 49
d) 50
e) It is impossible to have a student in group B who scored higher than everyone in A
28Problem 13. Haidar lives in Lahore. He wants to visit Karachi, Quetta, and Peshawar and
then return to Lahore. Moreover, he wants to stay in each of these cities for one night. One can
travel between each pair of cities using bus, train or airplane and the travel time is always 1
hour! Bus and train are available every day but flights are only available on Saturday, Monday,
and Wednesday. If Haidar starts on a Saturday, in how many different ways can he perform the
journey? Note that he can visit the midway cities in any order.
a) 36
b) 72
c) 108
d) 120
e) 216
28Problem 14. Consider the equation y3-2x2=1388. How many integer solutions does this
equation have?
a) 0
b) 1
c) 2
d) 3
e) Infinitely many
28Problem 15. Consider the table below. We want to write the integers 1 to 10 in this table
(without repetition) such that each number is smaller than the numbers below it and to its right
(if they exist). In how many different ways can we do this?
a) 34
b) 35
c) 36
d) 44
e) 45
22Problem 16. What is the maximum possible number of true statements among the following:
1. If statement 2 is true, then this statement is false.
2. If there are more than 2 true statements, then 3 is one of them.
3. At least one of 1 and 4 are false.
4. 2 and 3 are either both true or both false.
5. 2 is either true or false.
a) 3
b) 1
c) 4
d) 2
e) 0
22Problem 17. Fifteen friends want to order pizza. There are two types of pizza: veg and
non-veg. Each pizza consists of 8 slices and one can only order whole pizzas.
● 5 of the friends want to eat either 3 non-veg slices or 4 veg slices each.
● Another 5 of the friends want to eat either 4 non-veg slices or 5 veg slices each.
● The other 5 want to eat either 5 non-veg slices or 6 veg slices each.
If each non-veg pizza costs 10 rupees and each veg pizza 8 rupees, what is the minimum cost
of satisfying everyone?
a) 74 rupees
b) 76 rupees
c) 80 rupees
d) 78 rupees
e) 72 rupees
22Problem 18. Consider all 5-digit positive integers that are not divisible by 5 and let X be their
product. What is the remainder of dividing X by 5?
a) 3
b) 4
c) 2
d) 1
e) 0
22Problem 19. In how many ways can we put stars in the squares of the table below, such that
each square contains at most one star and each row/column contains 1 or 2 stars?
a) 270
b) 180
c) 90
d) 150
e) 210
30Problem 20. In the figure below, we want to color each of the circles red, green, or blue, such
that no two adjacent circles (circles connected by a line) have the same color. How many such
colorings exist? Note that we do not have to use all three colors.
a) 32
b) 16
c) 96
d) 0
e) 48