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 …
Well, I think PHP is great, but apparently somebody thinks that it is replacble in most cases if it is not with MySQL Many online judges support PHP submissions. …
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 …
Well, sometimes, you probably need to optimise your MySQL tables. In order to avoid the hassle loggin to your remote SSH server, you probably want to write a script …
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 …