hulm's blog

By hulm, history, 6 months ago, translation, In English

Hello dear CodeForces community!

I was solving this problem and submitted a solution, which should pass all sample tests. However, it is falling on the second test, where answer is 4. Everything is ok on my local machine, but for some reason it is returning 1 on CodeForces.

Next, I went to run the code and see my output on Custom Test. For GNU G++20 13.2(64 bit, winlibs) my output is 1.

But for GNU G++17 I am getting the correct answer!

So, I decided to submit my solution on using C++17, but still getting 1. Very strange.

Please, if you know what is happening, can you help me?

My submission with C++20: Click

My submission with C++17: Click

Full text and comments »

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

By hulm, history, 14 months ago, In English

Good morning/afternoon/evening/night dear codeforces community!

I have been learning Go language to start developing in Back-end, so I decided to practice it by solving simple problems from codeforces. However, I am facing a problem in this problem. Initially I implemented sorting by my own comparator to sort the paired(implemented via struct) array. However I got TLE. After that, I implemented merge sort by my own, and even after this I got TLE again. I thought that problem was in binary seacrh(maybe I write something wrong), so I replaced it with two-pointers method. Unfortunately I got TLE again. Can you tell me, is it possible to get "Accepted" in this problem using Golang?

The final version of code is right here -> https://codeforces.net/problemset/submission/580/226466440

Thanks for your consideration.

Full text and comments »

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

By hulm, history, 14 months ago, In English

Hello codeforces community! I am on my way to reach CM again, and I think that I have to solve constructive problems faster than usual. Can you give me an advice how to solve such uncomfortable problems fast enough in contests. I know that most of you will say to practice more, I can do it by myself. I am just asking, if you have any source of such problems?

Thanks for your consideration.

Full text and comments »

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