Category: simulation
At a lemonade stand, each lemonade costs $5. Customers are standing in a queue to buy from you, and order one at a time (in the order specified by …
Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents your maximum jump length at that …
Some complex tasks might not be so complicated. For example, to emulate the matrix printing like the following. All you need is just a few lines of code in …
The problem is from codeforces: http://www.codeforces.com/contest/268/problem/B This is clearly a math counting problem. In easy description, the problem can be described as: how many numbers are there in this pattern, …
January 24, 2013
algorithms, beginner, brute force, codeforces, greedy algorithm, implementation, math, programming languages, python, search, simulation, tricks
The problem is from codeforces: http://www.codeforces.com/contest/265/problem/B This problem is not difficult, but it took me nearly 1:30 hr to get it right during the contest. I thought at first, the …