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 1725. Sold Out!

123 why WA5?? [5] // Problem 1725. Sold Out! 17 Oct 2009 17:41
#include<stdio.h>


int n,k,answer;
int main()
{
scanf("%d %d",&n,&k);
int len = n/2;


if(k==len)
{
printf("0");
return 0;
}
else if(k<len)
{
answer = len - k;
}
else
{
answer = k - len - 1;
}

printf("%d",answer);
}
Tolya_wolf Re: why WA5?? [3] // Problem 1725. Sold Out! 15 Jan 2010 11:27
I have the same problem:
test no. 5, wrong answer.
(Sorry, i don't know english well)
Я запихнул свой алгоритм в циклы for, ввод всех возможных значений, вывод.
Просмотрел всё вручную, нет ошибок!
Zefick Re: why WA5?? [2] // Problem 1725. Sold Out! 19 Mar 2010 17:37
  Carefully read the condition.
  Visitor chooses a side in such a way that the number of people over whose feet he will stumble will be minimal.
  It is not always the shortest path.

  Внимательнее читайте условие.
  Зритель выбирает сторону так, чтобы споткнуться о меньшее число людей.
  Это не всегда наикратчайший путь.
DNS Re: why WA5?? [1] // Problem 1725. Sold Out! 8 Jun 2010 03:24
Try test  50 50  answer 47
          40-20  18
          40 27  24
          ....
          ????
          PROFIT!!!

Edited by author 08.06.2010 03:26

Edited by author 08.06.2010 03:27
Yaroslav Re: why WA5?? // Problem 1725. Sold Out! 1 Mar 2020 23:45
you are ...
ONU_Antananarivu Re: why WA5?? // Problem 1725. Sold Out! 26 Jul 2011 15:37
k == n is the same situation as k == 1