MikeMirzayanov's blog

By MikeMirzayanov, 8 years ago, translation, In English

Hello!

As an allowed language on Codeforces and Polygon C++17 has been added. The compiler we use is 32-bit mingw64 version 7.2.0 (later will be updated when new versions are released). We are using a patch from halyavin to speed up I/O when using scanf/printf (for more details, read here). The exact used distribution can be installed on Windows from our package manager called PBOX using the link http://pbox.me/packages/mingw-w64-7

The exact compilation command line is:

g++.exe -static -DONLINE_JUDGE -Wl,--stack=268435456 -O2 -std=c++17 -o %name%.exe %1 2>compilation.log

Wish you successful solutions in C++17,
MikeMirzayanov

  • Vote: I like it
  • +693
  • Vote: I do not like it

| Write comment?
»
8 years ago, hide # |
 
Vote: I like it -45 Vote: I do not like it

MikeMirzayanov Can you please add any music player to CF? I want switch Hurts' and "Time and Glass"' songs without switching to another tab or phone.

»
8 years ago, hide # |
 
Vote: I like it +13 Vote: I do not like it

MikeMirzayanov today I faced a problem when I want to add problem from polygon to mashup contest, I can add an old problems but when I want to add a new problem the error Could not download problem descriptor is shown up, and I am create the package and add access read for codeforces in polygon. what is the problem?

»
8 years ago, hide # |
 
Vote: I like it -13 Vote: I do not like it

Hope that user can use gif as the profile photo!

»
8 years ago, hide # |
 
Vote: I like it +70 Vote: I do not like it

Why not a 64-bit compiler?

»
8 years ago, hide # |
 
Vote: I like it -21 Vote: I do not like it

C++17 is way too old, waiting for C++20 support

»
8 years ago, hide # |
 
Vote: I like it +3 Vote: I do not like it

Is C++17 support __int128 ?

  • »
    »
    8 years ago, hide # ^ |
     
    Vote: I like it +22 Vote: I do not like it

    It's not in standard and never was. It's an extension for 64-bit compiler (very fast 2-"digit" biginteger), so it won't be on Codeforces unless it begins to use 64-bit compiler. Reasons not to do this are described in this comment.

»
8 years ago, hide # |
 
Vote: I like it +64 Vote: I do not like it

I always wonder why CF is based on 32-bit compiler. Does server run on 32bit cpu?

  • »
    »
    8 years ago, hide # ^ |
     
    Vote: I like it +144 Vote: I do not like it

    No, it's so because of Kernel Patch Protection on 64-bit editions of Windows.

    As you know, Codeforces servers run machine code from untrusted sources. If you want to do this without compromising system security, you need to establish a sandboxed environment. There are many different ways to achieve this, the most obvious one is virtualization. But it's really expensive to restart a virtual machine each time when a new test is run. So, here comes another method of sandboxing: system call interception. By using it, you can intercept dangerous system calls, such as ExitWindowsEx or OpenFile and terminate the running solution due to security violation. This is done by loading a kernel-mode driver and patching the system call table. But KPP prevents this. That's why 32-bit versions of Windows are used for implementing such sandboxes.

»
8 years ago, hide # |
 
Vote: I like it +19 Vote: I do not like it

Looks like christmas came early this year!!!!

»
8 years ago, hide # |
 
Vote: I like it +5 Vote: I do not like it

Are there any new features that are useful for compeititons as well?