\$\begingroup\$
\$\endgroup\$
10
I'm pretty new to code golfing, but I recently came across a guy on Kattis that consistently has exactly 5 character Bash solutions for some problems. For example, here is a leaderboard showing his 5 character solution: https://open.kattis.com/problems/summertrip/statistics
Anyone have any idea how he's able to do this? I'm itching to find an answer, any help is greatly appreciated
-
2\$\begingroup\$ I think this might be borderline off topic. My opinion (as an individual) is that this is on topic, since it is asking about how a particular problem could be solved in a certain number of bytes. It does seem that maybe there is some "cheating" involved, but I don't think that makes it off topic. \$\endgroup\$Wheat Wizard– Wheat Wizard ♦2025年09月04日 02:27:14 +00:00Commented Sep 4 at 2:27
-
1\$\begingroup\$ This question is similar to: Tips for golfing in Bash. If you believe it’s different, please edit the question, make it clear how it’s different and/or how the answers on that question are not helpful for your problem. \$\endgroup\$鳴神裁四点一号– 鳴神裁四点一号2025年09月04日 02:57:59 +00:00Commented Sep 4 at 2:57
-
9\$\begingroup\$ There are several hundred problems on that site where the shortest solution is 5 bytes. Every one I've looked at has a 5 byte Bash 'solution' by the same user. I don't think I'm going out on a limb by suggesting that this is blatant cheating/exploitation of the controller rather than any exhibition of golfing wizardry. \$\endgroup\$Dingus– Dingus2025年09月04日 05:45:02 +00:00Commented Sep 4 at 5:45
-
1\$\begingroup\$ @WheatWizard I'd say this'd be on topic (or at least less off topic) for meta, if you'd migrate it. \$\endgroup\$M--– M--2025年09月04日 14:44:40 +00:00Commented Sep 4 at 14:44
-
3\$\begingroup\$ I have contact to one of the main devs at Kattis and can point this out to him if you so wish. \$\endgroup\$Adám– Adám2025年09月04日 16:03:14 +00:00Commented Sep 4 at 16:03