You play a computer game. In this game, you lead a party of mm heroes, and you have to clear a dungeon with nn monsters. Each monster is characterized by its power aiai. Each hero is characterized by his power pipi and endurance sisi. The heroes clea…
Educational Codeforces Round 40 F. Runner's Problem 题意: 给一个$ 3 * m \(的矩阵,问从\)(2,1)$ 出发 走到 \((2,m)\) 的方案数 \(mod 1e9 + 7\), 走的规则和限制如下: From the cell (i, j) you may advance to: (i - 1, j + 1) - only if i > 1, (i, j + 1), or (i + 1, j + 1) - only if i <…
A - Noldbach problem 题面链接 http://codeforces.com/contest/17/problem/A 题面 Nick is interested in prime numbers. Once he read about Goldbach problem. It states that every even integer greater than 2 can be expressed as the sum of two primes. That got Nic…
Pashmak and Parmida's problem Time Limit:3000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Status Practice CodeForces 459D Description Parmida is a clever girl and she wants to participate in Olympiads this year. Of course she…
C. Commentator problem 题目连接: http://www.codeforces.com/contest/2/problem/C Description The Olympic Games in Bercouver are in full swing now. Here everyone has their own objectives: sportsmen compete for medals, and sport commentators compete for more…