Dazzler's blog

By Dazzler, history, 7 years ago, In English

I was trying to solve this problem using the palindromic tree. But I couldn't. Can someone help me?

Full text and comments »

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

By Dazzler, history, 7 years ago, In English

How can we implement maximum bipartite matching using bfs? Here is the dfs implementation of maximum bipartite matching using Ford Fulkerson algorithm for maximum flow.

Full text and comments »

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

By Dazzler, history, 7 years ago, In English

There is an interactive problem asked in recent ongoing codejam qualification round. I am getting TLE again and again. I don't know how to use local testing tool given there. Please, someone, help me.

Full text and comments »

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

By Dazzler, history, 7 years ago, In English

Hello codeforces, I was trying to solve this problem. But i am getting TLE even after applying O(n*log(n)) solution. Here is my code. Thanx in advance.

Full text and comments »

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

By Dazzler, history, 7 years ago, In English

There are n(1<=n<=1e5) numbers stored in an array. U have to select a number p and k(2<=k<=3) numbers from array. U will win if gcd of selected k numbers is equal to p. What should be the value of p to maximize the probability of winning. Find p and probability to win if p is selected.

Full text and comments »

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

By Dazzler, history, 7 years ago, In English

Hello friends, i appeared in codeforces round 433DIV2. My solution for problem DIV2C passed the pretests but didn't pass the system test. Because there was a bug in the line 65 & 66 because i had erased the iterator and then tried to use the value stored at it(i just replaced line 65 & 66 with each other, then solution got accepted). So, it shouldn't have passed pretests even. but still it passed . Can someone explain me this abnormal behaviour of iterator.

Full text and comments »

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

By Dazzler, history, 7 years ago, In English

I was trying to solve problem. In this problem, the constraint for weight is not given. So i assumed it to be less than 1000000 and solved it accordingly. Here is my code. But it is giving RE. I have wasted a whole day to rectify it but i couldn't. Please someone help me. EDIT: I used set in place of array to store weight. So, there should not be any case of overflow.But still getting RE with code.

Full text and comments »

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