After @MartinBüttner achieved exactly 10,000 reputation, we now have three full rows of 10k users on the users page! Now, since we're all programmers here, we like to automate things instead of doing them manually. Your challenge is to write a program to automatically congratulate new 10k users.
Specification
Input
The input will be n
lines of space-separated numbers. (If you would like, you may also take a single comma-separated list of space-separated numbers, if that makes your code shorter.) For example:
10 20 30 40 50
15 25 35 45 55
20 30 40 50 60
Or:
10 20 30 40 50,15 25 35 45 55,20 30 40 50 60
Each list of numbers represents a list of users' reputation values on a single day.
Output
The output will be the same amount of n
lines (or a comma-separated list of the same length). Each line / list item will be:
:D
if there was a user whose reputation just became >= 10,000.- Multiple space-separated
:D
s if there were multiple users who met or passed the 10,000 rep count. For example,:D :D :D
for 3 new 10k users.
- Multiple space-separated
:(
and then halt further output if the input is ambiguous or impossible (more on this in the next section).- nothing if neither of these conditions is true.
Ambiguity
It is possible that the input is ambiguous. For the purposes of this challenge, we assume that:
- The reputation cap is 200 per day, ignoring accepts and bounties and the like for the sake of the challenge.
- Users may not lose reputation (again for simplicity and for the challenge).
Input is considered ambiguous when it is impossible to determine which reputation values correspond to which user. For example, in the input 10 20,30 40
, you can't tell whether the 10-rep user became the 30-rep user or the 40-rep user.
Input is considered impossible when the users from one day could not possibly have become the users from the next day. For example, in the input 10 20,310 320
, this situation is clearly impossible because the users could not have gained 300 reputation in a day. Users losing reputation is also impossible.
Edge cases
- The initial reputation values can start at anything (i.e. a user can start with 1337 reputation).
- There is no output for the first line / list item.
- The input will always be syntactically valid, meaning that the reputation values will always be positive integers, there will always be the same amount of reputation values per line / list item, etc.
- The reputation values are not sorted; they may be in any order.
Test cases
Input: 9900,10000
Output: :D
Input: 9900 9950 9910,10100 9950 9910,10300 10150 10110
Output: :D,:D :D
Input: 10 20 30,42 10 20,10 242 20,442 42 10,0 0 0,442 42 10
Output: ,,,:(
Input: 10 20,15 25,15 25
Output: ,,
Input: 9999 9998 9997,10000 9998 9997,10000 10000 9997,10300 10000 10000
Output: :D,:D,:(
Input: 100,90,80,70
Output: :(
Input: 10000 10000 10000 9999,10000 10000 10000 10000,10010 10020 10030 10040
Output: :D,:(
Input: 9999 9998 9997 9996,10196 10197 10198 10199,10399 10199 10197 10196
Output: :D :D :D :D,
(i.e. a user can start with 1337 reputation).
I liked this coz that was my rep... wel 5 min ago until someone upvoted one of my answers xD \$\endgroup\$