This post is no longer relevant; it has become significantly outdated. You should read the post at https://mirror.codeforces.com/blog/entry/121114.
Later you'll be introduced to the rules of the Codeforces contests, which differ from those of ACM-ICPC, TopCoder, GCJ, and I hope they'll bring some difference to the world of programming competitions. Most of the official competitions will be carried out according to these rules, though there will be more traditional contests. For example, Codeforces Beta Round #1 will be carried out according to the familiar ACM-ICPC rules. For some time testing will be based on Windows, but things might change in future, fortunately, the system supports testing on different platforms, even within one contest.
At the present time the system is configured to support the following programming languages (the compilation and/or the launching line is shown for each language):
- GNU C++ 4
g++.exe -static -DONLINE_JUDGE -lm -s -x c++ -Wl,--stack=268435456 -O2 -o {filename}.exe {file}
- GNU C++11 4
g++.exe -static -DONLINE_JUDGE -lm -s -x c++ -Wl,--stack=268435456 -O2 -std=c++11 -D__USE_MINGW_ANSI_STDIO=0 -o {filename}.exe {file}
- GNU C 4
gcc.exe -static -fno-optimize-sibling-calls -fno-strict-aliasing -DONLINE_JUDGE -fno-asm -lm -s -Wl,--stack=268435456 -O2 -o {filename}.exe {file}
- MS VS C++
cl /W4 /F268435456 /EHsc /O2 /DONLINE_JUDGE {file} - Free Pascal 2
-n -O2 -Xs -Sgic -viwn -dONLINE_JUDGE -Cs67107839 -Mdelphi -XS {file} -o{filename}.exe - Delphi 7
dcc32 -Q -$M1048576,67107839 -DONLINE_JUDGE -cc {file}
- C# Mono 2
dmcs -define:ONLINE_JUDGE -o+ -out:{filename}.exe {file}
- C# .NET
csc.exe /o+ /d:ONLINE_JUDGE /r:System.Numerics.dll /out:{filename}.exe {file}
- Java 6, 7
javac -cp ".;*" {file}
и
java.exe -Xmx512M -Xss64M -DONLINE_JUDGE=true -Duser.language=en -Duser.region=US -Duser.variant=US -jar %s
- Ruby
ruby.exe %s - Python 2, Python 3
python.exe %s - PHP 5
php.exe -n -d ONLINE_JUDGE=true -d display_errors=Off -d error_reporting=0 %s
- Haskell GHC 7
ghc --make -O %s - D
dmd -L/STACK:268435456 -version=ONLINE_JUDGE -O -release -inline -noboundscheck {file} - OCaml
ocamlopt nums.cmxa str.cmxa -pp camlp4o -unsafe -o {filename}.exe-ocaml {file}
- Scala
As Java - JavaScript V8
d8 {file}
It is not guaranteed that all the problems will have solutions in all the given languages (it's especially about the scripting ones). Probably, I'll later introduce equalizing coefficients for the working time for some languages. A "plus" next to the version name means that the testing system can use older versions. If you have suggestions about the possible ways to change the compilation or the launching line, write about them in your commentaries.
It should be mentioned that apart from standard verdicts, you can get "Denial of judgement", which usually means that your solution can't be launched, or it has unexpectedly failed. For example, is the Delphi array is too big, the compiler compiles the code, but the result will be the incorrect win32 exe-file. Solutions with the verdicts like "Compilation failed", "Denial of judgement", "Judgement failed" will be ignored while summing the results.
Moreover, pay attention, please, that the problems will be given in English as well as in Russian.
That's it, see you at Codeforces Beta Round#1.
UPD: GCC compiler has been added.
UPD 2: Added Haskell and F#.
UPD 3.2: Actual compiler versions are
- Mono C# compiler version 3.2.3
- DMD32 D Compiler v2.064.2
- Delphi 7 [Borland Delphi Version 15.0]
- Free Pascal Compiler version 2.6.2
- MinGW g++.exe (GCC) 4.9.2
- Haskell Glorious Glasgow, version 7.6.1
- Java 6 javac 1.6.0_45
- Java 7 javac 1.7.0_72
- Java 8 javac 1.8.0_25
- Ocaml ocamlopt 4.00.1
- Perl v5.12.2
- PHP 5.3.8
- Python 2.7.8
- Python 3.4.1
- Ruby 2.0.0p353
- Scala compiler version 2.11.1
- MS VS C++ 2010
- JavaScript V8 3.23.0
And why C++ and C are compiled in the exact same way?
Got this error when 2-minutes were left in the contest #339::Div2::C I thought "M_PI" was standard in "G++11" /--------------------------------------------------------------------/ Can't compile file: program.cpp: In function 'int main()':
program.cpp:191:10: error: 'M_PI' was not declared in this scope
ans=ans*M_PI; ^ /--------------------------------------------------------------------/ Submission Link http://mirror.codeforces.com/contest/614/submission/15372460
to increase stack space size, you just have to pass "RTS" switches to executable file, leaving compiling command line unchanged.
compile: ghc --make -O program.hs
running: program.exe +RTS -K256m -A8m -RTS
here -Ksize sets the maximum stack space size, the default value is 8mb, it's not reserved memory space, and won't affect overall performance.
and -Asize sets the cache size of GC, it's a reserved space to speed up GC, the default value is 128k, and quite small for data structure problems here (via profiling I found my program spends more than 80% of running time on GC when solving a standard data structure problem here).
on *nix, it's simple, and you can leave the judge system setting untouched.
export GHCRTS="-K256m -A8m"
I guess it's also quite easy on Windows.
same issue as bjin. the stack size of Haskell is too small to solve many large-scale-data problems.
could u pls make it larger?
Has this ever been addressed? Is Haskell still run with a very low stack size?
I don't know to whom should I request the same.
http://mirror.codeforces.com/blog/entry/405
It runs on the JVM so you could download the clojure.jar and clojure-contrib.jar jars (Clojure 1.1 is the current version) and run programs with
java.exe -classpath "clojure-contrib.jar;clojure.jar" clojure.main %1
I will help test it if you like.
It would be a lot more fun for me and other Clojure programmers. There were twice as many of us who qualified for GCJ this year as there were F# programmers.
Though we should note that after adding python and other interpreted languages we may expect complains that interpreters are not fast enough, while time limits are the same for them and for C-programmers.
Is it possible to change the C# compiler to using dmcs.exe so that we can write C# 4.0 code?
According to this page: http://mono-project.com/CSharp_Compiler, the gmcs compiler only targets the 2.0 runtime.
-Wall --pedantic
And my gcc (gcc version 4.4.5 (Debian 4.4.5-8)) not give any errors. But when I posted my program here (on GNU C) it says "Runtime error on test 1".
Program works correctly and take right answers. You can see code here: http://pastebin.com/jhec4ixB
Thanks for your attention.
And C# mono is much slower that csc.It is even slower than java(by a 2x factor)
many other programming sites provides both versions...
ocamlopt
is used (which I suppose it should be.) Anyway, thanks for adding OCaml.This problem has a solution on Python consumed 60 ms and 3100 KB. I think it is possibly to solve it on Ruby. Anyway we do not guarantee that any problem has a solution on languages like Perl/PHP/Python/Ruby.
Here is a program with a single loop that iterates 20 times at max. It can't be faster but Ruby now takes 450msec to just start, so it randomly fails: https://mirror.codeforces.com/contest/16/submission/259850087
Can't we add additional time equal to time of running the empty program of that runtime?
Why is
-fno-optimize-sibling-calls
which disables tail call optimization passed to GCC? I've always assumed during the contests that GCC does TCO, so I'm a bit confused.Because we found that sometimes this optimization makes code to be invalid.
You use version 4.6.1 — this bug already fixed in this version.
i think "special languages" should not be disabled for those "normal problems"... also, some of normal problems are not so hard for esoteric languages to solve...
Is there any plans to allow some versions of Lisp in contests? Common Lisp / Racket
Please, not until I do a Surprise Language Round for it :-)
I think Java should have larger stack size. Default stack size is too strict for some problems. Stack size can be changed with -Xss option.
I agree, it should not be hard. For now it's possible to create a new Thread and specify the stack size in Thread's constructor.
I submitted a code in Java,But I get the following error
Source should satisfy regex [^{}]*public\s+class\s+(\w+).*
What does this mean???
It should contain
public class SomeName
before any '{' or '}'or something like this. Can yo give link to the submission ?
Could you add the mtl package for Haskell to use the very useful Monad Transformer and State Monad
Thanks
Will Python 3.x will be supported? You could add it as a separate language, it's not neccessary to replace python 2.x. I think it's not hard to add it at all...
I don't see an F# option when submitting solutions. Help?
There are several discussions about it in this thread in Russian "view" (which you can read, though poorly, via google translate, I think). It looks like F# compiler have technical or some other problems and it was disabled for an unknown period of time...
Could you please upgrade GHC to the latest release (7.6.1)?
There are significant improvements comparing to the current one used in codeforces. It contains newer libraries which providing more powerful apis, provides new features and generates faster programs. These will make people using Haskell be able to challenge more complicated problems.
I also agree on replacing the outdated GHC6 with GHC7.
Instead of upgrading to GHC 7.6 directly, I suggest Codeforces to install Haskell-Platform 2012.4.0.0, which is more stable and well supported in many aspects. It contains GHC 7.4 and some new packages like
vector
, which makes Haskell competitive to imperative languages like C++ and Java in some problems.The LLVM backend is now stable in GHC7.4, and with
-fllvm
flags it will be enabled.I use
ByteString
state monad to parse input in haskell codes, Unfortunately,mtl
package is not shipped with GHC (but included in haskell platform), so I have to paste a very long (like 50 lines?) piece of code implementing a very simple state monad each time.May i know if this
g++.exe -static -fno-optimize-sibling-calls -fno-strict-aliasing -DONLINE_JUDGE -lm -s -x c++ -Wl,--stack=268435456 -O2 -o %name%.exe %1
is still valid, ie. applies toGNU C++ 4.7
(currently used in programming contests held here on this site)?Yes
Add Go and Rust please, thank you
How the system compiles C++ 0x program? with -std=c++11?
-std=c++0x
thanks
Maybe it should be changed to
-std=gnu++0x
for consistency? After all, GNU extensions are enabled when compiling in default mode (the command line for "GNU C++ 4" will implicitly use-std=gnu++98
).Please make it
-std=c++11
It seems the compiler haven't enable -std=c++0x, for example here is my code for http://www.codeforces.com/contest/218/problem/A, in which I used 'auto' to declare a variable:
Choose
c++0x
version of compiler. Your solution accepted: 3404996In the past two contests, I met a problem with Perl. Such as these submissions.
http://mirror.codeforces.com/contest/266/submission/2991670 http://mirror.codeforces.com/contest/268/submission/3021653 http://mirror.codeforces.com/contest/268/submission/3022677 http://mirror.codeforces.com/contest/268/submission/3025426
The programs passes some test cases, but got a "Idleness limit exceeded" on some other cases. Could anyone help me with this problem?
Is it possible to know why we can't use
import collections
in our Python code?I have never had a problem with this.
Well, probably many people write things like that and it may be annoying but... I think that scheme/lisp is a really nice language and that it would be nice to have the possibility to submit code in it. It is quite unique compared to other languages.
As I am taking an assembly language course, I found it hard to find problems to practice. I think it will be great if CF add a assembly compiler to the system so we can use some simple problem to improve our assembly programming skills.
I suggest you to try https://projecteuler.net/ instead.
Sorry for repeating, but I think it's a right time to finally add Python 3. It would be really nice from your side.
Mike, could you please add GCC C99 build target? It's so sweet to have variables in the middle of the scope and in for loop. Just gcc -std=c99. Or even update GNU C to support C99 — this shouldn't break existing C89 programs, while some people may take advantage of C99. Note you have C++11 as separate target.
Maybe -std=gnu99 would be better as it also provides the GNU extensions
I would like to +1 to numerous requests in this thread about missing Haskell libraries. Here is a list of the most important ones, in my opinion:
vector
— provides Vector data type. Reference: 'Use this package whenever you'd use an array in another language'unordered-containers
— provides HashMap and HashSet data types.mtl
— provides Control.Monad.State, Control.Monad.Reader and others. Crucial for writing stateful code, without them it feels like part of the language is missing.These are really the most basic packages and IMHO shouldn't be missing. (How would you feel about exclusion of std::vector from C++?) It would be great if at least these packages were installed but it's really simpler to just install Haskell Platform.
Could you provide me an example source which uses all of the requested features?
Sure, here you go: http://codebin.org/view/869e25b2
Output on my machine (GHC 7.4.1):
+1 for unordered-containers at least. no hashmaps === very sad. =( here is code sample: http://mirror.codeforces.com/contest/366/submission/5241289
MikeMirzayanov At least unordered-containers could be added. We really need HashMap. See 83564736 for an example.
About Ruby. Ruby has no built-in support for multi-dimensional arrays, and the workaround like
Array.new(n) { Array.new(m) { 0 } }
is really a pain in the ass.I think arrays are really important to algorithm problems. So just like other guys suggested to add the 'vector' hackage to Haskell(which I'll totally vote for it), maybe a more handy version of multi-dimensional array for Ruby should be added, like 'narray'.
Here's the webpage for narray. http://narray.rubyforge.org/SPEC.en
It's pretty neat.
Hello,
This might not be the appropriate place for my question but I don't know where else I can post.
I have submitted 2 problems and at some point, a test fails for each. The same happens when I run a custom test with the code and input. The issue is that when I run them locally, with the same set of data, the answer is the expected one. I chose GNU C 4 and locally I have GCC 4.7.3. I tried with the compile options from this page but I still have the same problem. Any ideas on this?
Thanks.
see this http://ideone.com/GDLpO7.
Try to printf values after scanf (in server code runner)
Problem is in the line with scanf
Hello,
Thank you for your reply. Indeed, it seems to be a problem with scanf. Any clue on how to solve this?
Thanks.
An
unsigned long
is only guaranteed to be able to hold values up to 232 - 1 ≈ 4·109. Check carefully, could the result that your solutions are printing be greater than this?Will R-cran be supported? Topcoder have already done that.
I have compete in GCJ with R in 2012 and 2013, it was never a bottleneck. Here are some examples: https://github.com/hetong007/r4codejam
Maybe instead of Python you can use pypy (http://pypy.org/). Its a python JIT enabled runtime and much faster than default CPython interpreter and fully compatible with standard libs. I just had a time limit exceed due to a loop of 10^6 taking 5 seconds in CPython but only 0.1 sec in PyPy due to JIT. Please, consider replacing Python with PyPy
I have just +1'ed all the posts that push PyPy. Let's add (or replace) CPython with PyPy. Example from 214: my solution to problem 3 got TLE on test 20. So I run the test with PyPy:
(I was able to pass TLE by patching my solution, but anyway...)
I support that. I used PyPy for Codejam and it often gave 2-3 times speed up compared to official Python compiler.
Yeah, PyPy should be the standard for programming contests instead of CPython. I hope they support it in the near future!
support!!!
python always got TLE
use PyPy or extend time limit for python language
hi why your c# compiler represent '.' like ',' so I'll get "Wrong answer" result on test. thx in advance
If you mean printing numbers then it is probably because computers which test the solutions have russian locale by default. You need to print numbers in culture-independent manner (CultureInfo.InvariantCulture).
I also want to complaint on this. Last contest I got 2 RE2 on my solution before I got what is the problem. Here is submits — 6072446 6072446 so... it's not to honest for participant to guess why you have runtime on server and correct answer on local PC.
c++ is my favorite language.
Hello. Could you please describe what problems do you have with F#? What OS do you use with F#? I think that we can help deal with the problems and return it to the list of languages. Thanks.
Any chance to get a 64-bit version of PHP? Or do I need to start using a real programming language? :)
is php an imaginary language? ;)
I never saw it mentioned anywhere in the blogs, so FWIW: I've noticed that Scala compiler has recently been upgraded to the latest and greatest (2.11.1). Whoever did this, thanks a lot.
I think codeforces has a great collection of supported languages, but most of them are from the ALGOL family. It would be really awesome if we could also have support for a Lisp. Could we possibly have support for Clojure or Common Lisp?
HI, what do you think about adding Dart language? It looks like a very cool language, and it has been recently approved and standardized by ECMA.
What about change python run env from cpython to pypy? Because the algorithm problems are always CPU intensive, pypy is 2-3 times faster than cpython in general.
Another solution is to extend the time limit for python, such as 5 times as cpp. For example, the time limit for java is 3 times as cpp at http://poj.org/
Because codeforces is all about algorithm problem solving, it's unfair for python programmer in the competitions.
It is unfair to give one language a bigger time limit than to others. Python users already get the advantage of clean high-level syntax, data structures and language support, so they have to pay with a slower run time for this. Other, faster languages should not be handicapped just because they are better than Python in this regard.
Thank you for ruby, go and ocaml. Closure would be great.
Any particular reason why C# .NET references System.Numerics assembly, but Mono doesn't?
Is there any particular reason for running Java with
-Xmx512M -Xss64M
?For stack size, while C++ is compiled with 256MB stack size, why Java only have 64MB?
For Xmx, I think setting it to 512M makes behaviour of codes which heavily use objects unpredictable, because garbage collector may runs only after the code already got MLE.
You are right, I'm planning to change it. Thanks.
When you are at it, please remember to do the same stack increase for Scala solutions as well. Thank you in advance.
I did not see the "GNU C++ 11" in the drop down list of language. Actually I saw "GNU C 4", "GNU C++ 4.7" and "GNU C++0x 4". Does "GNU C++ 4.7" option means run g++ command with --std=c++11?
GNU C++0x 4 is what you want for C++11.
I've updated
g++/gcc
to 4.9.2. We are using 32-bit MinGW on Windows 7 (64-bit OS). You can download it here: http://assets.codeforces.com/files/mingw-4.9.2.7zMay I ask what is the use of "-D__USE_MINGW_ANSI_STDIO=0" ?
Now that you have g++ 4.9 please add the -std=c++1y option to the command line (or make it a different language, C++ 14)
Add rust please, thank you !
Yeah, Rust is a very fast language (it's on par with C++ in Mike's "binary heap" benchmark) with great templates system. However, it's probably not a good idea to add it right now, because it's still unstable. For example,
std::io
is marked as a "work in progress".Rust is shaping up to be a very nice modern successor to languages like C++ (more so than D or Go). The 1.0 beta came out today, so please if you're reading this Mike, this is a great time to add it! :-D
Rust 1.0 is released: http://blog.rust-lang.org/2015/05/15/Rust-1.0.html
Could you please consider adding Rust language.
Mike, could you please install Haskell Platform? It's quite annoying to implement Control.Monad.State again and again, while this monad is quite handful for input parsing.
For Ruby:
Ruby standard library hardly contains any algorithm implementation. Can you include for example "Ruby Algorithms and Containers project" by Kanwei Li 2009.
Anyway, PHP/Python/Ruby/Pearl are used for web development and scripting. Their standard input and output interface are very painful and inflexible unlink c/c++. But it's somehow fun to use them in easy-medium problems.
Please update Scala compiler to 2.11.6. Looks like currently installed version (2.11.2) fails when parsing empty string to array of ints, which has caused my submission 10718173 for 536B - Тавас и Малекас to fail on test #55 (m=0), which works fine on my local machine with 2.11.6.
I think you should remove the warning when you submit code that contains %lld. Both %I64d and %lld work fine with g++ now so now it is just annoying to submit the same code twice.
I experienced problems in using functions like to_string() and stoi() even when I select GNU C++11. The judge reports an error saying that it is not defined. Why is that so?
It's a bug in MinGW. As far as I understand, the fix is not released yet.
Can someone please give me an example of the correct code(the whole code) in Java for ANY question. Actually I am new here and wanted to know about the specifications required in the programs.
Go to contest results for any finished contest and filter submissions by status and language using the panel on the right. Then clicking on the submission id link in the table will show you the code.
Rust 1.0 was released so add rust please.
@Codeforces Is there a chance to install "blist" or "sortedcontainers" packages for Python?
Unfortunately Python built-in lists are not well optimized for extra-large arrays typically used in Codeforces contests (>>10^5 elements). Python has very sluggish inserts and pops behavior for these gigantic lists — O(N) take seconds because it has to update every single index in the list.
These packages are using B+ trees to store lists and provide O(log(n)) vs O(n) speed improvement for list dels and inserts (though by the cost of slower lookup) and are essential for solving binary search problems without getting a TLE.
https://pypi.python.org/pypi/blist/? https://pypi.python.org/pypi/sortedcontainers/?
Mike, could you remove the code style limitation in Scala? Unlike Java, we can write multiple class or package in one file. This is a big limitation to make libraries. For example, following code cannot be accepted in Codeforces.
To run this code, you cannot use "scala" command because it reads source code as "script". Use "scalac main.scala; scala Main" instead.
Thanks.
I really need this...
Add rust please! It is an elegant language and I really hope to see it and use it in Codeforces contests.
And it's fast...
Is it possible to update the Ocaml compiler from 4.00.1? Int64/Big_int performance is a bit lacking on this version. Newer versions appear to have improved this somewhat.
The problem is that the installed version is 32-bit, and it generates very slow int64 code.
Lets add Kotlin as a programming language.
It is new language from JetBrains for JVM. It is even supported by default in Intellij IDEA, I think that's enough for adding it.
Hello,
I would like to write solutions in Lua. It is a 23-year-old language that doesn't have any novel features. The best interpreter for Lua is Luajit: http://luajit.org/
Thanks.
Got this error when 2-minutes were left in the contest #339::Div2::C I thought "M_PI" was standard in "G++11" /--------------------------------------------------------------------/ Can't compile file: program.cpp: In function 'int main()':
program.cpp:191:10: error: 'M_PI' was not declared in this scope
ans=ans*M_PI; ^ /--------------------------------------------------------------------/ Submission Link http://mirror.codeforces.com/contest/614/submission/15372460
M_PI
is not a standard C++ feature. You should define the constant yourself.Codeforces switched to GCC 5.1 and supports both C and C11 now. What are their compiler command lines?
I wonder why specifically GCC 5.1 if the latest release in the GCC 5 series is 5.3.
Perhaps because TDM-GCC is used, and 5.1 is the latest supported stable version.
There are some alternatives (for example, MinGW-w64), but perhaps they are not that popular in contest programming.
javascript v8.does it mean it supports node.js too ?
Could also please add support for Erlang?
As far as I know, CodeChef already supports it.
Dear Mike,
Will you consider adding Julia? It is said to have the syntax of Python and speed of C. Honestly, I have not learnt it yet, but Codeforces has been such a great place for me to learn a new language. It would be great if you add it to Codeforces.
Thank you so much for this great platform.
I'd like to throw in my vote for Rust again. We're at 1.7 now and climbing.
I found that Safe Haskell was turned on in codeforces, which made a lot of modules unavailable, such as
This is very annoying as the word "safe" here has nothing to do with the safety of online judge, but more likely to disable a lot of unsafe (non-pure or something can make your program behavior weird or crash) modules for optimization. Can we disable this. And what exact flags are used for Haskell now?
Also, can we have ghc7.10 as a separate compiler? (I don't mind if it replaces ghc7.8 though) As ghc changed a lot in 7.10 due to https://wiki.haskell.org/Functor-Applicative-Monad_Proposal and many code won't compile.
Agree with you! -XSafe has nothing to do with the safety, users can still use "System.Process.system" or other malicious functions, it just prohibit many legal techniques which are essential for high performance such as Control.Monad.ST, Data.Array.Base.
At the moment, we may resort to safer versions: Control.Monad.ST.Safe, Data.Array.IO.Safe, Data.Array.IO.ST.Safe .
Since g++ version was updated to 5.1, can you change the compilation flag
-std=c++11
to-std=c++14
?I used regex in GNU C++ 11 and got a CE:
but I complied my code successfully with G++ 4.9.1 using -std=c++11
I wonder whether it is my fault or regex is not allowed.
My submission
16757403
Can't see your code, but does this help?
It really helps, thank you.
Haskell seems to be compiled with -XSafe flag, which makes using ST Monads impossible.
How to reproduce:
Plus. it would be nice if we have the latest ghc :-) Since the standard library shipped with the current version is a little out-dated.
Erh, by the way, Safe Haskell has nothing to do with the safety of the host machine. It's just a restriction imposed on how you could use the language. It's actually kind of like the opposite of
-fpermissive
Haskell is unusable on codeforces without Control.Monad.ST. Please remove -XSafe option. It doesn't make haskell safer for test system!
Also current Haskell settlement lacks Data.Vector package. Haskell Platform should be used instead of bare GHC compiler. It's like Java or .NET without collection libraries https://www.haskell.org/platform/
Rust, please.
http://mirror.codeforces.com/contest/702/submission/19589375.
here we go.
The International 6, Windows 10 Anniversary Update, and then this. What a time to be alive!
I think Visual Basic.NET is a good language.And Visual Basic.NET is in top 10 every year nearly.Visual Basic.NET is ninth in Jun 2016 from TIOBE programming language list.So i suggest MikeMirzayanov add Visual Basic.NET 6.0 to CodeForces programming languages list.
Can you please update the Go compiler version until 1.8 or 1.9? There are some incompatible differences between 1.7 and 1.8/1.9 that makes difficult to test solutions.
Done
Could you update PyPy and, especially, PyPy3, please? There were some changes in the stdlib since Python 3.2. The JIT got smarter, too.
What is the linux-based equivalent for parameter --stack=268435456 ??
And is this considered the memory limit for the problem ?
http://man7.org/linux/man-pages/man2/setrlimit.2.html
You can use -fno-stack-limit
please fix syntax highlighting for rust submissions 39259717
"Custom invocation" page shows correct highlighting, so why not to use the same ace editor here
It's still broken :(
Could you please upgrade the version of haskell to 8.4 ?
thanks
Do you plan to add Petooh compiler?
Could you please update version of java to 11?
It should also affect kotlin.
Can we please get SBCL (the most popular implementation of Common Lisp) support? It is an extremely mature Lisp and probably the most performant one around right now.
+1 for Julia — would be amazing to have it supported.
need Kotlin
Kotlin works fine, currently 1.3.10
Is there any plan to add Swift?
I think stack sizes should be increased as much as possible. It seem it doesn't hurt even if the limit is more than a memory limit, so we can just set the limit to few gygabytes.
It will allow focus on algorithmic part of problem solving instead of learning some platform-dependent hacks
I'm talking mostly about c++, not sure if there are downsides for other languages (e.g possibility to use more memory because stack is handled incorrectly and/or problems with GC)
cc MikeMirzayanov
Please bring back F#! After so many years the language and compiler have improved a lot, I believe it is worth a re-assessment for adding into the platform.
Sorry for the ping MikeMirzayanov...
Thanks for the platform and problems!
Could we have the latest C# compiler? Mono C# compiler version 5.18 is late! There is already 6.4.0 with great
mcs
which supports C# 6th version and some 7th. Or we can use .Net Core compiler, csc.I want to know which compiler version is used for Rust.
This post seems not up-to-date. Is there an updated list of compiler versions and compilation commands somewhere?
Is Dlang somehow broken on Codeforces? Even the simple hello world program cannot execute successfully with custom invocation.
Code
Result
The
import std;
line currently does not work. Probably because some library from the whole set, like network and such, triggers security checks. Works fine when you specify individual imports you need.Here is a recent discussion of a similar matter, with Python & D involved.
I encountered the exact same problem yesterday. Do you think it can be fixed by removing those libraries from being imported in
std/package.d
?WE WANT BRAINFUCK DUDE
Please update Node.js to version 10.4.0 or higher, since it supports BigInt
any updates on c++17?
https://mirror.codeforces.com/blog/entry/57646 (2 years old)
even https://mirror.codeforces.com/blog/entry/75004
I want to put in a request to upgrade the version of Ruby interpreter to more a recent version like 2.7.0. https://www.ruby-lang.org/en/downloads/releases/ The current version (2.0.0p353) is from 2013 and new convenience functions have been released which would make Ruby more usable.
I've recently run into an issue that ruby code was working fine locally, but was raising RuntimeError in CF.
MikeMirzayanov please update ruby to the latest release: 2.7.1. The version that is currently in Codeforces (2.0.0) is much too old. (The version 2.4 has recently been deprecated.)
MikeMirzayanov kindly please update Scala from
2.12.8
to the latest2.13.3
. It contains many performance improvements and new features relevant to Competitive Programming (some of them were contributed by members of CodeForces community).Thank you in advance.
Can we have GDC/LDC please?
Please add Swift! It has really clean syntax
Great work for updating compilers!
Unfortunately, mono C# compiler
mcs
doesn't support some latest C# features, so I'd like to usecsc
compilers that supports full C# 8.0. Or supporting .NET Core platform in addition to mono like AtCoder will be also fine. Thanks!The current D language is 32-bit. This causes unexpected bugs while compilation like, array indices cannot be long. (see 92492947 and 92493027). This problem does not occur on any of the latest versions of D or on the codechef compiler. MikeMirzayanov could you please upgrade compiler to the latest 64-bit version.
Thanks in advance!
Also, it would be good if
ldc -O
could be used instead ofdmd
so problems run faster.MikeMirzayanov std::reduce broken for C++17 (both GNU C++17 and GNU C++17(64))
See 95894458, here ooo(v) means v.begin(), v.end()
MikeMirzayanov Would be wonderful if you could add Julia :) seem as it was previously asked for here.
Ido
Would be nice if we could add Julia. It has a very succinct syntax that makes it easy for prototyping, yet it is (unlike other scripting languages like Python) blazingly fast. Here is a report of a participant using Julia in a contest: https://software.intel.com/sites/default/files/managed/73/11/delacorte-julia-rev2.pdf
We would just need to make sure that JIT compiling (which might take a short moment) is not added to the runtime.
Please, add a pull request with Julia here https://github.com/MikeMirzayanov/binary-heap-benchmark
Also please provide me a link to the problem 1A - Театральная площадь.
It will help much.
MikeMirzayanov Could you please increase the Ruby interpreter stack size limit for better feature parity with the other programming languages? This can be done by defining RUBY_THREAD_VM_STACK_SIZE environment variable.
Right now any deep recursion results in a "Runtime error" verdict for Ruby solutions. It's probably not the best example, but you can have a look at these two submissions for the same problem: https://mirror.codeforces.com/contest/1513/submission/113150131 and https://mirror.codeforces.com/contest/1513/submission/113150168 (one is using recursion and the other doesn't).
Hi! What are compilation options for Rust submissions? When I run the test locally with
cargo test --release
, I see execution time more than 10 times lower than at Codeforces.Could you update the OCaml compiler? That would be much appreciated :)
Hello! Can you add Common Lisp as a supported language please? It is a very powerful language that can run at speed of c++ and is even more expressive than python.
MikeMirzayanov In hope that it will be able to help (judging by comment to Julia request):
Here is an implementation of binary heap sort benchmark in common lisp: https://github.com/Gleefre/binary-heap-benchmark/blob/master/common-lisp/heap.lisp (and I'll be glad to create a PR if wanted).
One of the best open source common lisp implementations is probably SBCL which can be installed here.
A common lisp script can be run with sbcl like this:
sbcl --script <filename>
.Or, if (probably) needed, with an increased/decreased dynamic stack size:
sbcl --dynamic-space-size <megabytes> --script <filename>
. It's default value is platform dependent.On my computer,
heap.lisp
benchmark results in a range of[693..846] ms
with an average time of701.69 ms
.The problem 1A — Theatre Square can be solved like this:
Hello, can you please consider increasing the stack size limit for Ruby? I have been practicing the language recently, and realized that the language has a 1MiB stack size limit by default. This limit makes a lot of things impossible for the language in CP (i.e. it dies here and there due to SystemStackError). This issue has been existent on other online judges as well, and I hope to see a resolution to this issue on Codeforces (and other judges as well). The language is mostly great (The ability to write concise code is a good thing in CP after all), and I hope other people could enjoy the language in CP as well. Still, this change may be crucial for people to truly enjoy the experience, without too many frustrations. (I won't complain about the language being too slow, sacrificing speed for conciseness is a good deal)
UPD: An update to Ruby 3.1.0 (or higher) would be a good change as well!
Can we ask for updates to some compiler versions? I want to practice OCaml with CF. However, the OCaml version extremely outdated and lacking basic primitives like List.init. Thanks in advance!
We want LuaJIT as a interpreted language. Please, add it to the website.
xD
Zig would be a nice addition to the supported languages.
It would be great to add it!