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

What's the trick with 1009????
Posted by Darko Aleksovski 7 Oct 2000 03:42
I figured out a very simple algoritham (and quick-0.02sec)
but I get Wrong Answer. I've been testing it even on
large N & K  (8,8), and it works fine (gives the correct
answer). Can anybody help me????
Thanks
Re: What's the trick with 1009????
Posted by Ilievski Bozidar 7 Oct 2000 12:36
> I figured out a very simple algoritham (and quick-0.02sec)
> but I get Wrong Answer. I've been testing it even on
> large N & K  (8,8), and it works fine (gives the correct
> answer). Can anybody help me????
> Thanks

I solved this problem by counting all the combinations.
It works properly for N+K<=18.
Re: What's the trick with 1009????
Posted by Leonid Volkov 9 Oct 2000 09:01
> > I figured out a very simple algoritham (and quick-
0.02sec)
> > but I get Wrong Answer. I've been testing it even on
> > large N & K  (8,8), and it works fine (gives the
correct
> > answer). Can anybody help me????
> > Thanks

hm-m... try to check you algorithm for the simpliest case -
1 digit in 10-based system. your alrogithm may answer 9,
though the correct answer is 10 :)