Page 1 of 1
11431 - Partitioning a Number
Posted: Thu Mar 27, 2008 9:10 am
by mysword
Anyone give me some I/O? I don't why got many WA.... Is there any tricky cases?
Thanks!
Posted: Thu Mar 27, 2008 10:14 am
by sclo
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.
Re: 11431 - Partitioning a Number
Posted: Sat Jun 07, 2008 4:38 pm
by mmonish
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
Re: 11431 - Partitioning a Number
Posted: Sun Jun 08, 2008 9:31 am
by pineapple
My ac code gets same output for your input
Re: 11431 - Partitioning a Number
Posted: Mon Jun 09, 2008 5:06 am
by mmonish
Still getting WA.I also checked my program with an ineff BF program.Here is my code..
anyone please help me to find out the coz of getting WA.
Re: 11431 - Partitioning a Number
Posted: Wed Jun 11, 2008 4:04 pm
by mmonish
still no reply..
I dont even find the coz of getting WA..
Re: 11431 - Partitioning a Number
Posted: Wed Jun 11, 2008 4:45 pm
by sunny
Sometimes your code does not work for an input<=3.
Re: 11431 - Partitioning a Number
Posted: Wed Jun 11, 2008 5:53 pm
by mmonish
Thx sunny..
some silly mistake in coding.