Tag: python
The method of Monte Carlo (MC) relies on repeated random sampling. It is often used in computing simulations. For example, to compute the PI value, one can generate as many …
May 19, 2012
beginner, brute force, code, code library, codeforces, implementation, math, programming languages, python, tricks
The problem is from codeforces http://www.codeforces.com/problemset/problem/82/A This is interesting because it seems like those guys thing: acting strange. This problem can be transformed into the following: 12345 1122334455 11112222333344445555 …
The problem is from codeforces http://www.codeforces.com/problemset/problem/158/B Solution is easy: First you need to sort the group numbers in desending order. You create two index pointers, pointing to the start …
The problem is from codeforces http://www.codeforces.com/problemset/problem/12/A This is probably the easiest problem I’ve ever seen in codeforces…. no tricks, no math or algorithms. It is very straightforward. The python solution …
The problem is from codeforces http://www.codeforces.com/problemset/problem/49/A Just came back from Tesco, have shopped for the food next week. Feeling a bit tired, however, I enjoy solving small problems using …