ycperson's blog

By ycperson, history, 2 weeks ago, In English

When an animal's daily obligation gives nothing but shit to him in return, it loses the will to keep going. It becomes desensitized to its living experience. It refuses to eat. It dies of its own accord. Does the animal bring such misery upon himself? Does it enjoy feeling the self-pity? Does it expect sympathy for its misfortunes from its mates? The animal begins to ponder this and try to counteract it each day. The essence of its ongoing existence is simply its logical understanding that life is practice and practice is life. Hardship is the very point of existence. But why? Why when he gets absolutely nothing in return? He does not know. He does not know if all his problems have been created out of thin air simply for its own sake. He does know one thing though: he is disappointed in himself. He has given what he can and life has had only a steaming bowl of shit to give to him in return. Or maybe it was him serving the feces to himself. Each day he sees his mates grow and learn more, becoming stronger and reaching new heights in their daily operation. "Why them and not me?" he wonders. Perhaps this thinking is precisely the barrier. Perhaps the entire nature of the animal's thinking is overly narcissistic and self-absorbed so as to think every shortcoming served to him is an injustice in spite of his continued efforts.

Each day, he believes he must give more and more time to sharpening himself into the sword he wants to become. He shuns his friends for being insensitive to his pitiful state and at the same time tells himself that he is normal. That everything is indeed as it should be and that this is the process all his mates have went through. Eat. Sleep. Practice. That is all he knows now. If a shortcoming were to present itself at this point in time, he believes his practice is indeed flawed. Indeed he has wasted all his time and must restart from scratch. Indeed there is this better practice method to which he was oblivious. Gone is the negligible output of months of disciplining himself. Back are his vices from the depths of the mental hell he must trudge himself through to simply practice each day. Back is the feeling of feeling eternal despair. Feeling like an idiot.

Meanwhile, others stare upon this animal, or what has now become an abomination. A beast beyond recognition. The animal himself is at times aware of this gaze. He feels it on his skin. It may very well be the fuel that keeps his engine of self-destruction and self-sabotage humming. The animal in fact goes so far as to think others are staring at him and care about his every move, even though he is correct very few times. Now, he spends his days deluding himself of what he can become if he only practices more. If he practices harder. He becomes jaded to the pain and yet still feels every bit of self-pity, frustration, and is outright incredulous at his pathetic state.

Full text and comments »

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

By ycperson, history, 3 weeks ago, In English

I encountered some strange difficulty with this problem: https://codeforces.net/contest/1714/problem/D. The dp idea is that dp[i] represents the answer for the problem for prefix up to position i. dp[i] takes the longest string with an occurrence ending at position i and then checks the dp answer for all positions within the string occurrence (except at i) and then the position to the left of the beginning of the string occurrence (quite similar to the tutorial solution). However, I am getting wrong answer on test case 9 still. I don't know quite why...

Could someone take a look at this submission to see what is wrong? https://codeforces.net/contest/1714/submission/293576606 (scroll to bottom for actual code, above is template stuff)

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By ycperson, history, 4 weeks ago, In English

I was doing this problem: https://codeforces.net/contest/1730/problem/B and I have submitted 3 versions of binary searching on the answer and all of them are failing on test case 3 (wrong answer 36th numbers differ — expected: '40759558.0000000', found: '40759600.0000000', error = '0.0000010') -- all of them produce the same "wrong" answer.

I might be missing something stupidly obvious here but I am actually losing my mind right now. Could someone take a look at what could be going wrong?

In case you do not want to read the problem statement itself:

  • Given a bunch of functions of the form f(x) = |x — x_i| + t_i and if we define a new function g(x) as being the max across all the functions at x, we want to find the x value that minimizes g(x).

Submissions:

https://codeforces.net/contest/1730/submission/292825262 (binary searching on the position since the time function is convex) https://codeforces.net/contest/1730/submission/292826727 (binary searching on the time since it is monotonic)

Scroll to the bottom for the actual code. Thanks in advance.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it

By ycperson, history, 5 weeks ago, In English

This might seem like a bit of an exaggeration but I genuinely mean it when I say WTF ... In today's div3 contest, I could have been rank ~500 or so but instead have finished at ~1500 ranking. Why? Because in solving E, my solution was entirely correct except for the fact that I returned a char from one of my template functions instead of an int....

This is heartbreaking especially since that could have pushed me to expert. It's a hard pill to swallow, but I suppose I need to be even more diligent in checking the basic stuff about the implementation before questioning the correctness of more substantial details whenever I am debugging.

This is also a heads-up to people reading this -- do not suffer from this BS like I have smh.

Full text and comments »

  • Vote: I like it
  • -18
  • Vote: I do not like it

By ycperson, history, 2 months ago, In English

This is just some advice I've accumulated from my experience with cp thus far:

(1) Stop worrying about rating. If you're like me, perhaps you care about rating and contest performance a lot and take individual losses quite harshly. In fact, you may even act them into existence by worrying or anticipating that you will underperform in real contests. I have this experience where, even though I perform quite well during practice on my own and virtual contests and I know I'm able to solve hard problems, I choke when it comes to the real contest. This is usually due to the pressure I put on myself to redeem myself for recent losses and/or making a big deal out of taking a little too much time on a single problem in a contest.

