Mikemirzyanov1's blog

By Mikemirzyanov1, history, 5 years ago, In English

I got the news today from my college that I am not gonna have any farewell or graduation ceremony and no final exams. In just a minute I became an alumni it is very heartbreaking as I am not gonna meet my friends one last time. I am not able to divert my mind from this is someone else feeling the same.

Sorry this post is not related to programming, but I just wanted to share my emotions.

Full text and comments »

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

By Mikemirzyanov1, history, 5 years ago, In English

Hello everyone.

I think I have found a very huge bug in the Codeforces System which can potentially lead to destroying the purpose of Codeforces.

Alright so here is something I found.

During Div2/Div1 contests people are divided into groups and placed in different rooms for hacking purposes.

Suppose Alice is participating in Div2 contest and she solves a problem say problem B. She then has the option to lock the problem so that she can hack other people in her room. Locking a problem allows one to see another person's code for the same problem in the same room.

So far good, now begins the mischievous part.

To mess with someone from her room say Bob who has also solved problem B, Alice copies his code and submits it from her alternate account without making a single change in the code. What this will do is trigger the automatic plagiarism checker and Bob would get screwed up for having the same code as some other participant.

Alice has multiple accounts on Codeforces and she has the power to screw up everyone in her room for all the problems she solves

MikeMirzyanov Please look into this.

Also, provide suggestions if any in the comment section to tackle this problem.

P.S. Can someone in the comment section provide the What would happen if we use 100% of our brain meme I could not find it.

Full text and comments »

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

By Mikemirzyanov1, history, 5 years ago, In English

This submission gives MLE for using vectors of size 5e6. Why is that?

80500739

I am using binary search with lazy propagation so my algorithm runs in O(q * log(n) * log(n)).

Why should this be a problem?

Full text and comments »

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

By Mikemirzyanov1, history, 5 years ago, In English

Can someone please list some problems for MO's algorithm.

Full text and comments »

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

By Mikemirzyanov1, history, 5 years ago, In English

I submitted this solution using memoisation but it gave memory limit exceeded. Can someone please help me how to do this problem using recurison??

My submission 77834554

Full text and comments »

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

By Mikemirzyanov1, history, 5 years ago, In English

Hi can someone share the approach to find lexicographically largest substring in a string?

I know the answer will always be one of the suffixes but cannot find a way to analyze those suffixes efficiently.

Constraints |S| < 1e5

I need an O(n) approach or O(nlogn) without suffix array.

Any ideas are welcome.

[Solution](https://leetcode.com/problems/last-substring-in-lexicographical-order/discuss/363662/Short-python-code-O(n)-time-and-O(1)-space-with-proof-and-visualization)

I found this link on Leetcode but cannot understand it.

Full text and comments »

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

By Mikemirzyanov1, history, 5 years ago, In English

Problem -> Problem

I am trying something similar to digit dp where we need to find the number of numbers in the range a to b satisfying some property, just in this case we have strings.

My helper function is actually calculating the number of good strings which are lexicographically less than or equal s and do not contain the substring evil.

Then I simply subtract the answer for two cases.

Please help me it's almost two weeks

Spoiler

This solution only passes 15 test cases. Help me please.

Full text and comments »

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

By Mikemirzyanov1, history, 5 years ago, In English

This is the problem from today's codechef challenge.

problem

Can someone tell me what am I doing wrong as I have seen the code of lot of people and I am also doing the same thing as they have done.Also I have tried some test cases and they indeed give correct answer.

Can someone please help me please. code

Full text and comments »

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

By Mikemirzyanov1, history, 5 years ago, In English

Can someone share the details to construct the bridge tree provided we have the bridges? I have already seen the quora link for bridge tree but cannot understand as it uses edge list representation of graph which I don't know.

I know how to find bridges and need to perform dfs on the bridge tree, but how to construct it. Someone please help.

Full text and comments »

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