reirugan's blog

By reirugan, 5 days ago, In English

(This isn't supposed to be a serious post, but hopefully somebody finds it funny)

Intellegent: are you ok

Intellegent: i think you need some therapy man

Some of my submissions: (all of these were submitted in rated contests and AC'd, and none were intentionally written poorly)

2022C - Gerrymandering:

My submission:

2053C - Bewitching Stargazer:

My submission:

2057C - Trip to the Olympiad:

My submission:

2063D - Game With Triangles:

My submission:

If I can read it, surely it's fine... right? After all, that's all that really matters.

(I would seriously question the judgment of anybody who hires me to write code, ever.)

  • Vote: I like it
  • +88
  • Vote: I do not like it

»
5 days ago, # |
  Vote: I like it +64 Vote: I do not like it

intellegent is right

  • »
    »
    5 days ago, # ^ |
      Vote: I like it +19 Vote: I do not like it

    he is very intellegent indeed

»
5 days ago, # |
  Vote: I like it +48 Vote: I do not like it

Intellegent is just salty that he has lost 10 TLE duels in a row to reirugan.

»
5 days ago, # |
  Vote: I like it +69 Vote: I do not like it

are you aware you can write code on multiple lines?

»
5 days ago, # |
  Vote: I like it +34 Vote: I do not like it

Just to fan the flames, my main CF setup involves using an online C++ compiler and copy pasting my template from the notes section of my Discord profile.

  • »
    »
    5 days ago, # ^ |
      Vote: I like it +7 Vote: I do not like it

    you should try doing it from a phone with a bluetooth keyboard

  • »
    »
    5 days ago, # ^ |
      Vote: I like it +5 Vote: I do not like it

    if it makes you feel any better i also do that (minus the template part i dont even have one i just rewrite everything)

    • »
      »
      »
      5 days ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      ok i just forgot i dont think i have a submission that doesnt use a regular for loop (i only use while and for each loops)

»
5 days ago, # |
  Vote: I like it 0 Vote: I do not like it

wait whats wrong with this i cant see it

»
5 days ago, # |
  Vote: I like it +8 Vote: I do not like it

check this

»
5 days ago, # |
  Vote: I like it +3 Vote: I do not like it

i think you need some therapy man

»
5 days ago, # |
  Vote: I like it 0 Vote: I do not like it

I think it's OK, just try to write looong expressions on multiple lines.

»
5 days ago, # |
Rev. 2   Vote: I like it +11 Vote: I do not like it

I think code style doesn't really matter much in CP.

For instance, my code uses long formulas, do not use spaces between most identifiers, use controversially bad macros like #define F(i,x,y) for (int i=(x);i<=(y);i++), do not have senseful comments, and got lot of other traits that you would expect only in "badly styled" codes. However I still understand my code clearly. So I think as long as you don't find trouble reading your code, it's fine.

(However, I think #define int long long isn't a good thing because it will sometimes increase the memory cost, and reduce the performance of your code especially on 32-bit judging machines. I once used it but stopped after getting couple MLEs on simple segment tree problems.)

»
4 days ago, # |
  Vote: I like it +10 Vote: I do not like it

My equations for quadratic regressions are like this. Now if someone see's it, then they are like "What is this? Are you Okay??"

Quadratic Regression Equation
  • »
    »
    4 days ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Even Codeforces rejected it: Any word length should be no more than 200

  • »
    »
    4 days ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    OMG

    Please, say that you're not using this in any kind of source code in any project (even your own personal). Just imagine having a typo in formula in that kind of a mess.

    If you're wondering whether it is possible to code such complicated formulas in a structured way, consider this:

    Quadratic Regression Equation
»
4 days ago, # |
  Vote: I like it 0 Vote: I do not like it

It all seemed right to me after seeing 2053C 2057C first , but the code for Gerrymandering is just nasty.