Search found 7 matches

by anikolov
Fri Oct 26, 2007 12:08 am
Forum: Volume 113 (11300-11399)
Topic: 11319 - Stupid Sequence
Replies: 19
Views: 9719

I was not exact - the trailing spaces were a problem, but I got presentation error, and not WA.
by anikolov
Thu Oct 25, 2007 10:04 pm
Forum: Volume 113 (11300-11399)
Topic: 11319 - Stupid Sequence
Replies: 19
Views: 9719

Problem solved - thank you for your help.

I made it so a sequence is determined smart if at least one of the following is true:

1) Any coefficient is not an integer.
2) Any coefficient is >1000.
3) Consecutuve differences do not become constant after 7 iterations, i.e. the sequence is not ...
by anikolov
Thu Oct 25, 2007 9:04 pm
Forum: Volume 113 (11300-11399)
Topic: 11319 - Stupid Sequence
Replies: 19
Views: 9719

Thank you!

I removed trailing spaces. And then trailing endlines. And tried all combinations between trailing space/ no trailing space, trailing newline/no trailing newline. No luck so far.

However, I inserted an if statement to go into an infinite loop if a coefficient is above a 1000 - I got ...
by anikolov
Wed Oct 24, 2007 11:30 pm
Forum: Volume 113 (11300-11399)
Topic: 11319 - Stupid Sequence
Replies: 19
Views: 9719

Thank you for all your good suggestions. I think I solved the problem..but the judge does not agree, and I am getting frustrated to no end. I generated my own input files with Python, tested the biggest coefficients for which f(1500) fits in 64 bits (a0 = 1000, a1=1000, a2=1000, a3=1000, a4=1000, a5 ...
by anikolov
Sun Oct 21, 2007 10:21 am
Forum: Volume 113 (11300-11399)
Topic: 11319 - Stupid Sequence
Replies: 19
Views: 9719

Thank you for your help!

Sunny, I was able to solve using the first 7 equations (I was also considering gaussian at one point). Now I can always solve, but when I check if the other terms are correct, I still get the wrong answer with big numbers, i.e. an overflow. Here is the function I use to ...
by anikolov
Sun Oct 21, 2007 8:05 am
Forum: Volume 113 (11300-11399)
Topic: 11319 - Stupid Sequence
Replies: 19
Views: 9719

11319 - Stupid Sequence

I solved the problem using consecutive differences and detecting when the difference becomes constant. The method works correctly for small enough inputs, including the examples given and some sequences I generated. However, with larger numbers the differences are no longer computed correctly, and ...
by anikolov
Sun Oct 21, 2007 6:29 am
Forum: Volume 113 (11300-11399)
Topic: 11321 - Sort! Sort!! and Sort!!!
Replies: 50
Views: 29826

I had the same problem. After reading the post above, I changed the subtractions to comparisons and the judge accepted.

Go to advanced search