10712 - Count the Numbers

All about problems in Volume 107. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

Post Reply
windows2k
Experienced poster
Posts: 136
Joined: Sat Apr 05, 2003 3:29 pm
Location: Taiwan

10712 - Count the Numbers

Post by windows2k » Wed Sep 22, 2004 4:01 am

I got WA all the time.
Could someone give me sone input/output ?
Thx :D

User avatar
Martin Macko
A great helper
Posts: 481
Joined: Sun Jun 19, 2005 1:18 am
Location: European Union (Slovak Republic)

Post by Martin Macko » Sun Jun 19, 2005 1:54 am

Please, could somebody give me some tricky test cases? I am getting WA and don't know why...

I have chcecked lots of my answers for short intervals by

Code: Select all

seq $A $B | grep $N | wc -l
but have not found any problematic case.

In my solution I decompose the interval [A, B] info intervals of the form [a*10^k, (a+1)*10^k-1] and process each of them independently. For every such interval I chceck by the inclusion-exlusion principle all possible positions of N as a subsequence of a number from the interval. Is there anything wrong in my logic?

thanks

User avatar
Cho
A great helper
Posts: 274
Joined: Wed Oct 20, 2004 11:51 pm
Location: Hong Kong

Post by Cho » Tue Jun 21, 2005 11:55 am

Some test cases: 10712.zip

User avatar
Martin Macko
A great helper
Posts: 481
Joined: Sun Jun 19, 2005 1:18 am
Location: European Union (Slovak Republic)

Post by Martin Macko » Tue Jun 21, 2005 3:47 pm

Thanks, I've finally got AC... :) (I had problem with number of zeros in interval [1, 1] :( )

windows2k
Experienced poster
Posts: 136
Joined: Sat Apr 05, 2003 3:29 pm
Location: Taiwan

Post by windows2k » Mon Jul 04, 2005 5:10 am

Martin Macko wrote:Thanks, I've finally got AC... :) (I had problem with number of zeros in interval [1, 1] :( )
I have passed all the cases above.
But still get WA.
Could someone give me more critcal cases?
Thx :D

panchis
New poster
Posts: 1
Joined: Thu Oct 06, 2005 5:34 pm

Post by panchis » Thu Oct 06, 2005 5:36 pm

windows2k wrote:
Martin Macko wrote:Thanks, I've finally got AC... :) (I had problem with number of zeros in interval [1, 1] :( )
I have passed all the cases above.
But still get WA.
Could someone give me more critcal cases?
Thx :D
I'm in the same situation as you, could you solve it?

Thx.

User avatar
Martin Macko
A great helper
Posts: 481
Joined: Sun Jun 19, 2005 1:18 am
Location: European Union (Slovak Republic)

Post by Martin Macko » Sat Dec 10, 2005 11:22 pm

panchis wrote:I'm in the same situation as you, could you solve it?
Thx.
If you post some test cases here, I can generate the outputs for you.

moody
New poster
Posts: 9
Joined: Tue Sep 24, 2013 2:19 am

10712 - Count the Numbers>>>>plz help test cases

Post by moody » Sat Mar 08, 2014 1:21 am

Accepted

Post Reply

Return to “Volume 107 (10700-10799)”