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 1064. Binary Search

Very Very Bad Task Description
Posted by Laise 23 Jan 2009 01:27
words "... and array A was filled with a nondescending integer sequence." means another that author want to say.

E.g. nondescending array consists of only values 666, so which N can give us result (i=666,L=1)? of course all possible 1..MAXN =) but my AC prog output 1333-1334 =\... very very strange, don't you mind?
Re: Very Very Bad Task Description
Posted by ile 13 May 2010 02:52
True. The problem statement is wrong!!

Solution requires array A to be { 1, 2, 3, ... } which is not "... and array A was filled with a nondescending integer sequence.". That could mean ANY NON-DESCENDING sequence, i.e. A could be { 1, 1, 1, 10, 12, 13 ...} which is completely different problem!
Re: Very Very Bad Task Description
Posted by Sandro (USU) 13 May 2010 10:46
You are wrong. You are given only i and L in this problem, x is unknown. So array shouldn't be { 1, 2, 3, ... }, any nondescending array is OK.
Re: Very Very Bad Task Description
Posted by ile 20 May 2010 01:42
Ok, I might be wrong. But what do you think is the answer for input like: 666 1?

Aren't ALL integers in [1, 10000] are possible answers??
array might be { 666, 666, 666, 666 ... } which does not contradict problem statement, yet any size of N in [1, 10000] will give

"Found item i = 666 in L = 1 comparisons"

right? meaning answer should be "1 1 10000" and not "1 1333 1334"...
Re: Very Very Bad Task Description
Posted by Sandro (USU) 20 May 2010 03:21
If N = 10000 and array is { 666, 666, 666, 666 ... } then output of the program will be "Found item i = 5000 in L = 1 comparisons". Read the program code carefully.
Re: Very Very Bad Task Description
Posted by ile 20 May 2010 03:52
I apologize. My bad. Misunderstood the problem statement... "item i" kinda misleads...