Pumkinhead_Me's blog

By Pumkinhead_Me, history, 6 months ago, In English

Let's say I have a big range (<= 1e9) from l to r. I need to generate N distinct numbers from this range using testlib. What would be the cleanest way to do that?

Full text and comments »

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

By Pumkinhead_Me, history, 7 months ago, In English

Hello! I have recently been solving a task, and I have encountered some weird behavior on codeforces. I have submitted 2 solutions: https://mirror.codeforces.com/contest/1304/submission/343285292 https://mirror.codeforces.com/contest/1304/submission/343285436

One of them received the "Idleness limit exceeded on test 1" verdict, while the other got "Accepted". However, the only difference between these 2 submissions is the following line:

int elemCount = lcaList.size();

int elemCount = 2*n-1;

Can anyone explain to me what is causing this behavior?

Edit: The ILE seems to only happen on G++ 20, not G++ 17 or 23. Compiler bug?

Full text and comments »

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