vatsal's blog

By vatsal, history, 17 months ago, In English,

I just saw that CF predictor here is not working. This is because it didn't calculate rating for CF Round 520 and thus it assumes are current rating is the one before #520 took place and calculates changes according to that. It also assumes 1600+ people to be rated too. Is this no longer under development?

Read more »

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

By vatsal, 22 months ago, In English,

How do I solve this DP problem? Notice the word "tunnel" in the problem statement which confused me. https://www.e-olymp.com/en/problems/5852

Read more »

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

By vatsal, history, 2 years ago, In English,

What is this bug? A red is placed below yellow participants. Is the rating page updated after some fixed interval of time?

Read more »

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

By vatsal, history, 3 years ago, In English,

I always wondered if there was a program to draw the graph given the input of the graph just like the input given in graph problems. My friend introduced me to Graphviz and showed me how it draws the graph given the input after some tweaking and scripting. Does anyone know how to do the same on Ubuntu 32 bit system? I am facing problems reproducing the script,etc as he uses Windows.

UPD: I have now solved the problem. It was something with the files. Thank you for your kind support.

Read more »

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

By vatsal, history, 3 years ago, In English,

I am stuck on a problem. I have read the editorial but I am not able to understand it. Can someone please give some other view on the solution or explain the editorial solution in somewhat more detailed way?

Read more »

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

By vatsal, 3 years ago, In English,

I have seen that many problems can be solved by DSU on tree technique. However, it doesn't have any proper tutorial. I saw this blog but I see most of it is code and I am unable to understand it that way. Can someone please share some resource or explain how to do this ?

Read more »

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

By vatsal, history, 3 years ago, In English,

Here is my sumbission on problem. I am getting WA on test8.What I do is I find all the incycle vertics and put them into set and then update the distances from it. Can anyone please point out the mistake in my code?

Read more »

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

By vatsal, history, 3 years ago, In English,

Hello codeforces, I have found this great resource for learning about centroid decomposition in a tree.I tried a lot but I couldnt find any good and beginner friendly resource except the IIITH blog on quora. I am sharing the link here: https://www.youtube.com/watch?v=2izuGA8T8IE

Read more »

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

By vatsal, history, 3 years ago, In English,

How do I solve problem F from Atcoder Regular Contest 68? Can anyone please explain me in details? The editorial for the problem is long so I think it might be detailed but I don't understand that language(Japanese).

Read more »

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

By vatsal, history, 3 years ago, In English,

How to solve this problem from POI? It simply states: Given a tree find a triplet of nodes (a,b,c) such that distance between each other is same!

Read more »

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

By vatsal, history, 3 years ago, In English,

What algorithm should I use to find the number of rooted trees in an undirected graph? This problem requires it

Read more »

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

By vatsal, history, 4 years ago, In English,

How should I approach the problem 13049 ? I tried a simple approach (for lopps,etc) but it timed out as expected. Please provide a detailed(:P) explanation. P.S Anything about SQRT Decomposition?

Read more »

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

By vatsal, history, 4 years ago, In English,

I have read Horner's rule for polynomial evaluation which does the work for O(n) where n is the degree of polynomial. Example: Let's take a polynomial of degree 3 -> 3x^3+ x^2 + 9 We are given many value of 'x' and a coefficient vector like [3,1,0,9] and let's take 'x' take to be 3 then it will be evaluated as 3*3^3 + 3^2 + 9 = 81+9+9 = 99 so the answer will be 99. Let's say we have q queries so Horner's rule will take O(nq). Is there any better algorithm? I have heard about FFT and DFT and I have consulted many resources but all in vain. Can anyone help me to understand it please?

Read more »

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

By vatsal, history, 4 years ago, In English,

Where can i find detailed and intuitive explanation of Regex function in c++ with certain examples. I see so many string problems can be easily solved with RegEX so it seems intriguing to me. P.S Which algorithm (what complexity) is used in regex to find a substring in a string?

Read more »

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

By vatsal, history, 4 years ago, In English,

How can I approach Uva 624 Uva 624 . Simplified Problem Statement: A set S={a,b,c,x,y} is given and a target sum is given so we have to find the elements which sums to the target sum or even very close to it. I think its a DP problem but I don't know how to approach it so giving the algorithm and explanation would be very nice.

Read more »

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

By vatsal, history, 4 years ago, In English,

Hello Readers, I have learnt about bit operators so I moved onto Uva OJ to solve bunch of problems related to it. When I opened a problem and read it. It looked really hard and unrelated to Bit Manipulation so I skipped it and moved on to next but the next one was also quite hard for me. What do you suggest? Please provide a good tutorial on how to use bit manipulation in CP. Should I do easy problems ? If yes, which problems are easy? Please help. Problems: http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=3077 http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem&problem=1205 Thanks for the really great community.

Read more »

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

By vatsal, history, 4 years ago, In English,

Hello Readers, I have seen that many people don't use scanf or cin or cout or printf but their own input output functions . I have heard that some people were able to pass "naive" algorithm under time limit with the help of optimizations. I would love if everyone here would share their optimization codes and explain meaning of every line so that "everyone" would get it in C++. I only know ios_base::sync_with_stdio(false); cin.tie(0); Also I don't understand the meaning of these lines. Thanks for your efforts. :)

Read more »

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

By vatsal, history, 4 years ago, In English,

I am good at implementation and data structures problems but whenever there is a question with maths involved and high logical thinking and therefore I am stuck at it. I think this is the only barrier between me and maths problems are lack of my logical and mathematical thinking. Any idea how I can improve it?

Read more »

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