B. Mashmokh and ACM                                                                                             time limit per test 1 second                                                                …
A. Mashmokh and Lights time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Mashmokh works in a factory. At the end of each day he must turn off all of the lights. The lights on the factory are…
, a2, ..., an such that his boss will score exactly k points. Also Mashmokh can't memorize too huge numbers. Therefore each of these integers must be at most 109. Input The first line of input contains two space-separated integers n, k (1 ≤ n ≤ 105; …
Codeforces Round #297 (Div. 2)A. Vitaliy and Pie Time Limit: 2 Sec  Memory Limit: 256 MBSubmit: xxx  Solved: 2xx 题目连接 http://codeforces.com/contest/525/problem/A Description After a hard day Vitaly got very hungry and he wants to eat his favorite pot…
Codeforces Round #267 (Div. 2) C. George and Job题目链接请点击~ The new ITone 6 has been released recently and George got really keen to buy it. Unfortunately, he didn't have enough money, so George was going to work as a programmer. Now he faced the follow…
点我看题目 A. Mashmokh and Lights time limit per test:1 secondmemory limit per test:256 megabytesinput:standard inputoutput:standard output Mashmokh works in a factory. At the end of each day he must turn off all of the lights. The lights on the factory a…
, b2, ..., bl (1 ≤ b1 ≤ b2 ≤ ... ≤ bl ≤ n) is called good if each number divides (without a remainder) by the next number in the sequence. More formally  for all i (1 ≤ i ≤ l - 1). Given n and k find the number of good sequences of length k. As the a…
A. Mahmoud and Longest Uncommon Subsequence time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output While Mahmoud and Ehab were practicing for IOI, they found a problem which name was Longest comm…
D. Bad Luck Island Time Limit: 1 Sec  Memory Limit: 256 MB 题目连接 http://codeforces.com/contest/540/problem/D Description The Bad Luck Island is inhabited by three kinds of species: r rocks, s scissors and p papers. At some moments of time two random i…
Mashmokh's boss, Bimokh, didn't like Mashmokh. So he fired him. Mashmokh decided to go to university and participate in ACM instead of finding a new job. He wants to become a member of Bamokh's team. In order to join he was given some programming tas…