Блог пользователя reirugan

Автор reirugan, 20 месяцев назад, По-английски

(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.)

  • Проголосовать: нравится
  • +96
  • Проголосовать: не нравится

»
20 месяцев назад, скрыть # |
 
Проголосовать: нравится +64 Проголосовать: не нравится

intellegent is right

»
20 месяцев назад, скрыть # |
 
Проголосовать: нравится +48 Проголосовать: не нравится

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

»
20 месяцев назад, скрыть # |
 
Проголосовать: нравится +69 Проголосовать: не нравится

are you aware you can write code on multiple lines?

»
20 месяцев назад, скрыть # |
 
Проголосовать: нравится +34 Проголосовать: не нравится

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.

»
20 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

wait whats wrong with this i cant see it

»
20 месяцев назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

check this

»
20 месяцев назад, скрыть # |
 
Проголосовать: нравится +3 Проголосовать: не нравится

i think you need some therapy man

»
20 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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

»
20 месяцев назад, скрыть # |
← Rev. 2  
Проголосовать: нравится +11 Проголосовать: не нравится

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.)

»
20 месяцев назад, скрыть # |
 
Проголосовать: нравится +10 Проголосовать: не нравится

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
  • »
    »
    20 месяцев назад, скрыть # ^ |
    ← Rev. 2  
    Проголосовать: нравится 0 Проголосовать: не нравится

    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
»
20 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

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