Page 1 of 1
Problems last night with a correct answer
Posted: Sun Jan 13, 2008 6:58 pm
by Orzo
Last night (Saturday, Jan 13, about 11 PM CST) I was working on problem 47. I had a solution which I was almost sure was correct; tweaking my algorithm to fit the example case (3 distinct prime factors, 3 in a row) was yielding the correct answer, but my 4 distinct prime factors, 4 in a row solution was incorrect.
I put the answer in, as well as every number 4 below and 4 above the number, just in case I was a bit off. No luck. I asked if anyone else was having similar problems and was told that the number that I posted (which I rounded to the nearest 100,000 as to not give the answer away) was in the right ballpart.
I tried the answer again this morning and, to my amazement, it registered as correct. What happened? I spent several hours trying to fix something that wasn't broken

Re: Problems last night with a correct answer
Posted: Sat Apr 19, 2008 10:16 pm
by Doraki
This glitch happened to me twice already
(I don't remember where it occured the 1st time, it just happened earlier on problem 135...)
And yes it's extremely confusing and annoying to have to try and get a different (false) answer.
From now on I guess I'll have to submit my answers several times... ?
Re: Problems last night with a correct answer
Posted: Sat Apr 19, 2008 10:52 pm
by daniel.is.fischer
One possibility how that might happen would be the presence of white space. Since the answer is checked by comparing the answer string, if you inadvertently hit the space bar or copy-paste a blank, your solution will not be recognised. If that can be excluded, my guess would be a difficult to pinpoint server glitch.
If you're sure enough about your answer, you can try it again a few minutes later, but I don't think more than two attempts would help often. Then check your algorithm again. If you are still convinced you have the correct answer, PM an admin, then one of the following should happen:
a) you got it wrong

, at least then you know,
b) we got it wrong

(fortunately very unlikely when there are already a number of solutions) and correct it,
c) you got the same answer as we have, at least you will know and either you submit it again until it is accepted or finally we will mark the problem as solved in your profile.
Re: Problems last night with a correct answer
Posted: Sat Apr 19, 2008 10:56 pm
by euler
I wondered that too, Daniel, but I think I've solved it. (Do you recall the time when the answer had the white space!

)
Thanks for reporting the problem guys. I did some extensive testing and although I couldn't reproduce the problem I did discover a tiny bug in the script that may have caused it if you were the first person to submit an answer just after the turn of the hour. Anyway, I've fixed that problem and I am hoping that both of you have just been victims of this incredible coincidence.
Please let me know if you, or anyone else, experiences the same problem.
Re: Problems last night with a correct answer
Posted: Mon Apr 21, 2008 12:55 pm
by dirkt
euler wrote:
Please let me know if you, or anyone else, experiences the same problem.
I've had this problem several times, also on the old server. Sometimes I could trace it to white space that I added during cut-and-paste; so I just assumed it was again white-space somewhere in the other instances, even though I could have sworn I paid attention this time... looks like it wasn't.
BTW, any reason not to just ignore any white space in the answer?
Re: Problems last night with a correct answer
Posted: Mon Apr 21, 2008 2:47 pm
by euler
Have you had the problem since I "fixed" it (19 Apr 08)?
Trimming the strings is a good idea. I'll look into that.
Re: Problems last night with a correct answer
Posted: Tue Apr 22, 2008 9:48 am
by dirkt
euler wrote:Have you had the problem since I "fixed" it (19 Apr 08)?
The problem is that it's not so easy to say if the mistake is mine, or if there's a bug with scripts

Three of the problems have been bugging me for weeks. For one (178) it turned out it was my mistake, because I forgot to treat leading zeros specially (which is really obvious in hindsight, but I just didn't realize it). For one (171) I had already entered the correct answer at least once before your fix, I had desperately been trying to find out the mistake, couldn't find any, and tried the same number two days ago (after your fix), and it worked. Problem 165 is the third candidate; I've now written the program in three different ways and still get the same answer, and all three work with small samples where I can check manually, but of course it can still be a misunderstanding or a stupid bug on my side. I must have entered this number four times or so now (last time yesterday, I think), so it's likely my mistake. If your server logs enough data, you can check; otherwise maybe we should discuss details by email.
Re: Problems last night with a correct answer
Posted: Tue Apr 22, 2008 11:10 am
by euler
To quote the About page...
I've checked my program ten times now and I keep getting told my answer is wrong! Have you made a mistake?
With newly released problems it is quite possible that a small error may have slipped through the net, or maybe the wording is slightly ambiguous and the problem has not been explained as well as it could. However, when so many people have hit the target and one marksman misses ten times on the run, he/she can hardly shoot his/her own foot and conclude that because the gun is working properly the fault must lie in the target.
Of course, given the circumstances here feel free to PM me your answer and I'll confirm if it is right or wrong.
Re: Problems last night with a correct answer
Posted: Thu Apr 24, 2008 12:50 pm
by stijn263
dirkt wrote:euler wrote:Have you had the problem since I "fixed" it (19 Apr 08)?
The problem is that it's not so easy to say if the mistake is mine, or if there's a bug with scripts

Three of the problems have been bugging me for weeks. For one (178) it turned out it was my mistake, because I forgot to treat leading zeros specially (which is really obvious in hindsight, but I just didn't realize it). For one (171) I had already entered the correct answer at least once before your fix, I had desperately been trying to find out the mistake, couldn't find any, and tried the same number two days ago (after your fix), and it worked. Problem 165 is the third candidate; I've now written the program in three different ways and still get the same answer, and all three work with small samples where I can check manually, but of course it can still be a misunderstanding or a stupid bug on my side. I must have entered this number four times or so now (last time yesterday, I think), so it's likely my mistake. If your server logs enough data, you can check; otherwise maybe we should discuss details by email.
Problem 165 can go wrong on many points. Just to name a few:
-> Are you checking wether more than 2 lines intersect at a point ?
-> What about linesegments that are exactly the same (perhaps partly)?
-> Do you store intersection points using floats or integer fractions?