cf的一次数学场... 递推 C 题意:长度<=n的数只含有7或8的个数 分析:每一位都有2种可能,累加不同长度的方案数就是总方案数 组合 G 题意:将5个苹果和3个梨放进n个不同的盒子里的方案数. 分析:经典的组合题目:C(n+5-1, 5) * C(n+3-1, 3).因为可以同一个盒子放多个苹果或梨,在n基础上多k-1个,看成每个盒子放一个. 组合 H 题意:将5个车放在n*n的棋盘上的方案数. 分析:也是经典的题目,先选行,再全排列,即C (n, 5) * A (n, 5). 枚举 I…
Description IT City company developing computer games decided to upgrade its way to reward its employees. Now it looks the following way. After a new game release users start buying it actively, and the company tracks the number of sales with precisi…
Description The Department of economic development of IT City created a model of city development till year 2100. To prepare report about growth perspectives it is required to get growth estimates from the model. To get the growth estimates it is req…
Description IT City company developing computer games invented a new way to reward its employees. After a new game release users start buying it actively, and the company tracks the number of sales with precision to each transaction. Every time when…
Description One company of IT City decided to create a group of innovative developments consisting from 5 to 7 people and hire new employees for it. After placing an advertisment the company received n resumes. Now the HR department has to evaluate e…
Description After a probationary period in the game development company of IT City Petya was included in a group of the programmers that develops a new turn-based strategy game resembling the well known "Heroes of Might & Magic". A part of t…
Description The numbers of all offices in the new building of the Tax Office of IT City will have lucky numbers. Lucky number is a number that consists of digits 7 and 8 only. Find the maximum number of offices in the new building of the Tax Office g…
Description The city administration of IT City decided to fix up a symbol of scientific and technical progress in the city's main square, namely an indicator board that shows the effect of Moore's law in real time. Moore's law is the observation that…
Description The HR manager was disappointed again. The last applicant failed the interview the same way as 24 previous ones. "Do I give such a hard task?" — the HR manager thought. "Just raise number 5 to the power of n and get last two dig…
题目链接:http://codeforces.com/contest/630/problem/K K. Indivisibility time limit per test 0.5 seconds memory limit per test 64 megabytes input standard input output standard output IT City company developing computer games decided to upgrade its way to…