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 »

I got WA all the time.
Could someone give me sone input/output ?
Thx :D
Martin Macko
A great helper
Posts: 481
Joined: Sun Jun 19, 2005 1:18 am
Location: European Union (Slovak Republic)

Post by Martin Macko »

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
Cho
A great helper
Posts: 274
Joined: Wed Oct 20, 2004 11:51 pm
Location: Hong Kong

Post by Cho »

Some test cases: 10712.zip
Martin Macko
A great helper
Posts: 481
Joined: Sun Jun 19, 2005 1:18 am
Location: European Union (Slovak Republic)

Post by Martin Macko »

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 »

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 »

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.
Martin Macko
A great helper
Posts: 481
Joined: Sun Jun 19, 2005 1:18 am
Location: European Union (Slovak Republic)

Post by Martin Macko »

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 »

Accepted
Post Reply

Return to “Volume 107 (10700-10799)”