err0r's blog

By err0r, history, 4 months ago, ,

In order to solve this problem i need to know occurrence of value X or the Kth element(after sorting) in a subarray for an array. can implicit treap be used to find the Kth element(after sorting) of a subarray?

In Implicit Treap the key values are not stored explicitly so in my approach i cant use implicit treap like BST to find Kth element.

Read more »

• 0

By err0r, history, 5 months ago, ,

How can i find maximum perfect matching in a bipartite graph?

it can be a a sub-graph of main bipartite graph? sub-graph contains a subset of vertex from left side and a subset of vertex from right side. if we take a vertex, each vertex that shares a edge with the selected vertex must be present in the subset of vertex too.

Thanks in Advance ^_^

Read more »

• 0

By err0r, history, 14 months ago, ,

i have solved two similar problem recently 1027F & 875F

To solve 1027F i tried approach this problem using binary search and dsu but i am getting tle but my straightforward solution using kuhns algorithm got AC.

Can anyone explain the reason behind it? why kuhn`s is so fast here and why my dsu with binary search got TLE.

links to my submission

and to makes things more complicated for me

875F i tried this problem using kuhn got tle but i got AC using DSU.

links to my submission

it will be very helpful if anyone can explain this to me!! when and where should i use DSU or kuhn!!

kind regards

Read more »

• 0

By err0r, history, 16 months ago, ,

these are the problems i solved so far!

*any other suggestions/advice related to flow will be very helpful!!
(specially how to approach them as i find it very difficult)

Read more »

• +16

By err0r, history, 16 months ago, ,

• +3

By err0r, history, 17 months ago, ,

Recently i learnt Aho-Corasick Algorithm for Pattern Searching. To find all occurrences of pattern strings in text string. i store all possible output links in my prefix tree(trie)

But case such as
text = aaaaa
pattern = {a, aa, aaa, aaaa, aaaaa}
will give me huge number of output link!

my implementation is there a better way to store them?

Read more »

• +8