reirugan's blog

By reirugan, 14 months 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 - Джерримендеринг:

My submission:

2053C - Очаровательный звездочет:

My submission:

2057C - Поездка на олимпиаду:

My submission:

2063D - Игра с треугольниками:

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
  • +96
  • Vote: I do not like it

| Write comment?
»
14 months ago, hide # |
 
Vote: I like it +64 Vote: I do not like it

intellegent is right

»
14 months ago, hide # |
 
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.

»
14 months ago, hide # |
 
Vote: I like it +69 Vote: I do not like it

are you aware you can write code on multiple lines?

»
14 months ago, hide # |
 
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.

  • »
    »
    14 months ago, hide # ^ |
     
    Vote: I like it +7 Vote: I do not like it

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

  • »
    »
    14 months ago, hide # ^ |
     
    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)

    • »
      »
      »
      14 months ago, hide # ^ |
       
      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)

      • »
        »
        »
        »
        14 months ago, hide # ^ |
         
        Vote: I like it 0 Vote: I do not like it

        and now i have to use the onscreen keyboard to type _ = % ^ since my keyboard is now broken (and numpad for — + 5 6)

»
14 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

wait whats wrong with this i cant see it

»
14 months ago, hide # |
 
Vote: I like it +8 Vote: I do not like it

check this

»
14 months ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

i think you need some therapy man

»
14 months ago, hide # |
 
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.

»
14 months ago, hide # |
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.)

»
14 months ago, hide # |
 
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
  • »
    »
    14 months ago, hide # ^ |
    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
»
14 months ago, hide # |
 
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.