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

Common Board

To Vladimir Milenov Vasilev
Posted by LYS 1 Aug 2001 14:41
1. The maximum number of total staircases is 500 but not
60!!!
2. Your program didn't generated correct answer. (eg. 0)

And, I don't think you can use DP here.
I used DP with weird tricks and it worked
Posted by Petko Minkov 1 Aug 2001 21:04
But it doesn't look like solution :)
Re: I used DP with weird tricks and it worked
Posted by Jivko Ganev 2 Aug 2001 03:27
> But it doesn't look like solution :)
What tricks aree you talking about? This problem is
extremely simple. Here's the source:

var TAB : array [0..500] of comp; n, i, j : longint;
begin
  read(n); fillchar(TAB, sizeof(TAB), 0); TAB[0] := 1;
  for i := 1 to n - 1 do
    for j := n - i downto 0 do TAB[j + i] := TAB[j + i] +
TAB[j]; writeln(TAB[n]:0:0);
end.
Re: I used DP with weird tricks and it worked
Posted by LYS 2 Aug 2001 11:19
O? What's the trick?!
I'm curious about the trick, can you have a explain?
haha
Posted by Petko Minkov 2 Aug 2001 20:58
 What tricks ... Hall of Shame ones :))

Petko.