10049  Selfdescribing Sequence
Moderator: Board moderators

 Experienced poster
 Posts: 131
 Joined: Sat Jul 17, 2004 4:09 am
 Location: Lima, Per
Hi, it's been 2 years since my post above...
The recursive formula is not required in this task. I just used loops (as somebody said above) and get a pretty simple solution.
Someone asked how I get f(2000000000) = 673365. "Trial and error", as you may call it... At first I guessed f(2000000000) <= 1000000, so I write a program with an array of 1000000 elements, and from that we get our result.
Have fun~
The recursive formula is not required in this task. I just used loops (as somebody said above) and get a pretty simple solution.
Someone asked how I get f(2000000000) = 673365. "Trial and error", as you may call it... At first I guessed f(2000000000) <= 1000000, so I write a program with an array of 1000000 elements, and from that we get our result.
Have fun~
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00  16:00 (UTC)
URL: http://uva.onlinejudge.org
Date: December 31st, 2011 (Saturday)
Time: 12:00  16:00 (UTC)
URL: http://uva.onlinejudge.org
10049
Hello!
I remember hearing somewhere that 10049Selfdescribing sequence is amenable to bisection method. Though I didn't consider this problem for I have a long list of WAs to consider  I want to know here is it so or not?
I remember hearing somewhere that 10049Selfdescribing sequence is amenable to bisection method. Though I didn't consider this problem for I have a long list of WAs to consider  I want to know here is it so or not?
Hi Moha!
Your hint was for me "like a ray of sunshine piercing through a fog", an Englishman would put it , I did accopmplish its implementation, it passes all sample testcases, but OJ responded "WA".
So can you give me some I/O?
Also, since I got WA in 0.438, it will be of great moment to discuss how those nice fellows in 10049ranklist got AC in 0.000.000.
Also, is it right that total amount of disjoint(I mean nonintersecting) intervals is about 162271?
Again, thank you.
Your hint was for me "like a ray of sunshine piercing through a fog", an Englishman would put it , I did accopmplish its implementation, it passes all sample testcases, but OJ responded "WA".
So can you give me some I/O?
Also, since I got WA in 0.438, it will be of great moment to discuss how those nice fellows in 10049ranklist got AC in 0.000.000.
Also, is it right that total amount of disjoint(I mean nonintersecting) intervals is about 162271?
Again, thank you.
I took a look at my (Java) code that ran in .187 (or something like that) and it is not even optimized  e.g. I prebuild the sequence, but I calculate sums for each n in input. You can prebuild the sums and then find the answer by binary search. Hm, I might even try it  although I see a lot of .053 Java solutions, I bet I'll end up there
Darko
Darko
10049 and recursive
Hi,
I saw the last topics about 10049, and nobody talk about the terminal recursion method ...
Is it possible to apply it for the 10049 problem ?
Because on my computer, do just a simple for loop from 1 to 20000000 take about 6 seconds !
And when I send my file with a nonterminal recursion method, the judge online indicates to me "Time limit exceeded", without surprises !
So, does anyone achieve the 10049 with a recursion method, or is it just impossible ?
Thank you.
I saw the last topics about 10049, and nobody talk about the terminal recursion method ...
Is it possible to apply it for the 10049 problem ?
Because on my computer, do just a simple for loop from 1 to 20000000 take about 6 seconds !
And when I send my file with a nonterminal recursion method, the judge online indicates to me "Time limit exceeded", without surprises !
So, does anyone achieve the 10049 with a recursion method, or is it just impossible ?
Thank you.