WHY Wa#8?>>>>PLease help me.There is my code...Thank you very much
Posted by
Search 16 Feb 2008 01:59
[code deleted]
Edited by author 18.02.2008 18:55
Re: WHY Wa#8?>>>>PLease help me.There is my code...Thank you very much
>n%2==0?r=n/k:r=n/k+1;/*<I think I wrong there.Is it true?*/
You are right there. Your mistake is in printing cycles, I think.
You ae in right way, but it is easier and more safely to scan numbers in matrix
Re: WHY Wa#8?>>>>PLease help me.There is my code...Thank you very much
Posted by
Search 16 Feb 2008 23:56
Thank you.I'll think that way.Please,can you give me test,which on my program give WA.Thank you!!!
Re: WHY Wa#8?>>>>PLease help me.There is my code...Thank you very much
try test
8 3
1 2 30 40 50 600 700 65
right answer is:
1 40 700
2 50 65
30 600
Re: WHY Wa#8?>>>>PLease help me.There is my code...Thank you very much
Posted by
Search 17 Feb 2008 19:10
Thank you very much,now I'll try to find bug!!!
Does such tests exist?
7 6
1 2 3 4 5 6 7
and
5 3
1 2 30 40 50 600 700
and if exist,please,can you write answers for this tests.
[code deleted]
Thank You very much!!!
Edited by author 17.02.2008 21:45
Edited by author 18.02.2008 18:54
?????????
Posted by
tn 18 Feb 2008 02:42
Edited by author 18.02.2008 02:49
Re: WHY Wa#8?>>>>PLease help me.There is my code...Thank you very much
I didn't see '2' in your code
n%2==0?r=n/k:r=n/k+1
=>n%k==0?r=n/k:r=n/k+1
these tests are wrong
Re: WHY Wa#8?>>>>PLease help me.There is my code...Thank you very much
Posted by
Search 18 Feb 2008 18:53
Thank you very much!!!!I get AC!!!
Re: WHY Wa#8?>>>>PLease help me.There is my code...Thank you very much
Can you send me your AC or previuos WA code...
and what did you fix there?
my e-mail: liwang@mail.ru