Thank you for participating in our contest! We hope you enjoyed it.
Please let us know what you thought of the problems by voting!
1952A - Are You a Robot, Again?
Idea: flamestorm
Have you seen the "are you a robot" boxes on websites?
[problem:1952A]
If you select all the squares with traffic lights and read the corresponding letters from left-to-right, top-to-bottom, you get the text "$$$\texttt{print safety}$$$". So all you need to do is print the word $$$\texttt{safety}$$$.
Idea: willy108
Can you interpret the question in the title another way?
[problem:1952B]
You just need to check if there is a substring $$$\texttt{it}$$$ in the string. (That is, the question is asking, "is $$$\texttt{it}$$$ stated?")
Idea: AlperenT
They have fooled? Who have fooled?
The image says April. Could it be about April Fools?
The problem has $$$n \leq 12$$$. Where did you see the number $$$12$$$ before?
1952C - They Have Fooled
Looking at the announcement blog, it can be seen that the first April Fools Day Contest was $$$12$$$ years ago.
The problem asks for the problem count of the April Fools Day Contest that was $$$n$$$ years ago.
The sample that has $$$n = 9$$$ is also given as a hint as there was not an April Fools Day Contest on $$$2015$$$.
1952D - Are You a Procrastinator?
Idea: AlperenT
Are you a procrastinator?
You should be.
What? The checker does not trust you after you say yes? How can you make it believe you?
1952D - Are You a Procrastinator?
The problem asks you if you are procrastinator or not. You should output "yes" (or any other confirmation word that the checker can understand) to solve the problem. However, it does not seem to be enough as the checker responds with "I have no reason to believe you."
You should prove to the checker that you are a procrastinator. You can do this by submitting "yes" in the last $$$15$$$ mins of the contest.
Furthermore, the checker can give different responses depending on your output. Feel free to share what funny responses you got (there are many of them).
Idea: AlperenT
Almost everything in this problem is a hint.
The problem name is "Sweep Line". Does it sound familiar?
Look at the quote in the statement. When does a mistake force you to start all over again?
Why are the numbers in the note section are colored?
Why does the note section contain "I had to take a guess." and "I am literally going to explode."
Minesweeper. This is a slightly different version, since all cells are numbered. Why do the numbers only go up to $$$2$$$?
1952E - Sweep Line
The theme of the problem is Minesweeper.
In Minesweeper, the numbers represent the count of mines around them.
The array given in the input represents a Minesweeper game that is only a line (hence the name Sweep Line). The problem asks you to output the number of possible mine placements that is consistent with the given array.
Note that here each cell refers to the number of mines in the neighboring cells, but not including itself (since the input is only up to $$$2$$$).
The modulo $$$20240401$$$ part is unnecessary as the answer can be at most $$$2$$$ (try to prove this).
Idea: flamestorm
Can you convert a grid of 0s and 1s into a useful piece of data?
Look in the top-left, top-right, and bottom-left corners. What do you notice?
Namely, look at the the top-left, top-right, and bottom-left $$$7 \times 7$$$ subgrids. They form a pattern. Have you seen this pattern elsewhere? (It is well-known.)
[problem:1952F]
Replace 0 with white and 1 with black to get this QR code:
Scanning it tells you that you need to find the $$$4 \times 4$$$ grid with the maximum sum.
1952G - Mathematician Takeover
Idea: flamestorm
There is a function that has the same name but different definitions in math and computer science. What is it?
Try to fit a curve through the three points given in the problem. It can help you solve the previous question.
[problem:1952G]
The problem is a joke about the function $$$\log$$$. For mathematicians, it means $$$\log_e$$$, but for computer scientists, it means $$$\log_2$$$. In particular, the samples all give the correct output for $$$\log_e(x)$$$, but we really want to output $$$\log_2(x)$$$.
Idea: ToxicPie9
Why are there two examples when each one already has multiple test cases?
A change of perspective might help you solve the problem.
1952H - Palindrome
One obvious weird thing in the statement is that there are 2 sample tests despite the multi-test input format. This implies that the lines ("tests") in each input might not be independent tests and are related in some way.
If we read very closely we might notice two weird things about the statement. First, instead of the usual "Each test case contains a line...", it says "The following t lines each contain...". This is because one line does not correspond to one test case. Another is the unusual definition of palindromes: "in both directions".
This problem is solved by seeing it in a different direction. If we read the third and fourth columns, we may notice that they are palindromes — which read the same in both directions, up and down. The solution is to read $$$t$$$ strings, vertically, from the input and determine whether they are palindromes. Empty strings count as palindromes as you can see in sample 2.
Idea: ToxicPie9
Something looks off with the text (literally).
1952I - Dark Matter
If you stare at the PDF hard enough, you'll notice that some of the text looks curved. Given the hint about "gravitational lensing", it should be clear that this is not a coincidence.
How can gravitational lensing distort text? If there's a lot of mass between you and the text, those matter can bend light going from text into your eyes, making straight text look curved. In addition, the meme image looks normal, implying such mass lies between the image and text (in other words, behind the image from your perspective). Here's a visualization of the configuration:
Now let's do the difficult and technical part: finding the dark matter. To do this we need to first grab some PDF/vector graphics editor like LibreOffice or Inkscape. We can see a lot of random objects behind the image:
These are probably the mass causing distorted text. Unfortunately, as the problem suggests, these objects are dark matter so are transparent because they don't interact with light. We can set their transparency to 0 (or opacity to max) and change their color to see them better:
Which gives the formula $$$(a^2 + b^2) + (a - b) + |a| \times 2b - (ab + 2)$$$. If we plug in $$$a$$$ and $$$b$$$ from the samples, we get $$$1$$$, which corresponds to the missing number in the image. Therefore the solution is to output $$$a + b + ((a^2 + b^2) + (a - b) + |a| \times 2b - (ab + 2))$$$.
1952J - Help, what does it mean to be "Based"
Idea: ToxicPie9
1952J - Help, what does it mean to be "Based"
Update: You can find checker implementations here.
The recent April Fools contests all have problems related to mysterious languages. In this one, you are given several samples in a new, never been seen before constructed language, and your task is to learn it and solve a simple task with it. The idea of using internet slangs as a language was inspired by this meme. The problem format is similar to some Linguistics Olympiad problems.
This problem is rather straightforward: simply figure out what each line of code does, and try to combine known operations to solve the last task. Knowing the meaning of slangs might help in understanding them.
In task 1, we learn 4 operations:
yoink a
: Input an integera
.*slaps a on top of b*
: Adda
tob
.yeet b
: Output the integerb
.go touch some grass
: Return/exit the program.
In task 2 we learn:
bruh b is lowkey just 0
: Assign the variableb
to 0.rip this b fell off by a
: Subtracta
fromb
.
And the less obvious:
vibe check a ratios b
: Check ifa
is larger thanb
. If yes, execute the next line, otherwise don't.simp for 7
: Goto line 7.
In task 3 we learn new things:
yoink a
: Input an entire arraya
.- Indexing operations:
a[0]
. We can also see that arrays are 0-indexed.
These are enough to solve task 4. There are two simple approaches.
- Sort the array and output $$$a[k-1]$$$. We may use bubble sort for easier implementation.
yoink n
yoink a
bruh i is lowkey just n
vibe check i ratios 1
simp for 7
simp for 22
bruh j is lowkey just 1
vibe check i ratios j
simp for 11
simp for 20
bruh k is lowkey just j
*slaps -1 on top of k*
vibe check a[k] ratios a[j]
simp for 18
bruh tmp is lowkey just a[j]
bruh a[j] is lowkey just a[k]
bruh a[k] is lowkey just tmp
*slaps 1 on top of j*
simp for 8
rip this i fell off by 1
simp for 4
yoink k
rip this k fell off by 1
yeet a[k]
go touch some grass
- Since the input integers are distinct, we can loop over each element to see whether exactly $$$k-1$$$ elements are smaller than it.
yoink n
yoink a
yoink k
bruh i is lowkey just 0
bruh m is lowkey just 1
bruh j is lowkey just 0
vibe check n ratios j
simp for 10
simp for 13
vibe check a[j] ratios a[i]
*slaps 1 on top of m*
simp for 19
vibe check m ratios k
simp for 21
vibe check k ratios m
simp for 21
yeet a[i]
go touch some grass
*slaps 1 on top of j*
simp for 7
*slaps 1 on top of i*
simp for 5