11431 - Partitioning a Number

All about problems in Volume 114. 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
mysword
New poster
Posts: 26
Joined: Sun Mar 06, 2005 8:52 am

11431 - Partitioning a Number

Post by mysword » Thu Mar 27, 2008 9:10 am

Anyone give me some I/O? I don't why got many WA.... Is there any tricky cases?

Thanks!

sclo
Guru
Posts: 519
Joined: Mon Jan 23, 2006 10:45 pm
Location: Vancouver, BC, Canada
Contact:

Post by sclo » Thu Mar 27, 2008 10:14 am

I don't want to give the testcase since it will give away the solutions.
There is a good chance that you're not generating the correct numbers n that gives f(n)>f(m) for all m<n.

Just write a bruteforce program that generates all n<=10^6 and compute f(n) to check.

mmonish
Experienced poster
Posts: 109
Joined: Sun Mar 11, 2007 2:55 pm
Location: SUST

Re: 11431 - Partitioning a Number

Post by mmonish » Sat Jun 07, 2008 4:38 pm

I don't find any coz of getting WA.anyone please check my output for the following input...
Input:

Code: Select all

1000000000000000000
100000000000000000
100000000000000
888888888888888
54564645646464646
1025
65537
2121513121
100
1000545
11111111111111
454545645646545
0
My Output:

Code: Select all

Case 1: 2504730781961
Case 2: 591286729879
Case 3: 4807526976
Case 4: 20365011074
Case 5: 365435296162
Case 6: 89
Case 7: 1597
Case 8: 2178309
Case 9: 21
Case 10: 10946
Case 11: 969323029
Case 12: 12586269025

pineapple
Learning poster
Posts: 57
Joined: Fri Nov 03, 2006 3:33 pm

Re: 11431 - Partitioning a Number

Post by pineapple » Sun Jun 08, 2008 9:31 am

My ac code gets same output for your input

mmonish
Experienced poster
Posts: 109
Joined: Sun Mar 11, 2007 2:55 pm
Location: SUST

Re: 11431 - Partitioning a Number

Post by mmonish » Mon Jun 09, 2008 5:06 am

Still getting WA.I also checked my program with an ineff BF program.Here is my code..

Code: Select all

AC.......
anyone please help me to find out the coz of getting WA.
Last edited by mmonish on Wed Jun 11, 2008 5:53 pm, edited 1 time in total.

mmonish
Experienced poster
Posts: 109
Joined: Sun Mar 11, 2007 2:55 pm
Location: SUST

Re: 11431 - Partitioning a Number

Post by mmonish » Wed Jun 11, 2008 4:04 pm

still no reply..
I dont even find the coz of getting WA..

sunny
Experienced poster
Posts: 124
Joined: Sun Sep 11, 2005 10:22 pm
Location: Civil-BUET

Re: 11431 - Partitioning a Number

Post by sunny » Wed Jun 11, 2008 4:45 pm

Sometimes your code does not work for an input<=3.

mmonish
Experienced poster
Posts: 109
Joined: Sun Mar 11, 2007 2:55 pm
Location: SUST

Re: 11431 - Partitioning a Number

Post by mmonish » Wed Jun 11, 2008 5:53 pm

Thx sunny..
some silly mistake in coding.

Post Reply

Return to “Volume 114 (11400-11499)”