10400 - Game Show Math

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

Moderator: Board moderators

User avatar
adnim
New poster
Posts: 3
Joined: Fri Jan 13, 2012 4:21 pm

Re: 10400 - Game Show Math

Post by adnim » Fri Jan 13, 2012 4:30 pm

Surprisingly, when I use bitmask
the runtime is much better than using bool array.

Maybe the bottleneck is about "memset()"..
yeah, It seems there are lots of small tests.
got AC in 0.308s using dp method, memset only used part of bool array after each case, array initialized before all.
clock ticks life away

Harwestor
New poster
Posts: 1
Joined: Mon Jan 16, 2012 6:13 pm

Re: 10400 - Game Show Math

Post by Harwestor » Mon Jan 16, 2012 6:20 pm

adnim wrote: yeah, It seems there are lots of small tests.
You're right

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: 10400 - Game Show Math

Post by brianfry713 » Tue Jul 22, 2014 11:41 pm

Input:

Code: Select all

1
19 9080 22609 1535 17711 2129 1510 3399 16464 25268 6095 14251 3672 24804 8055 17787 21421 4978 15655 14533 -11208
AC output: NO EXPRESSION
Check input and AC output for thousands of problems on uDebug!

Post Reply

Return to “Volume 104 (10400-10499)”