Comment or not comment?
Write a function which givven an all lowercase string, return the same string but with characters that are comments turned uppercase.
/* causes everything until */ (or end of string) to be comment
// causes everything until newline (or end of string) to be comment
'\' at...
npm ERR! code 128
npm ERR! Command failed: /bin/git clone -q github.com/vsl-lang/llvm-node.git /root/.npm/_cacache/tmp/git-clone-f390e774
npm ERR! fatal: could not create leading directories of '/root/.npm/_cacache/tmp/git-clone-f390e774': Permission denied
npm ERR!
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2018-03-04T01_37_22_644Z-debug.log
npm WARN deprecated npmconf@2.1.2: this package has been reintegrated into npm and is now out of date with respect to npm
npm WARN deprecated graceful-fs@3.0.11: please upgrade to graceful-fs 4 for compatibility with current and future versions of Node.js
npm WARN deprecated nomnom@1.6.2: Package no longer supported. Contact support@npmjs.com for more info.
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
@Downgoat It's complaining that I don't have a visual C++ compiler. I'm already installing VS, but my understanding is that installing on Linux wouldn't need a VC++ compiler, so is there any particular reason it says it needs on on windows?
@Downgoat I now have VS installed and it still isn't working.
best suspenseful case for that: I submitted my code for a contest 15 seconds before the deadline (meaning I couldn't edit anything) and so if it didn't work it meant not only would I not get the points for that submission, I wouldn't be able to regain the points in a later submission lol
@ASCII-only Idk if u have time but since VSL now supports WASM, we need to develop bindings in both JS and VSL would you be able to help write some of these? :3
@ASCII-only because I finished it 1 minute before deadline but then I had to download to file and then the grader signed me out because of inactivity so I had to sign in again :/
I managed to get 2/15 points using the program I spent like 1 hour on
and you can actually get 2/15 points just by doing N,M,P,Q = map(int, input().split()); print(N * M - 1) ಠ_ಠ
@HyperNeutrino I actually feel that you can combine trivially. Is there an online judge (right now after the contest had ended)? Or downloadable test cases?
lol I mean I don't think they really check that much whether or not you wrote the code ahead of time but you don't know the problems until you start the timer
I am working on a path planning algorithm, which returns the "path to the goal" as a sequence of numbers. I need to find which element (row and column) of my matrix these numbers correspond to. So I am looking for a mathematical expression that depicts the relationship.
The sequence is as follow...
Block shuffle sort
The block shuffle sort is a (rather artificial) method of sorting a list.
It works as follows, illustrated by an example.
[6, 1, 0, 3, 2, 4, -2, -1]
Break list into contiguous blocks
[6][1, 0][3, 2, 4][-2, -1]
Sort each ...
@user202729 I really don't understand the algorithm at all so an implementation in an imperative language (python, C etc) would help people work out what is going on too
as long as you don't golf it :)
haskell is about half the speed of unoptimized C I think normally
and a lot slower than carefully optimized C
even a python + pypy solution would be great though
Given a real number t in (-10^9,13) (not including -10^9 or 13) as input, output Γ(t), also known as the Gamma function, which is defined as follows:
You may not use a built-in Gamma function to solve this task, nor may you use built-in numeric or symbolic integration functions. Your output sh...
@WeijunZhou A little late, but while they don't have any intended effect, they do cause a new chain to be created, discarding all the code before them (as do all undefined tokens, such as k or u)
I'd say that it depends on the language used. If it's something really popular, like Python, then multiple people will post solutions anyway, but if it's used by maybe 3 people (BrainFlak etc.) then it can feel a bit like cheating (?)
Jelly CMC: Calculate 10000000000000 ** 10000000000000 mod 1000000007. Solutions must be runnable on TIO. No hardcode. (violate 3 rules in "things to avoid when writing challenge", but this is CMC)
Other languages are also welcome, but no power mod built-in. (now violate built-in rule, but remove language-restricted rule, as built-in and no-hardcode are the same non-observable requirement, that's only 2 rules)
@cairdcoinheringaahing Both stars and pins are always black for me :/ They used to have a white center, but I think that changed for some reason, at least on my machine.
Well, I still prefer working on Jelly exponentiation ... oh no I have homework (technically not, as I won't be punished if I don't complete them, but I should do) to do.
@user202729 (regarding your deleted answer for the transformation sequence problem) my proof only states that there is a transformation sequence if the thing about the prime factors is true, but it didn't prove if and only if. I think it's still true regardless but I didn't explicitly prove that it couldn't be done otherwise.
Though I do believe it is fairly obvious that it's an iff.
You are given an array of n numbers and q queries. For each query you have to print the floor of the expected value(mean) of the subarray from L to R.
Input :
First line contains two integers N and Q denoting number of array elements and number of queries.
Next line contains N space seperated ...
My problem is that I have a compiler which outputs LLVM bitcode/IR files (.ll/.bc) and these are compiled to object files using llc out.ll -t obj -o out.o.
The problem is, is that to form an executable I (the compiler) need to link these with crti.o/crt0.o/crt1.o. Without these (even without arg...
The large amount of helper links in Jelly answers annoyed me, so I've implemented Ɗ and ɗ (drei, three), and Ʋ and ʋ(vier, four) and 3-link and 4-link versions of $ and ¥.