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 1787. Turn for MEGA

WA14?
Posted by Xeqlol 22 Oct 2010 18:53
Есть у кого нибудь идеи?
Re: WA14?
Posted by VolkovStas[MSU_Tashkent] 26 Jun 2011 15:56
Similar problem. i have WA at the test #14. I can not understand what I have missed
Re: WA14?
Posted by jambas92 17 Sep 2011 20:07
Who has a WA14 try to use this test:
4 4
1 5 1 5
right answer should be: 1
Re: WA14?
Posted by Toshka 19 Feb 2012 20:38
program mega;
var
   n, k, p, i, s:integer; a:array[1..100] of integer;

begin
 read(k, n);
 for i:=1 to n do
             read(a[i]);
 for i:=1 to n do
  if k<a[i] then
              begin
                p:=k-a[i];
                a[i+1]:=a[i+1]+1;
              end;
  writeln(a[n+1]);
end.

Помогите плиз в чем ошибка!
Re: WA14?
Posted by {SESC USU} Zaynullin 21 Feb 2012 13:32
what do variable p?


Edited by author 21.02.2012 13:33
Re: WA14?
Posted by Angel 25 Feb 2012 22:49
i have that respons, but actually i didn't pass((
Re: WA14?
Posted by Chuk.Charles 8 Sep 2015 19:06
Тоже ошибка в 14 тесте, для этих условий:
4 4
1 5 1 5
моя программа выдает правильный результат
Re: WA14?
Posted by Chuk.Charles 8 Sep 2015 19:17
Нашла ошибку
Попробуйте такой тест:
5 3
6 5 7

Edited by author 08.09.2015 19:19