understanding the example to this problem? help!

Revision en2, by kofhearts, 2015-12-23 08:36:51

The question is here:

http://codeforces.com/contest/94/problem/C

In this problem how come the answer to the following input is 1?

Input: 21 5 1 21

Correct Answer: 1

My understanding is that if there are 21 files with row size 5 then the layout of the files is as follows:

1    2    3    4    5
6    7    8    9    10
11   12   13   14   15
16   17   18   19   20
21

Here, we need two selections 1st from 1 to 20 and 2nd for 21. Please correct me if i am wrong. Thanks for help!

Tags math

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English kofhearts 2015-12-23 08:36:51 20
en1 English kofhearts 2015-12-23 08:36:16 560 Initial revision (published)