I am solving this problem and I couldn't find any source code for the solution online so if anyone solved it before or find a source code for it please comment with the link.
IF you have ranges and you want to query on how many elements in this range but every cell have to contain at most one element and the updates are on the range whether be +1 or -1. this could be done with segment tree and how ?
Could anyone explain to me the proof for such a method of checking whether a number is primitive root or not http://zobayer.blogspot.com/2010/02/primitive-root.html
why should i check only certain numbers to be equal to one or not ?
Could anyone explain to me why this solution for this problem is true problem http://codeforces.com/contest/313/problem/E Solution http://codeforces.com/contest/313/submission/9096673
the problem is http://codeforces.com/contest/513/problem/C
the solution is http://codeforces.com/contest/513/submission/9761274
i wonder how this solution not TLE it is 1009*1009*6*6*6 which is TLE
Why the solution to this problem is not by dynamic programming and how the solution is to sum up the average among each group multiplied by the probability .
i couldn't understand this problem solution okay i understand that he get the LIS in nlogn twice from both sides preprocess for the length of increasing subsequence till now then he makes a loop and calculate the min of LIS from both sides what i don't understand is how he guaranteed that the LIS max number will be smaller than ith element in the original array.
Hello everyone i was solving a problem which wants the number of faces in a planar graph of N nodes E edges. it is solvable by euler formula but what is the proof of this formula this link has alot of helpful proofs but i could understand the 3rd proof if anyone intersting in understanding it please explain it to me.
thanks in advance :)