At flooble there are 40 problems in the queue. (this may not be true but lets just pretend it is.) A few crazy hackers somehow manage to promote themselves to scholars. On the first day the first hacker will vote thumbs up on all problems displayed.(The 10 most recent) On the second day the second hacker votes thumbs down on every second problem. On the third day the third hacker votes thumbs up on every third problem. And so on and so on. (When it gets to the eleventh day the eleventh hacker will do what the first hacker did)
How many days will it take for every problem in the queue to be live on the site?
Note: For those who don't know there are only 10 problems that can be voted thumbs up or thumbs down every day and these problems are the 10 least recent. Also a problem with three thumbs up will be posted to the site and taken out of queue. Only one problem can be posted to the site per day. Also if a problem gets 3 thumbs down it is deleted.
Btw: for those who like an extra challenge what if one problem is submitted every 3 days?
Also: A hacker will always vote before a problem becomes live.
I'm sorry to say that fwaff, Charlie and Corey have been laboring under false assumptions. I guess it's my own fault not clarifying it some more. Here's how the voting works in practice.
All problems are put into the queue - sorted by order of submission (oldest problems are the first in the queue). The 10 "front" problems are available to be voted on.
A "thumbs up" gives a problem +1, a "thumbs down", a -1. (So the votes
DO cancel each other out.) Any problem that reaches a +3 score CAN be pushed live on the site. Similarly, a problem with -3 CAN be deleted. (I guess that for the purposes of this problem, we can assume this happens as soon as the score is reached, in effect precluding further voting. In practice, someone is free to thumbs down a problem that has +3, thus making it ineligible for going live for the time being, and the same applies to problems with -3.)
A person MAY vote on a problem multiple times, but only the LAST vote will count. So if I vote thumbs down, and then thumbs up, the problem will get a +1 from me, not an even zero.
|
Posted by levik
on 2003-02-18 09:05:43 |