Tag: math
The problem is from codeforces: http://codeforces.com/problemset/problem/180/C Let n be the number of lower-cases that have encountered so far from left to right; So everytime there is an uppercase letter, …
The full permutation of a list can be easily programmed using recursive algorithms. The number of the full permutation results is where is the number of elements to permutate. …
The problem is from codeforces: http://codeforces.com/problemset/problem/200/B This is another easy problem as long as you figure out how to compute the value. For example, The answer = Python gives …
The problem is from codeforces: http://codeforces.com/problemset/problem/197/B It has been a while since last time I submitted Python solutions to codeforces. This time, I pick a math problem that can …
Simulated Annealing (SA) is a meta-hurestic search approach for general problems. It is based on the process of cooling down metals. The search algorithm is simple to describe however …