Iremia's blog

By Iremia, 3 years ago, In English

In 498C - Array and Operations , I am applying maximum matching using Kuhn's algorithm.

My solution:

I have split the graph into two parts(even and odd). I am using multisets to store the prime factors of all the elements of the array.

We will always divide by primes so for each prime I am building a graph containing only those edges whose vertices contain the current prime. Then using Kuhn algorithm I am finding the match for each vertex and removing the current prime(only 1) for this vertex and its match from their respective multisets and I also increment the answer by 1.Then I repeat this process for the current prime till there are no more matchings and then move to the next prime.

My submission: 126390066

Please give me a counter case or tell me where I am wrong, I will really appreciate it.

Full text and comments »

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

By Iremia, 4 years ago, In English

I was trying to solve the problem 1200E - Compress Words using polynomial hashing , but the solution failed on test 136.

First I was using 257 as the base. Here is the submission : 117819925 .

Then I just changes the base to 311 and it got accepted. Here is the accepted one : 117820736 .

As you can see , I have only changed the base (on 7 th line in the submissions) and nothing else. Please could someone help me out and tell me whats wrong?

Full text and comments »

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

By Iremia, history, 4 years ago, In English

Since yesterday ,whenever I open a problem statement it opens for 30 seconds or so and then all the mathematical characters show Math processing error. Is it just me or everyone is facing this problem? And if possible please tell me how to fix it.

Full text and comments »

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

By Iremia, history, 4 years ago, In English

Here is the problem : 339D - Xenia and Bit Operations

Here is my submission: 100843144

It says wrong answer at test case 7.

Full text and comments »

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

By Iremia, history, 4 years ago, In English
  • Vote: I like it
  • 0
  • Vote: I do not like it