(2) Actively push when you are solving problems. Just because you may not intuitively come up with a solution to a problem upon reading it does not mean you can not solve it. You have to push yourself to the point of feeling unnatural -- conjecture, guess and prove or disprove, make observations, do not be afraid of spending time understanding various examples, etc.

(3) Strong emotions never help -- both positive and negative. Of course, it is pleasurable to solve a hard problem after a good while of thinking and struggle, but the positives are just as intense as the negatives. If you allow yourself to attach your self-worth to your contest success, you will feel quite miserable. This is not to suggest not caring about contest performance -- by all means, keep practicing and trying to improve, but stop taking particular contest failures and failed attempts to solve problems so personally. Be as objective about the process as possible. Don't chalk up every success as being personally driven and allow every failure to seem like an incredible injustice done against you.

Full text and comments »

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

By ycperson, history, 2 months ago, In English

I have genuinely hit rock bottom in terms of mentality and keeping it the f**k together during contests. I'm literally writing this during contest time because I don't even care to further try. My last 7 or so contests have gone so dogs**t that I genuinely can not even bring myself to try any longer. And it's not even because of a lack of practice -- I have done over 100 CSES problems, > 200 USACO Bronze and Silver problems, and 300+ on codeforces. Yet still, I manage to s**t the f**king bed during every real contest lately. While, on the other hand, I perform perfectly fine in virtual contests (expert level).

Full text and comments »

  • Vote: I like it
  • -2
  • Vote: I do not like it

By ycperson, history, 3 months ago, In English

I have been considering the concept I've tried over the last 2 days of the Daily Blog, and I've reached the conclusion that it is sort of unnecessary. I will continue to work on CP everyday of course, and for those of you who may be interested in seeing my daily progress overtime, I have been keeping a spreadsheet of problems and notes on them for many months now. I will make it publicly viewable if/when the time is right, but for now, I feel I need to work without the pressure of posting everyday and just work on my own without this nuisance (for a lack of better wording).

I just want to state that the purpose of my last few blogs was to say that sufficient work can still propel you to significant heights in CP, and I still intend to show that to the best of my ability, but of course it will take time and the work must be done in relative silence.

Full text and comments »

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

By ycperson, history, 3 months ago, In English

I was able to get in some practice from the Div 3 contest today. Not a terrible performance by me, but I should have done better. I didn't give enough time to think about E and immediately moved to G. I was on the brink of implementing G completely in time but could not. I need to stop wasting time thinking about random stuff while I think about single problems. I also need to give a bit more time thinking about each problem before choosing to move to another one.

Problems:

https://codeforces.net/contest/2014/problem/A

https://codeforces.net/contest/2014/problem/B

https://codeforces.net/contest/2014/problem/C

https://codeforces.net/contest/2014/problem/D

https://codeforces.net/contest/2014/problem/G

Full text and comments »

  • Vote: I like it
  • -1
  • Vote: I do not like it

By ycperson, history, 3 months ago, In English

I was able to get in a somewhat suboptimal amount of practice today. I did the Div 2 contest but struggled a bit due to problem C (which was actually my first interactive), but other than that, I only did 1 problem. I intend to do more practice than that each day and will try to make as much time as possible for CP practice since I am a university freshman right now as well, which gives a bit less leeway timewise.

With that out of the way though, the problems from today demonstrate that I require greater mathematical thinking involved in my solution process rather than just relying on intuitive ideas and proof by AC.

Today's problems:

https://codeforces.net/contest/2013/problem/A

https://codeforces.net/contest/2013/problem/B

https://codeforces.net/contest/2013/problem/C

https://codeforces.net/contest/1951/problem/C

Full text and comments »

  • Vote: I like it
  • -3
  • Vote: I do not like it

By ycperson, history, 3 months ago, In English

Recently, I have been posting a lot of comments on others' posts regarding feeling that aptitude and IQ are necessary for reaching substantial heights in CP. I disagree, and there are probably more than enough examples in support of my position on codeforces and other CP platforms. Nonetheless, since I am trying to improve at CP myself, I intend to post every day from now on to provide an update on my progress in order to keep a literal complete record of my progress starting from specialist. I can guarantee you that I do not have any sort of great natural aptitude, so this should be interesting to see over time. I have been doing CP for just under a year at this point in time, so this daily record is simply a digital tracking of the progress I intend to make anyways. It is intended to encourage those that are discouraged by their own struggles -- to see that work actually does matter. If you do enough, you can reach significant heights still -- it just may take a bit longer than other people.

This will also provide me a bit of accountability for making some movement every single day, which I have been doing for almost 2 months at the moment anyways.

Full text and comments »

  • Vote: I like it
  • -11
  • Vote: I do not like it

By ycperson, history, 3 months ago, In English

I was doing this problem https://codeforces.net/contest/1822/problem/G1 recently, and I was comparing my code to the editorial implementation and I kept getting TLE again and again, trying to make the code more and more similar to the implementation given. The ultimate thing that allowed AC was changing the static array "a" to a vector of size n as in the implementation. Anyone know why the vector performs better? Because I thought static arrays were faster if anything.

My AC submission: https://codeforces.net/contest/1822/submission/280480288

My submission just before that (using static array a): https://codeforces.net/contest/1822/submission/280480106

(Just scroll down to the main function at the very bottom -- there is a bunch of template stuff above it not for the problem).

Thank you in advance for any help.

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it