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

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

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

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

»
7 дней назад, # |
  Проголосовать: нравится +64 Проголосовать: не нравится

intellegent is right

  • »
    »
    7 дней назад, # ^ |
      Проголосовать: нравится +19 Проголосовать: не нравится

    he is very intellegent indeed

»
7 дней назад, # |
  Проголосовать: нравится +48 Проголосовать: не нравится

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

»
7 дней назад, # |
  Проголосовать: нравится +69 Проголосовать: не нравится

are you aware you can write code on multiple lines?

»
7 дней назад, # |
  Проголосовать: нравится +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.

  • »
    »
    6 дней назад, # ^ |
      Проголосовать: нравится +7 Проголосовать: не нравится

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

  • »
    »
    6 дней назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

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

    • »
      »
      »
      6 дней назад, # ^ |
        Проголосовать: нравится +3 Проголосовать: не нравится

      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)

»
7 дней назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

wait whats wrong with this i cant see it

»
7 дней назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

check this

»
7 дней назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

i think you need some therapy man

»
6 дней назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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

»
6 дней назад, # |
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.)

»
6 дней назад, # |
  Проголосовать: нравится +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
  • »
    »
    6 дней назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

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

  • »
    »
    6 дней назад, # ^ |
    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
»
6 дней назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

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