ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1731. Dill

Always read the statement
Posted by Pastafarianist 26 Nov 2011 22:04
1, 2, 3, ..., n
1, n+1, 2n+1, ..., (m-1)*n+1

I have even written a testing program to verify this and it reports that there is no mistake. I checked this on a few inputs like (2, 3), (1, 50), (50, 1), (50, 50) and it always seems to be correct. Can anybody give me a hint on where my mistake is?

UPD:
Got AC after changing to this:
1, 2, 3, ..., n
n+1, 2n+1, ..., m*n+1

The question remains. WTF?

UPD2:
Read the statement again and figured this out. All number should be different. In my solution, 1 was repeated twice.

Edited by author 26.11.2011 22:13