MikeMirzayanov's blog

By MikeMirzayanov, 8 months 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  

»
8 months ago, # |
  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 months ago, # ^ |
      Vote: I like it +235 Vote: I do not like it

    Also a porn collection, please. Could help with hard problems (ahem).

»
8 months ago, # |
  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 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Are you sure you have provided an access to the problem for "codeforces" user?

    • »
      »
      »
      8 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Yes

      • »
        »
        »
        »
        8 months ago, # ^ |
          Vote: I like it 0 Vote: I do not like it

        I need more details. Please, send me a message with ids of the problem in Polygon and your mashup id. Thanks.

        • »
          »
          »
          »
          »
          8 months ago, # ^ |
            Vote: I like it +4 Vote: I do not like it

          Fixed now. Thanks.

          • »
            »
            »
            »
            »
            »
            8 months ago, # ^ |
              Vote: I like it 0 Vote: I do not like it

            Thank you the problem solved

            • »
              »
              »
              »
              »
              »
              »
              8 months ago, # ^ |
                Vote: I like it +4 Vote: I do not like it

              but now its give judgment faild when i submit code to the problems in codeforces

              • »
                »
                »
                »
                »
                »
                »
                »
                8 months ago, # ^ |
                  Vote: I like it +4 Vote: I do not like it

                I am having the same problem. The problems i create always fail to judge submissions.

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

Looks like all my submissions will be in C++17 from now on. Although C++11 was overkill for my skill

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

Hope that user can use gif as the profile photo!

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

Why not a 64-bit compiler?

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

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

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

Is C++17 support __int128 ?

  • »
    »
    8 months ago, # ^ |
      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 months ago, # |
  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 months ago, # ^ |
      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 months ago, # ^ |
        Vote: I like it +28 Vote: I do not like it

      Why not sandbox on Linux? You will have your 64-bit compiler while being able to isolate executables from using system calls.

      Is there a reason Linux is not used?

      • »
        »
        »
        »
        8 months ago, # ^ |
          Vote: I like it +3 Vote: I do not like it

        Is there a reason Linux is not used?

        Visual Studio compiler.

    • »
      »
      »
      8 months ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      Do you know kernel patch protection alternative for linux?

      • »
        »
        »
        »
        8 months ago, # ^ |
          Vote: I like it +31 Vote: I do not like it

        If you want to patch Linux kernel, you can just modify the source code and build it. This is what all Linux geeks are supposed to do routinely.

      • »
        »
        »
        »
        8 months ago, # ^ |
          Vote: I like it +23 Vote: I do not like it

        You can take a look at Chernov's patch, which is a part of testing system named Ejudge.

        https://ejudge.ru/download/linux-4.9.77-4.9.77-cher1.diff

        How to use it (russian)

        • »
          »
          »
          »
          »
          8 months ago, # ^ |
          Rev. 2   Vote: I like it 0 Vote: I do not like it

          Was it reviewed by professional security explorers, like Project Zero? I think that no. Anyway, each patch to kernel is potential security problem.

          BTW, why cgroups aren't used for isolation? Are they too slow?

          • »
            »
            »
            »
            »
            »
            4 days ago, # ^ |
              Vote: I like it +9 Vote: I do not like it

            See this, used in IOI for example.

            • »
              »
              »
              »
              »
              »
              »
              27 hours ago, # ^ |
                Vote: I like it 0 Vote: I do not like it

              It looks just like I want to have — native kernel tools based isolation. But I will write mine, of course. (Yes, I like building bycicles:))

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

Looks like christmas came early this year!!!!

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

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

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

I am not getting any download link on the given page. Please help.