Category: brute force
July 2, 2012
algorithms, beginner, brute force, code, implementation, math, programming languages, python, technical, tricks
This article will describe a quick and easy implementation of a algorithm that divides two integers with a high precision. Normally, an array is required to hold the results …
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 problem is from codeforces http://codeforces.com/problemset/problem/2/A To solve this problem, you will probably need to know the dictionary. In Python, the dictionary structure can be declared using notation {}. …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/192/A The given input to this problem can be held by a four-byte integer (32-bit). It is to search for two numbers and such …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/124/A Simply a math problem, however, using brute-force will pass the tests since the tests are weak (all numbers are smaller than 100) s …