I challenge you to find a shorter code that the condition above is met.
#define min main(){}
min
# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | djm03178 | 152 |
I challenge you to find a shorter code that the condition above is met.
#define min main(){}
min
Name |
---|
Just blank file
That does not work because c++ compiler looks for the main function.
cool challenge
this is the shortest i know for C++:
main(){}
that wouldn't work with python interpreter but for c++ it's the shortest.
This one is 2 bytes shorter:
Absolutely! Next thing i want to do is adding some other languages to the statement. I guess all the allowed languages in codeforces could do the job.
No 1-letter function exists in Python 3.12 so I'm pretty sure this is the shortest.
Thanks for replying; you brought my attention back to this problem, which caused me to think more about it. Turns out, there is a shorter solution. It uses an entirely different idea. Here it is:
This compiles with g++ and runs with Python 3.11 (probably works with 3.12 too). It is 1 byte shorter than my previous solution.
An even shorter solution can be compiled with gcc as C source code, but doesn't compile with g++ as C++ source code:
With some clever Python semicolon usage, you can reduce this from 24 bytes CRLF/21 bytes LF to 22 bytes CRLF/20 bytes LF.
python:
(it can run just with blank i guess??)
Not the same for c++.
That looks cool I guess!