The input for the continuous knapsack problem is as follows.
For each item 1...n we are given a positive weight and profit. Overall we are also given a positive capacity which is the maximum weight we can carry.
The goal is to pick items so that the profit is maximized without exceeding the capa...
I can't speak for other people, but I dislike [restricted-complexity] challenges just in principle, but even if I did decide to try one, I'd never use Jelly :P
Jelly is very good at golfing and a pain to use for anything other than the shortest, often simplest, method :P
I might give it a shot, ignoring [restricted-complexity], and then just ping you here in chat with it @felipa, but I wouldn't hold out for a Jelly answer (at least not before an APL/J/k answer that can be ported)
It means that I can't use the obvious approach, but which could lead to some clever golfing tricks. Instead, I'd have to focus on making it fit within the complexity, which would (IMO) make the program less interesting
@felipa Put it this way: if I can save a byte making my program (in some random challenge, not necessarily yours) go from O(n) to O(2^{n!}), I have and will
@cairdcoinheringaahing would that be ignoring quicks or would it just be counting digraphs as 1 and then either leaving literals as is or forbidding some classes of them
@cairdcoinheringaahing I understand. I just don't see how that is different from changing the output from correct to incorrect if the challenge is at all clever
@felipa It's those kind of restrictions I dislike in challenges :P [restricted-source] is generally ok as it generally involves more creative approaches. But complexity, time and memory are annoying to me
@cairdcoinheringaahing Hmm, I really need to get a laptop with cairdOS, the superior OS. Currently, the compiler just steps out of the computer, and slaps me 1/0 times
there's a mod exclusive page that shows us KM history and TBH I've never checked it because we just use annotations if a user is being troublesome repeatedly
Terrible news: syntax like 1if 2else 3 (combining numeric literals with keywords with no space between them) will be deprecated in Python 3.10 and removed in Python 3.12
it'll be like minecrafters not going beyond 1.8 even with another 8 versions after; golfers will just stop upgrading at 3.11 and stick to that forever :p
i feel like if you make the obvious solution long and/or dyadic enough it might not be super easy to one-link but we'd still ideally not want the solutions to be one link or else why are we even calling it a scoring method
When running the following line:
>>> [0xfor x in (1, 2, 3)]
I expected Python to return an error.
Instead, the REPL returns:
[15]
What can possibly be the reason?
@Razetime That's cool! ... but why do you say that? I assume it's something to do with using ASCII, but couldn't non-ASCII languages still be scored in characters?