The contest is over; I hope you enjoyed it! The editorial is available here.
The 8th April Fools Day Contest will take place on Wednesday April 1st. This is a joke competition in which solving the problem is often easier than figuring out what the actual task is.
In this round you'll be given several weird problems and 2 hours to solve them. The contest will use ACM ICPC rules (no hacks, the standings are decided by the number of solved problems and penalty time earned on them), and it will be unrated. You can submit solutions in any language allowed by Codeforces, unless the problem says otherwise. To get an idea of what the contest will look like, you can check out the contests of the past years: 2012, 2013, 2014, 2016, 2017, 2018, 2019.
As usual, to enjoy competing in this round you'll need a sense of humor compatible with mine. Good luck, and have fun!
It's the extreme of those hard-to-comprehend problem statements.
Is it rated?
You are willing to know the solution of first problem I see :p
I saw a problem with a same name with this problem, I don't know if they are the same
No, they're not.
cout<<"NO"<<endl;
is the contest rated
No
Will the editorials be posted ?
Not before the contest :-) You can see that all past contests have editorials.
How can you tell the truth?
With a lot of practice :-)
You better ask will there be problem statements
Will there be problem statements?
Occasionally :-)
1st Plot twist:Contest cancelled
Plot Twist 2: Contest is rated
Plot Twist 3: Contest will take place on April 2nd
Plot Twist 4: Contest will start two hours in advance.
Plot Twist 5: Final standing will be the reverse of actual one.
Plot Twist 6: No time penalties on Wrong Submissions! xD
Plot Twist 7 : When we think there's a plot twist hidden but turns out there is no plot twist at all
Plot Twist 8: contest will be onsite.
Plot Twist 9: codeforces goes for maintainence during contest time.
Plot Twist 10: We will be competing while living in artificial reality.
Plot Twist 11: It's last plot twist
Plot Twist 12: Plot Twist 11 was intentionally misleading.
Plot twist 13: This is not a plot twist.
Plot Twist 14: There is no plot.
Plot Twist 15: There is no twist.
Plot Twist 16: Only language allowed is BrainFuck.
Plot Twist 17: 17 is equal to 0
Plot Twist 18: The contest will be cancelled.
... and that's how we know that plot twists are periodic with the period of 17! (Well, assuming that each next plot twist is a function of exactly one plot twist immediately preceding it)
Plot Twist 17 + 2: Contest is rated
Plot Twist 17 + 3: Contest will take place on April 2nd
Plot Twist 17 + 4: Contest will start two hours in advance.
Plot Twist 17 + 5: The problem statements will be locked and can only be accessed after you submit and lock the solution.
Plot Twist 17^6: Only output is provided and you have to find problem statement with input.
Plot Untwist 17 + 7: this will untwist all the twists without further twisting already twisted plot.
Plot Twist 25: The contest is running.
Plot twist:
Plot Twist 27: Actually ,its not 27th but 28th twist(count it).
Plot Twist 29: pilot is going to die.
Plot twist 10^9- Plot twist Time Limit Exceeded!
Plot Twist 10^9+7 "RunTime Error"
The Plot Twist we expected : Everything above
The Plot Twist we got : Error 502 Bad Gateway across all versions of the website !
plot twist 10: gets a "f***"in judgement protocol.
Plot Twist 34: Those commenting on this thread will have their rating increased
(Assuming its April Fools Day)
Yes!! before the contest!!
Pretty much every recent contest has started to feel like a joke contest now, so this joke contest is more like just another normal contest. So I don't see why it should be unrated.
-Unrated
very dank
I think this is going to be fun :D
It's my first April Fools Contest in Codeforces. I think it'll be interesting and meaningful (to me). Just wish me (and everyone) good luck and have fun!
What if you don’t have a sense of humor?
Then it falls to other people to make fun of you.
April Fool's joke:
Us: Yes!!, unrated contest.
CodeForces: April Fool's, it's rated.
Us: rating drops
CodeForces: Just kidding... :P
unless...
Seems interesting, very much looking forward to it.
Excited for the contest in this QUARANTINE...
Is it fair to call the winner a fool ?
*participant
You just nailed it bro!!
you can see who won now.
Why it will be unrated ?
Have a look on previous year contests, you will get to know.
plot twist : contest will be rated Nickolas is a paid actor
Waiting for another one OEIS task.
Which is why I can't really give one :-D I'm not sure this is a kind of joke that gets better after multiple repetitions, and you can pull off a trick like this only once :-)
Will each problems have the same points? What will be the difficulty level of each problem? Same or Different?
ACM ICPC rules mean that each problem is worth 1 point regardless of complexity, and the ties are resolved using penalty time. The problems will have different difficulty; I try to arrange them in increasing order of difficulty but for this kind of contest it's harder than usual to estimate this correctly :-)
I hope there are no problems with solutions based on references specific to the problem setter of the contest. (like this one — https://mirror.codeforces.com/contest/1145/problem/C)
I think the problems should be solve-able for all users irrespective of whether they follow specific other users or not. Science/math trivia and general movie/pop-culture references are fine, and would allow a greater number of users to attempt the problems.
Yes i agree with you
I solved that problem during contest without knowing the reference to problem setter or anything about quantum computing.
actually this is a very good point
This quarantine it feels good to be fooled.At least something is happening.
One of the best chances to rank over reds :p
You bet!!
I'm waiting for the memes based on the disasters happened in 2020 so far
One of the most funniest contests.
your wish of "short statement" will be fulfilled here.. for sure!
It is so short that there is not even a statement.
Hoping for a mind refreshing and entertaining contest with a lot of humorous content in this Quarantine Times!!!
PS: For the first time I am going to give a contest with my family!!
Boys often don't understand the humor in girls. Then What?
I don't think the issues people usually have with April Fools Contests are related to my gender... But in this unlikely case, you still have two problems written by my co-author kit1980 :-)
If "unrated" is a joke XD
Just Enjoy it! A problem without statement~
No April Fools Day Contest in 2015?????
When someone tells you after the contest that has been rated.
BREAKING NEWS: AtCoder and CodeForces are now working together and will share the system as of today.
I hope those problems don't make me go bald hahaha
Le output format : The correct spelling for school is school, if you put the second 'o' before the first 'o' it is absolutely wrong.
There will be no contest...It’s all a joke and I’m not gonna fall for it.
We need a round based on dank memes.
lets post all the solutions here after getting AC :D
Can I participate with my team?__
Latest News = Competitive Programming is going to be introduced in this Summer Olympics ... Congrats to Whole Coderforces Community for this tremendous achievement :-) .
https://www.nytimes.com/newsletters/computerscience/1087
It is April Fools Day Contest, right? Will the problems be fool, or are they gonna make us feel like a fool? Which one do you think?
Its april fools day and CodeForces is kindda joking with me (note to the Memory).thank u CF for making us to smile while we quarantine ourselves.
Is contest rated?
No
is giving answer before the contest allowed?
Not rated.
Theres no questions. Was that the joke ?
same here
This is the point of the april fools contest. You're trying to find out patterns.
problem is not showing up just input and output for every problem and i entered in it i don't know now what to do
Big F bro. :P
I was thinking in which categories does these question falls ?
None
hope all contests have problem statement concise like this one
Is it rated? Can someone hint over this?
No, we can't give you hint.
No (we cannot give you the answer)
NULL
Multum gaudebamus fuit!
tourist got the 1st like usual even though this is just a joke round, insane!
How on earth is tourist first in this contest too
LOL
Never have I been so curious to know the solutions. Can't sleep without the editorial.
https://mirror.codeforces.com/blog/entry/75480, working on the rest of solutions
tourist: Rated, unrated; I am inevitable.
Everyone who attempted A got it correct, this the first time that I have seen it happen.
I print nothing and got WA at first...
There is only 1 test, and WAs on the 1st test are not shown as failed attempts. Trust me, not everybody got it from the 1st try :-D
Not Me , It took me my third attempt;
On my first attempt i read
input -standard input output-standard output ,so i took a input number and printed that number.
Later ,i submitted my blank template in my second attempt;
And finally printed NO after that..
I meant got it correct during contest not on first attempt :)
I had to check from tourist's submissions page, to check whether he actually submitted the problems, or we were being fooled by CF. LOL! xD
What if his submission page is also made up? What if he never really attended the contest?
SOLUTION FOR E
First: fill area in photoshop
Second: Do 2d dimension
arr
. Check pixel at(i*15)+5
(g*15)+5
. If it's white, put0
inarr
else put1
; Save thatarr
in file for use it in final solution. I picked Node.JS for this step.Final solution: just get
row
andcol
and checkarr[row][col]
if it's 0 print "OUT" else print "IN"mspaint.exe FTW
when your linux distro does not package a drawing tool so you search 'online image editor' and pick the first one with a floodfill tool
Or you can use this
GIMP supports an excellent image format: it can export images as C code (the code for a struct with the raw uncompressed bytes stored in a
unsigned char[]
field). I used that.Another solution without calculating coordinates. Fill area with black, resize to 64x64 and just convert pixels in python to C++ format:
When will we receive the editorials? :P
https://mirror.codeforces.com/blog/entry/75480
How do I solve F?
"elementary" -> periodic table of elements. Check if word can be spelled using symbols of chemical elements.
H is awful and awesome at same time
How to solve?
code in ArnoldC
Where did u find syntax of that language?
Just guessed all the commands, of course!
You can Google for "it's showtime esoteric language", the first link for me is https://lhartikk.github.io/ArnoldC/. By now you know the language name. The README contains a good spec. Perhaps the most difficult thing for me was to find out how to read input, but Googling for "arnoldc input" helped.
How to solve I?
yes
First (and for sure last) time I solved 7 problems lol.
)
What are the solutions?
How to solve F?
Was this part of April fool's suprise? I couldn't even find the submit button XDD
// For some moment I REALLY thought it was some kind of penalty for submitting too many WAs
Having a picture with coordinates may help you solve E problem (做了一张有坐标的图片,可能会帮助你解答E题)
But how ?
Actually , you can still submit it if you want.
^-^
I am stupid, how to solve C?
Paste the title into Google. Google tells you that correct order of these words is in fact a bit different and you can get some permutation from it. You need to apply that permutation to bits of the number on input.
Actually, it's possible to deduce this permutation just from the samples...
Maybe it is, but how do you get the idea behind it then?
Maybe I wasn't clear enough — the idea was from the title; I'm talking about the permutation itself, the samples give exactly enough information to decode it :)
The $$$0 \le n < 64$$$ part clearly shows it's an array of bits. Then I noticed the count of 1 and 0 bits in the original number matches the count of 1s and 0s in the result (respectively); then I tried to apply a simple shift. When it didn't work, I just noticed the highest and the 2nd bit don't change and the others are just reversed.
It is not, no sample contains the terms
2^3
and2^4
, so the mapping of those bits is ambiguous.It would only take a WA to fix that.
.. sure but that's not the point here ..
And after happily lived ever they
And they lived happily ever after
All of the numbers have <= than 6 bits, so reorder the bits just like those words.
A — print No.
B — the first letters of each line spell "two factors" (finding the first nontrivial factor x, then outputing x and a/x worked for me).
C — the problem title is "and they lived happily ever after" permuted. Permute the bits in the binary representation of the number, in the same way.
D — is the hexadecimal number even or odd?
E — the problem asks for whether a square is inside or outside the curve. Use a photo processing tool such as GIMP that allows export of pictures to C code, after applying a paint bucket tool.
F — Check whether string can be broken down into chemical element symbols.
G — The language is http://users.monash.edu/~damian/papers/HTML/Perligata.html (unfortunately the link does not seem to contain enough information...)
H — The language is https://github.com/lhartikk/ArnoldC.
For G you can translate the code without any resources, it just takes a bit.
I have no idea how you do that
That's what I did, took about 20mins. You look at it as a linguistic problem.
You mostly ignore -um, -mentum and -o suffixes because they seem to be just 'latinizing' the text. Then stuff like addementum or multiplicamentum are easy operations.
Things like "var", "aresult", "bresult", "result" are seemingly just variables.
Convert all numbers from Roman to decimal to better understand the conditional and loops.
The order of input-output (reversed) points to the siqus lines likely being pushing/popping in a stack and input is probably in the first loop. The cumula on these lines also points in that direction as "accumulation" points to some data structure.
The only thing left is to figure out elevamentum and privamentum fodementum. Looking at how big the values are compared to the input and associating with "elevate", the former is a power function.
Calculating all other values and comparing with the output gives you that privamentum fodementum has to be a square root and you're done.
I did it without realizing it was an esolang, it's easier than it sounds. For example "aresultum tum bresultum addementum da resulto." clearly means "add aresult and bresult to get result". "multiplicamentum" is also very obvious.
Most of the lines have very obvious parsings if you think they must be program instructions.
I think that is because Portuguese (this is your native language, right?) may be much closer to Latin, than English.
You can add
use Lingua::Romana::Perligata "convert";
before the code to make Perl convert the code to an understandable form.GET TO THE CHOPPER!
Guys, leave pictures alone, do old school.
0000000000000000000000000010101111110100000000000000000000000000 0000000000000000000000101110101010010111110000000000000000000000 0000000000000000000011101000100011010000100100000000000000000000 0000000000000000011110101011111000011110101110100000000000000000 0000000000000000110000001010000011110000101010110000000000000000 0000000000000010011011111011101110100101100010010100000000000000 0000000000000111001001000000101000111100110110110110000000000000 0000000000011111101101101110111011100001100100100011100000000000 0000000000111111111111000010000010001011001101101001110000000000 0000000001111111111111111111101111111001111001111111111000000000 0000000011111111111111111111111111111111111111111111111100000000 0000000111111111111111111111111111111111111111111111111110000000 0000000111111111111111111111111111111111111111111111111110000000 0000001111111111111111111111111111111111111111111111111111000000 0000011111111111111111111111111111111111111111111111111111100000 0000011111111111111111111111111111111111111111111111111111100000 0000111111111111111111111111111111111111111111111111111111110000 0001111111111111111111111111111111111111111111111111111111111000 0000011111111111111111111111111111111111111111111111111111111000 0000000111111111111000100111111111111110001010111111111111100000 0011000001111111110010001111111111111110100000001111111100000000 0011110000011111000110100011111111111111101101100101100000001100 0111111100000100011100111001111111111101001000110000000001111110 0111111111000001001001101100011111111101101111100100001111111110 0111111111111011011100000111001111111000100100001110111111111110 0111111111000001000111011100011111111010111110100010010111111110 1111111111110111010010010001001111110010010000110111000111111111 1111111111100010010110111011101111010111011110011100010111111111 1111111111101111110111100001001010000101001011110001110111111111 1111111111100000100100111011100010101101101001000100100111111111 1111111111110110111101101110001011100000111101011111101111111111 1111111111100011100100100011101001110111100101110001000111111111 1111111111111000001101110110111011000001001101100100010111111111 1111111111111101101000010100001010010101101000110110111111111111 1111111111110000111101010101011110110100101110011100011111111111 1111111111111010010001110001111000100110000100110001111111111111 1111111111111111000111000101101101101100101110100100111111111111 1111111111111111110001011111100000111111100010001111111111111111 0111111111111111100100001111101011111111111000100111111111111110 0111111111111111111111111111111000011111111111111111111111111110 0111111111111111111111111111010010111111111111111111111111111110 0111111111111111111111111101000111111111111111111111111111111110 0011111111111111111111111100010001111111111111111111111111111100 0011111110011111111111111111110111111111111111111111111111111100 0001111111010111111111111111100011111111111111111111101111111000 0001111111000100011111111111001011111111111011111010000111111000 0001111111010101001010001101011001010010110001100000101111111000 0000111111110001100000100000001100011000000101001110111111110000 0000011111110100111101111011100111000011101111101011111111100000 0000011111111110100100100010111101110110100000100011111111100000 0000001111111100001101101000010001010000111010001111111111000000 0000000111111111011000111110110101000101100011111111111110000000 0000000111111111001110010100011100010111001000111111111110000000 0000000011111111100011110001110110111101111011111111111100000000 0000000001111111110110000101000000100001011111111111111000000000 0000000000111111111111010111101101101011001111111111110000000000 0000000000011111111111110000111100001000011111111111100000000000 0000000000000111111111111111111110111111111111111110000000000000 0000000000000011111111111111111111111111111111111100000000000000 0000000000000000111111111111111111111111111111110000000000000000 0000000000000000011111111111111111111111111111100000000000000000 0000000000000000000011111111111111111111111100000000000000000000 0000000000000000000000111111111111111111110000000000000000000000 0000000000000000000000000011111111111100000000000000000000000000
it was nice experience , saw new perspective of solving a question . I can't find solution for C ..but still enjoyed it
Unknown language = Brainfuck?
It's ArnoldC.
No it's ArnoldC.
I thought because on compilation it was giving message something like fuck...that's why I guessed it. :)
I just googled the compilation message and that led me to the language ArnoldC.
tourist got fooled by A :)
Codeforces, is it bug or joke? Why couldn't I to submit problem O?
U think ur geniuz huh?!
@No problemO, sir.
When I find out at the end of the contest I mistakenly got a CE by writing the correct C++ solution of G using UnknownX......
Problem F: https://csacademy.com/contest/ieeextreme-practice-old/task/c787255968c972c653677a52599ecc2f/
It seems to me that there is a notorious coincidence......
Also mfw I solved this task back then but didn't solve it now because I thought some of the elements aren't elements cries
I even had a file named Elementary.cpp and I was asked if I wanted to replace that file.......
To make it even more notorious, we independently used the same problem in a local contest last year: https://icpc.cs.fau.de/wp-content/uploads/2019/03/problemset_winter_2019.pdf
Funnily enough that problem is called "Elementary" as well.
In problem D, I actually did a research on OEIS. Found out that all the sample input were chess related, I thought that the problem is to collect the first element of each chess related sequences. I searched OEIS "chess", got 61 pages, with 607 results. So I wrote a program that collects the data from those pages, and writes the code for me. After I done that, I happily submitted the code and got WA on test 5. And only after all of these, I figured out what the actual task is. I really got fooled.
I have also noticed that the answer is equal to the first element of the OEIS sequence, so I thought I needed some API to query the first element of the given OEIS sequence, but suddenly I noticed that most of the submissions got the correct answer, so I guessed the real answer would be simpler than that:)
I'm pretty sure OEIS actually offers downloadable versions, e.g. at https://oeis.org/wiki/Welcome#Compressed_Versions.
WOW! Can you share your code SPatrik?
Sure: 75146152 I copied the generated code into my submission.
Could not do. I am a fool indeed.
never been so stressed.
contest get over
solution to last question
IT'S SHOWTIME
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
---------------------------
YOU HAVE BEEN TERMINATED
Please use "```" to format the code, like this:
this might help
You don't have to put "----" between the lines, you can just type like this:
The problems were extremely nice this time, thanks!
Fun contest :)
Is the contest is rated?
nope
Was problem G meant for Romans?
It's a project named Lingua::Romana::Perligata, to write Perl codes in Latin.
No, it was meant for fools.
Did anyone have a long queue on custom invocation? It took me about 10 minutes to make sure the UnknownX language is actually ArnoldC; luckily, "It's showtime" title allowed me to start working on the solution before that, but waiting for 10 minutes was weird.
Oh. I got so much penalty submitting the code just to see the compiler errors :/. Next time I'll use the custom invocation. Thanks for the tip!
I failed to submit code (for practice) after contest... :(
When can we submit the code after contest....
I want to check whether my H is correct or not.
first question was damm good . i refreshed my codeforces question site ,checked my wifi just to make sure that that there is no question statement ,the name of question itself was the question . Really enjoyed this contest . it's gave new and exciting experience .
Thanks so much for preparing this round ! Love it so much. How could i submit my code right now ?
The contest should be open for practice now.
HASTA LA VISTA, BABY
I encountered a strange bug here.
Let's say that we try to get the answer to D from OEIS directly:
This runs fine on a clean environment with Python 3.7.2, but crashes on CF with error 13131313. The first guess is that the crash is caused by trying to connect to Internet, but that's not the case —
import urllib.request
already fails and evenimport _ssl
fails with this same error. Since the latter is simply calling the dynamic loader onlib/python3.7/lib-dynload/_ssl.cpython-37m-x86_64-linux-gnu.so
, it can't be a network access error.I tried finding out if someone else had this problem with this error code. The first and only meaningful search result is CF. And guess what, it's about a dynamic library import error, but a different one on PyPy 3. Turns out Python (CPython) 3 on CF can't import some libraries as well.
We could say CF had a custom April 1st prank for me.
For what it's worth, I've encountered error 13131313 too, when I tried to use
import std;
in D language (it's an equivalent of#include <bits/stdc++.h>
in GNU C++, useful for one-off scripts and short solutions).My guess at the time was that importing some libraries toggle a Security Violation custom check at the invoker. Didn't pursue it further though. Sounds more plausible now. Likely the same happens with Python libraries known to deal with internet connections.
The link with the PyPy case hints that it could be a missing library, i.e. HTTP 404 (or a general 400) instead of 401/403, because that was a problem with
_hashlib
and I doubt that uses extra system resources. Maybe Mike handles security in most languages simply by purging undesirable elements of the ecosystem.In your case, isn't the D compiler still terribly outdated? It could also be that this include just doesn't exist in the CF version.
Yeah, something seems to happen on the invokers with the libraries viewed as security threats. If they are just removed, it may be possible to track in the repository, pbox.me.
The D compiler is up to date. When I got that 13131313 error, the compiler was 2.086 (May 2019 version). And it got updated to 2.091 (March 2020 version) just recently, thanks to Mike for that :) .
Tried again right now, I get a memory limit exceeded instead of 13131313.
Seems like Memory Limit is something deliberate, tried it on problems with different limits:
Since
import
is also a runtime operation, not compile-time like#include
, maybe the imported everything counts towards used resources in such a way that the memory runs out. It shouldn't be that large, but I don't know how exactly shared resources are counted and what's checked for MLE. Many recursive DLL/SO loads could hypothetically break it.Well, I was testing with D, and
import
is compile-time there.On Testsys with DMD 2.089 (compiling and running a 32-bit Windows executable, same as Codeforces), a similar program with
import std;
compiles and runs just fine:So it's specific to Codeforces invokers.
Are you sure about that? The docs talk about symbol name lookup, which is often a runtime thing. You definitely can resolve symbols from a "loaded" SO's PLT lazily when they're used during runtime, and you can do that at the program start (when they're loaded) too. I'm pretty sure your stdlib isn't linked statically either.
This is a linker thing, both compile-time (
ld
etc) and runtimelibdl.so
. It's possible that D is using something custom for linking and the CF invoker is mishandling what it wants to do.Then again, I don't know about D, just general OS functionality and I'm guessing what the problem could be there. If you could view the startup part of your final executable, go over it step by step and find where it crashes with this error, that would be more productive.
You will be surprised. By default, the dmd Win32 compiler links the standard library statically from a
phobos.lib
file.Most of it, anyway. There's CURL which has bindings in the standard library, but actually a DLL since it's a third party lib. And indeed importing CURL gets me a Runtime Error.
But the Memory Limit effect is something different still.
Huh. I guess the benefits of linking
libstdc++.so
dynamically don't exist in the case where you have a custom library that isn't used by anything else. Now that I think about it, some OJs use the-static
flag to do it in C++ too.So turns out the problem really was dynamic linking. That makes the MLE extra strange since if dynamic linking = security violation, then getting MLE instead = security risk. Well, MLE is either undefined behaviour of the judge or really too much memory allocated somehow.
how to solve C?
how to solve B ? what are the first and second digit for in output ?
I got wa64 on A, help me
May be contest is rated for so that you are getting wa
For me problem A was a hint for problem C. C was very interesting.
Remark: because of a bug in the "UnknownX" language, the problem H's input format must be concatenated into a single integer, and there are some problems unsolvable with UnknownX.
However, there's a workaround for that: separate the two numbers with 8192 spaces.
This is an accepted code for problem H, modified to take two numbers as input: Try it online!
Wow... i really loved giving this contest. It was fun.!!
Why hasn't the virtual participation been enabled? :) Would be fun to participate.
This should be available now. Enjoy!