Dannypa's blog

By Dannypa, history, 2 years ago, translation, In English

Hi! I am in search for problems that can be solved using the following technique: if we need to merge two sets in dfs, we put elements of the larger one into the smaller one, and in total asymptotics is $$$O(nlogn)$$$. If anyone knows of this kind of problems, i would be very grateful if you post some in the comments.

Full text and comments »

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

By Dannypa, history, 3 years ago, In English

Hello, I was trying to solve a problem 1615E - Purple Crayon from the latest Global round, and my solution is somehow failing at the first big test. I get RE with exit code 2147483647 (I assume it is -1, but fitted in unsigned int type). Can someone please tell what could be the reason of the error?

Here is my submission: 140965891

Sorry for a very specific question, but i've checked my code multple times and haven't found anything suspicious.

Full text and comments »

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

By Dannypa, history, 3 years ago, In English

Hello, codeforces!

In the last contest, Technocup 2022 - Elimination Round 1, there was a problem 1583D - Omkar and the Meaning of Life. I tried to solve it, but got TLE on test 2. Here is my submission: 132282353. The strange thing is that when I tried to test it locally, it worked fast. I counted the time it took for my program to finish (without input: I surrounded each input with block like that:

            int current_time = clock();
            total += (current_time - start_time);
            cin >> k;
            start_time = clock();

), and turned out it took only 16 ms. So, I have a question: why could it be, that the code work without tle on my machine and get TLE on cf server?

Full text and comments »

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

By Dannypa, history, 3 years ago, In English

Hello, friends!

I've got rating changes +93, +120, -107, -50, +143 in last month. Why are they so huge? Aren't they supposed to be like +20, -11, -23, +60 (one time in a month!!), +21?

Has anyone experienced something like that? Is it okay? Why is it happening?

P.S. I got a feeling that the post will get downvoted...

Full text and comments »

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

By Dannypa, history, 3 years ago, In English

Hello, Codeforces!

I got tired of copying and pasting tests million times, so I've written a testing system to simplify my life:) Basically it remembers tests that you inputted, and when you want to retest your program you just have to press only one button (well, actually two, if we count Enter).

I think something like that is already created, but I haven't heard of it, and after all it was fun writing such system, so if anyone is interested and don't know equivalents, you are very welcome:). It most probably have some bugs, but I haven't found any yet. For using it you will need python 3, colorama (can be installed with pip install colorama if you have python installed) and g++ compilier.

I think it is legal to use at contests, but if someone think it is not, please, write in comments.

Enjoy :)

Full text and comments »

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

By Dannypa, history, 3 years ago, translation, In English

Hello codeforces, I' written pretty much the same thing in editorial comments but no one replied, so i duplicate it here:

In 1543D2 - ПРС и криминальный список (сложная версия) problem of Codeforces Round 730 (Div. 2) I experienced something strange. On my machine, the answer was printed, but in system I got WA. Here's my solution: 121640373. System said that on test 5 3 with start password 1 I tried five times and haven't guessed it, but when I was testing locally my program did. Can anyone please tell me why did it happen? Sorry for bad English:)

Full text and comments »

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