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 1506. Columns of Numbers

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
Posted by Alexander (201 - P TNU) 16 Feb 2008 19:58
>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
Posted by Alexander (201 - P TNU) 17 Feb 2008 03:19
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
Posted by Alexander (201 - P TNU) 18 Feb 2008 02:55
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
Posted by Li Wang Ji 18 Feb 2008 21:32
Can you send me your AC or previuos WA code...
and what did you fix there?
my e-mail: liwang@mail.ru