Блог пользователя Nickolas

Автор Nickolas, 4 года назад, По-русски

Контест окончен, надеюсь, вам он понравился :-) Разбор задач опубликован здесь.


В среду 1 апреля состоится восьмой Первоапрельский контест — несерьезное соревнование, в котором решить задачу зачастую проще, чем догадаться, что же в ней надо сделать.

В этом раунде вас ждет несколько необычных задач, на решение которых дается два часа. Раунд будет проводиться по схеме ACM ICPC (без взломов, положение в результатах определяется количеством решенных задач и набранным штрафным временем) и будет нерейтинговым. Решения можно сдавать на любом языке, поддерживаемом Codeforces, если в задаче не указано иное. Чтобы получить представление о том, что вас ждет, можно взглянуть на контесты прошлых лет: 2012, 2013, 2014, 2016, 2017, 2018, 2019.

Как обычно, чувство юмора, совместимое с моим, является необходимым условием для успешного участия. Удачи!

  • Проголосовать: нравится
  • +1014
  • Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +104 Проголосовать: не нравится

This is a joke competition in which solving the problem is often easier than figuring out what the actual task is.

It's the extreme of those hard-to-comprehend problem statements.

»
4 года назад, # |
  Проголосовать: нравится +22 Проголосовать: не нравится

Will the editorials be posted ?

»
4 года назад, # |
  Проголосовать: нравится +51 Проголосовать: не нравится

Pretty much every recent contest has started to feel like a joke contest now, so this joke contest is more like just another normal contest. So I don't see why it should be unrated.

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

I think this is going to be fun :D

»
4 года назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

It's my first April Fools Contest in Codeforces. I think it'll be interesting and meaningful (to me). Just wish me (and everyone) good luck and have fun!

»
4 года назад, # |
  Проголосовать: нравится +33 Проголосовать: не нравится

What if you don’t have a sense of humor?

»
4 года назад, # |
  Проголосовать: нравится +35 Проголосовать: не нравится

April Fool's joke:

Us: Yes!!, unrated contest.

CodeForces: April Fool's, it's rated.

Us: rating drops

CodeForces: Just kidding... :P

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Seems interesting, very much looking forward to it.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Excited for the contest in this QUARANTINE...

»
4 года назад, # |
  Проголосовать: нравится +95 Проголосовать: не нравится

Is it fair to call the winner a fool ?

»
4 года назад, # |
  Проголосовать: нравится -30 Проголосовать: не нравится

Why it will be unrated ?

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +3 Проголосовать: не нравится

plot twist : contest will be rated Nickolas is a paid actor

»
4 года назад, # |
  Проголосовать: нравится +35 Проголосовать: не нравится

Waiting for another one OEIS task.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +30 Проголосовать: не нравится

    Which is why I can't really give one :-D I'm not sure this is a kind of joke that gets better after multiple repetitions, and you can pull off a trick like this only once :-)

»
4 года назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

Will each problems have the same points? What will be the difficulty level of each problem? Same or Different?

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +3 Проголосовать: не нравится

    ACM ICPC rules mean that each problem is worth 1 point regardless of complexity, and the ties are resolved using penalty time. The problems will have different difficulty; I try to arrange them in increasing order of difficulty but for this kind of contest it's harder than usual to estimate this correctly :-)

»
4 года назад, # |
  Проголосовать: нравится +4 Проголосовать: не нравится

I hope there are no problems with solutions based on references specific to the problem setter of the contest. (like this one — https://codeforces.com/contest/1145/problem/C)

I think the problems should be solve-able for all users irrespective of whether they follow specific other users or not. Science/math trivia and general movie/pop-culture references are fine, and would allow a greater number of users to attempt the problems.

»
4 года назад, # |
  Проголосовать: нравится -24 Проголосовать: не нравится

This quarantine it feels good to be fooled.At least something is happening.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

One of the best chances to rank over reds :p

»
4 года назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

I'm waiting for the memes based on the disasters happened in 2020 so far

»
4 года назад, # |
  Проголосовать: нравится +12 Проголосовать: не нравится

One of the most funniest contests.

»
4 года назад, # |
  Проголосовать: нравится +35 Проголосовать: не нравится

your wish of "short statement" will be fulfilled here.. for sure!

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Hoping for a mind refreshing and entertaining contest with a lot of humorous content in this Quarantine Times!!!

PS: For the first time I am going to give a contest with my family!!

»
4 года назад, # |
  Проголосовать: нравится +3 Проголосовать: не нравится

Boys often don't understand the humor in girls. Then What?

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +15 Проголосовать: не нравится

    I don't think the issues people usually have with April Fools Contests are related to my gender... But in this unlikely case, you still have two problems written by my co-author kit1980 :-)

»
4 года назад, # |
  Проголосовать: нравится +14 Проголосовать: не нравится

If "unrated" is a joke XD

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

No April Fools Day Contest in 2015?????

»
4 года назад, # |
  Проголосовать: нравится +30 Проголосовать: не нравится

When someone tells you after the contest that has been rated.

»
4 года назад, # |
  Проголосовать: нравится +98 Проголосовать: не нравится

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

I hope those problems don't make me go bald hahaha

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +34 Проголосовать: не нравится

Le output format : The correct spelling for school is school, if you put the second 'o' before the first 'o' it is absolutely wrong.

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

There will be no contest...It’s all a joke and I’m not gonna fall for it.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

wish have a nice contest today

»
4 года назад, # |
  Проголосовать: нравится +7 Проголосовать: не нравится

We need a round based on dank memes.

»
4 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

lets post all the solutions here after getting AC :D

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Can I participate with my team?__

»
4 года назад, # |
  Проголосовать: нравится +17 Проголосовать: не нравится

Latest News = Competitive Programming is going to be introduced in this Summer Olympics ... Congrats to Whole Coderforces Community for this tremendous achievement :-) .

https://www.nytimes.com/newsletters/computerscience/1087

»
4 года назад, # |
  Проголосовать: нравится +5 Проголосовать: не нравится

It is April Fools Day Contest, right? Will the problems be fool, or are they gonna make us feel like a fool? Which one do you think?

»
4 года назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

Its april fools day and CodeForces is kindda joking with me (note to the Memory).thank u CF for making us to smile while we quarantine ourselves.

»
4 года назад, # |
  Проголосовать: нравится -23 Проголосовать: не нравится

Is contest rated?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Theres no questions. Was that the joke ?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

problem is not showing up just input and output for every problem and i entered in it i don't know now what to do

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +15 Проголосовать: не нравится

 

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I was thinking in which categories does these question falls ?

»
4 года назад, # |
  Проголосовать: нравится +18 Проголосовать: не нравится

hope all contests have problem statement concise like this one

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Is it rated? Can someone hint over this?

»
4 года назад, # |
Rev. 3   Проголосовать: нравится -10 Проголосовать: не нравится

NULL

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Multum gaudebamus fuit!

»
4 года назад, # |
  Проголосовать: нравится +59 Проголосовать: не нравится

tourist got the 1st like usual even though this is just a joke round, insane!

»
4 года назад, # |
  Проголосовать: нравится +101 Проголосовать: не нравится

How on earth is tourist first in this contest too

»
4 года назад, # |
  Проголосовать: нравится +19 Проголосовать: не нравится

Never have I been so curious to know the solutions. Can't sleep without the editorial.

»
4 года назад, # |
  Проголосовать: нравится +79 Проголосовать: не нравится

tourist: Rated, unrated; I am inevitable.

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Everyone who attempted A got it correct, this the first time that I have seen it happen.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +9 Проголосовать: не нравится

    I print nothing and got WA at first...

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +20 Проголосовать: не нравится

    There is only 1 test, and WAs on the 1st test are not shown as failed attempts. Trust me, not everybody got it from the 1st try :-D

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Not Me , It took me my third attempt;

    On my first attempt i read

    input -standard input output-standard output ,so i took a input number and printed that number.

    Later ,i submitted my blank template in my second attempt;

    And finally printed NO after that..

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +25 Проголосовать: не нравится

I had to check from tourist's submissions page, to check whether he actually submitted the problems, or we were being fooled by CF. LOL! xD

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +2 Проголосовать: не нравится

    What if his submission page is also made up? What if he never really attended the contest?

»
4 года назад, # |
  Проголосовать: нравится +30 Проголосовать: не нравится

SOLUTION FOR E

First: fill area in photoshop

Second: Do 2d dimension arr. Check pixel at (i*15)+5 (g*15)+5. If it's white, put 0 in arr else put 1; Save that arr in file for use it in final solution. I picked Node.JS for this step.

var fs = require("fs");
var Canvas = require("canvas");

let fileLink = "smile.png";
var canvas = new Canvas.Canvas(960, 960, "png");
var ctx = canvas.getContext("2d");

const Image = Canvas.Image;
var image = new Image(963,964);
dataArr = [];
image.onload = function () {
    ctx.drawImage(image,-2,-2,963,964);
    for (let i = 0; i < 64; i++){
        let newStr = [];
        for (let g = 0; g < 64; g++){
            var p = ctx.getImageData((g*15)+4, (i*15)+4, 1, 1).data;
            if (p[2] < 240){
                newStr.push(0)
            } else {
                newStr.push(1)
            }
        }
        dataArr.push(newStr)
    }
    fs.writeFileSync("DATAOUT.txt",JSON.stringify(dataArr))
};

image.src = fileLink;

Final solution: just get row and col and check arr[row][col] if it's 0 print "OUT" else print "IN"

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +45 Проголосовать: не нравится

    mspaint.exe FTW

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +39 Проголосовать: не нравится

      when your linux distro does not package a drawing tool so you search 'online image editor' and pick the first one with a floodfill tool

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +5 Проголосовать: не нравится

    Or you can use this

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится +13 Проголосовать: не нравится

    GIMP supports an excellent image format: it can export images as C code (the code for a struct with the raw uncompressed bytes stored in a unsigned char[] field). I used that.

  • »
    »
    4 года назад, # ^ |
    Rev. 2   Проголосовать: нравится +10 Проголосовать: не нравится

    Another solution without calculating coordinates. Fill area with black, resize to 64x64 and just convert pixels in python to C++ format:

    import imageio
    import numpy as np
    ans = np.array(imageio.imread("maze.png"))[:, :, 0]
    for line in ans:
        print('{', end='')
        print(*map(lambda x: 1 if x == 255 else 0, line), sep=',', end='')
        print('},\n', end='')
    
»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

When will we receive the editorials? :P

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How do I solve F?

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +27 Проголосовать: не нравится

    "elementary" -> periodic table of elements. Check if word can be spelled using symbols of chemical elements.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

H is awful and awesome at same time

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    How to solve?

    • »
      »
      »
      4 года назад, # ^ |
      Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

      code in ArnoldC

      Solution
    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится
      code
»
4 года назад, # |
  Проголосовать: нравится +48 Проголосовать: не нравится

How to solve I?

»
4 года назад, # |
  Проголосовать: нравится +16 Проголосовать: не нравится

First (and for sure last) time I solved 7 problems lol.

»
4 года назад, # |
  Проголосовать: нравится +52 Проголосовать: не нравится

)

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

What are the solutions?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

How to solve F?

»
4 года назад, # |
  Проголосовать: нравится +18 Проголосовать: не нравится

Was this part of April fool's suprise? I couldn't even find the submit button XDD

// For some moment I REALLY thought it was some kind of penalty for submitting too many WAs

»
4 года назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

Having a picture with coordinates may help you solve E problem (做了一张有坐标的图片,可能会帮助你解答E题)

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

I am stupid, how to solve C?

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +24 Проголосовать: не нравится

    Paste the title into Google. Google tells you that correct order of these words is in fact a bit different and you can get some permutation from it. You need to apply that permutation to bits of the number on input.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +8 Проголосовать: не нравится

      Actually, it's possible to deduce this permutation just from the samples...

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Maybe it is, but how do you get the idea behind it then?

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          Maybe I wasn't clear enough — the idea was from the title; I'm talking about the permutation itself, the samples give exactly enough information to decode it :)

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          The $$$0 \le n < 64$$$ part clearly shows it's an array of bits. Then I noticed the count of 1 and 0 bits in the original number matches the count of 1s and 0s in the result (respectively); then I tried to apply a simple shift. When it didn't work, I just noticed the highest and the 2nd bit don't change and the others are just reversed.

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        It is not, no sample contains the terms 2^3 and 2^4, so the mapping of those bits is ambiguous.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    And after happily lived ever they
    And they lived happily ever after

    All of the numbers have <= than 6 bits, so reorder the bits just like those words.

»
4 года назад, # |
Rev. 4   Проголосовать: нравится +63 Проголосовать: не нравится

A — print No.

B — the first letters of each line spell "two factors" (finding the first nontrivial factor x, then outputing x and a/x worked for me).

C — the problem title is "and they lived happily ever after" permuted. Permute the bits in the binary representation of the number, in the same way.

D — is the hexadecimal number even or odd?

E — the problem asks for whether a square is inside or outside the curve. Use a photo processing tool such as GIMP that allows export of pictures to C code, after applying a paint bucket tool.

F — Check whether string can be broken down into chemical element symbols.

G — The language is http://users.monash.edu/~damian/papers/HTML/Perligata.html (unfortunately the link does not seem to contain enough information...)

H — The language is https://github.com/lhartikk/ArnoldC.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +8 Проголосовать: не нравится

    For G you can translate the code without any resources, it just takes a bit.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится +1 Проголосовать: не нравится

      I have no idea how you do that

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +34 Проголосовать: не нравится

        That's what I did, took about 20mins. You look at it as a linguistic problem.

        You mostly ignore -um, -mentum and -o suffixes because they seem to be just 'latinizing' the text. Then stuff like addementum or multiplicamentum are easy operations.

        Things like "var", "aresult", "bresult", "result" are seemingly just variables.

        Convert all numbers from Roman to decimal to better understand the conditional and loops.

        The order of input-output (reversed) points to the siqus lines likely being pushing/popping in a stack and input is probably in the first loop. The cumula on these lines also points in that direction as "accumulation" points to some data structure.

        The only thing left is to figure out elevamentum and privamentum fodementum. Looking at how big the values are compared to the input and associating with "elevate", the former is a power function.

        Calculating all other values and comparing with the output gives you that privamentum fodementum has to be a square root and you're done.

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится +18 Проголосовать: не нравится

        I did it without realizing it was an esolang, it's easier than it sounds. For example "aresultum tum bresultum addementum da resulto." clearly means "add aresult and bresult to get result". "multiplicamentum" is also very obvious.

        Most of the lines have very obvious parsings if you think they must be program instructions.

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          I think that is because Portuguese (this is your native language, right?) may be much closer to Latin, than English.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +20 Проголосовать: не нравится

    You can add use Lingua::Romana::Perligata "convert"; before the code to make Perl convert the code to an understandable form.

»
4 года назад, # |
  Проголосовать: нравится +26 Проголосовать: не нравится

GET TO THE CHOPPER!

»
4 года назад, # |
  Проголосовать: нравится +23 Проголосовать: не нравится

Guys, leave pictures alone, do old school.

10 years ago this was called art!
  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится +11 Проголосовать: не нравится
    looks better like this
»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

it was nice experience , saw new perspective of solving a question . I can't find solution for C ..but still enjoyed it

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Unknown language = Brainfuck?

»
4 года назад, # |
  Проголосовать: нравится +24 Проголосовать: не нравится

tourist got fooled by A :)

»
4 года назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

Codeforces, is it bug or joke? Why couldn't I to submit problem O?

»
4 года назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

When I find out at the end of the contest I mistakenly got a CE by writing the correct C++ solution of G using UnknownX......

»
4 года назад, # |
Rev. 4   Проголосовать: нравится +13 Проголосовать: не нравится

Problem F: https://csacademy.com/contest/ieeextreme-practice-old/task/c787255968c972c653677a52599ecc2f/

It seems to me that there is a notorious coincidence......

Also mfw I solved this task back then but didn't solve it now because I thought some of the elements aren't elements cries

I even had a file named Elementary.cpp and I was asked if I wanted to replace that file.......

»
4 года назад, # |
  Проголосовать: нравится +86 Проголосовать: не нравится

In problem D, I actually did a research on OEIS. Found out that all the sample input were chess related, I thought that the problem is to collect the first element of each chess related sequences. I searched OEIS "chess", got 61 pages, with 607 results. So I wrote a program that collects the data from those pages, and writes the code for me. After I done that, I happily submitted the code and got WA on test 5. And only after all of these, I figured out what the actual task is. I really got fooled.

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

Could not do. I am a fool indeed.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

never been so stressed.

»
4 года назад, # |
Rev. 6   Проголосовать: нравится -36 Проголосовать: не нравится

contest get over

solution to last question

IT'S SHOWTIME

HEY CHRISTMAS TREE varX

---------------------------

YOU SET US UP 0

---------------------------

GET YOUR ASS TO MARS varX

---------------------------

DO IT NOW

---------------------------

I WANT TO ASK YOU A BUNCH OF QUESTIONS AND I WANT TO HAVE THEM ANSWERED IMMEDIATELY

---------------------------

HEY CHRISTMAS TREE a

---------------------------

YOU SET US UP varX

---------------------------

GET TO THE CHOPPER a

---------------------------

HERE IS MY INVITATION varX

---------------------------

HE HAD TO SPLIT 1000

---------------------------

ENOUGH TALK

---------------------------

HEY CHRISTMAS TREE b

---------------------------

YOU SET US UP varX

---------------------------

GET TO THE CHOPPER b

---------------------------

HERE IS MY INVITATION varX

---------------------------

I LET HIM GO 1000

---------------------------

ENOUGH TALK

---------------------------

HEY CHRISTMAS TREE result

---------------------------

YOU SET US UP 1

---------------------------

HEY CHRISTMAS TREE isTrue

---------------------------

YOU SET US UP 1

---------------------------

STICK AROUND isTrue

---------------------------

GET TO THE CHOPPER result

---------------------------

HERE IS MY INVITATION result

---------------------------

YOU'RE FIRED a

---------------------------

ENOUGH TALK

---------------------------

GET TO THE CHOPPER a

---------------------------

HERE IS MY INVITATION a

---------------------------

GET DOWN 2

---------------------------

ENOUGH TALK

---------------------------

GET TO THE CHOPPER result

---------------------------

HERE IS MY INVITATION result

---------------------------

I LET HIM GO b

---------------------------

ENOUGH TALK

---------------------------

GET TO THE CHOPPER isTrue

---------------------------

HERE IS MY INVITATION a

---------------------------

LET OFF SOME STEAM BENNET 1

---------------------------

ENOUGH TALK

---------------------------

CHILL

---------------------------

TALK TO THE HAND result

---------------------------

YOU HAVE BEEN TERMINATED

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +40 Проголосовать: не нравится

About C. In russian we usually say: "и жили они долго и счастливо", but in the problem the correct permutation is "и они жили долго и счастливо". It took me about 25 minutes to understand why i have wa8, then i change my language to English and solve:)

»
4 года назад, # |
  Проголосовать: нравится +65 Проголосовать: не нравится

The problems were extremely nice this time, thanks!

»
4 года назад, # |
  Проголосовать: нравится +11 Проголосовать: не нравится

Fun contest :)

»
4 года назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

Is the contest is rated?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Was problem G meant for Romans?

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

Did anyone have a long queue on custom invocation? It took me about 10 minutes to make sure the UnknownX language is actually ArnoldC; luckily, "It's showtime" title allowed me to start working on the solution before that, but waiting for 10 minutes was weird.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    Oh. I got so much penalty submitting the code just to see the compiler errors :/. Next time I'll use the custom invocation. Thanks for the tip!

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I failed to submit code (for practice) after contest... :(

»
4 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

When can we submit the code after contest....

I want to check whether my H is correct or not.

»
4 года назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится
                          # # ###### #                          
                      # ### # # #  # #####                      
                    ### #   #   ## #    #  #                    
                 #### # # #####    #### # ### #                 
                ##      # #     ####    # # # ##                
              #  ## ##### ### ### #  # ##   #  # #              
             ###  #  #      # #   ####  ## ## ## ##             
           ###### ## ## ### ### ###    ##  #  #   ###           
          ############    #     #   # ##  ## ## #  ###          
         #################### #######  ####  ##########         
        ################################################        
       ##################################################       
       ##################################################       
      ####################################################      
     ######################################################     
     ######################################################     
    ########################################################    
   ##########################################################   
     ########################################################   
       ############   #  ##############   # # #############     
  ##     #########  #   ############### #       ########        
  ####     #####   ## #   ############### ## ##  # ##       ##  
 #######     #   ###  ###  ########### #  #   ##         ###### 
 #########     #  #  ## ##   ######### ## #####  #    ######### 
 ############ ## ###     ###  #######   #  #    ### ########### 
 #########     #   ### ###   ######## # ##### #   #  # ######## 
############ ### #  #  #   #  ######  #  #    ## ###   #########
###########   #  # ## ### ### #### # ### ####  ###   # #########
########### ###### ####    #  # #    # #  # ####   ### #########
###########     #  #  ### ###   # # ## ## #  #   #  #  #########
############ ## #### ## ###   # ###     #### # ###### ##########
###########   ###  #  #   ### #  ### ####  # ###   #   #########
#############     ## ### ## ### ##     #  ## ##  #   # #########
############## ## #    # #    # #  # # ## #   ## ## ############
############    #### # # # # #### ## #  # ###  ###   ###########
############# #  #   ###   ####   #  ##    #  ##   #############
################   ###   # ## ## ## ##  # ### #  #  ############
##################   # ######     #######   #   ################
 ################  #    ##### # ###########   #  ############## 
 ##############################    ############################ 
 ########################### #  # ############################# 
 ######################### #   ################################ 
  ########################   #   #############################  
  #######  ################### ###############################  
   ####### # ################   ##################### #######   
   #######   #   ###########  # ########### ##### #    ######   
   ####### # # #  # #   ## # ##  # #  # ##   ##     # #######   
    ########   ##     #       ##   ##      # #  ### ########    
     ####### #  #### #### ###  ###    ### ##### # #########     
     ########## #  #  #   # #### ### ## #     #   #########     
      ########    ## ## #    #   # #    ### #   ##########      
       ######### ##   ##### ## # #   # ##   #############       
       #########  ###  # #   ###   # ###  #   ###########       
        #########   ####   ### ## #### #### ############        
         ######### ##    # #      #    # ##############         
          ############ # #### ## ## # ##  ############          
           #############    ####    #    ############           
             #################### #################             
              ####################################              
                ################################                
                 ##############################                 
                    ########################                    
                      ####################                      
                          ############                          
»
4 года назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

first question was damm good . i refreshed my codeforces question site ,checked my wifi just to make sure that that there is no question statement ,the name of question itself was the question . Really enjoyed this contest . it's gave new and exciting experience .

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Thanks so much for preparing this round ! Love it so much. How could i submit my code right now ?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

HASTA LA VISTA, BABY

»
4 года назад, # |
Rev. 2   Проголосовать: нравится +5 Проголосовать: не нравится

I encountered a strange bug here.

Let's say that we try to get the answer to D from OEIS directly:

import re
import urllib.request

S = input()
with urllib.request.urlopen(f"http://oeis.org/search?q=id:{S}&fmt=text") as page:
    print(re.search(f'%S {S} \d+', page.read().decode()).group(0).split()[-1])

This runs fine on a clean environment with Python 3.7.2, but crashes on CF with error 13131313. The first guess is that the crash is caused by trying to connect to Internet, but that's not the case — import urllib.request already fails and even import _ssl fails with this same error. Since the latter is simply calling the dynamic loader on lib/python3.7/lib-dynload/_ssl.cpython-37m-x86_64-linux-gnu.so, it can't be a network access error.

I tried finding out if someone else had this problem with this error code. The first and only meaningful search result is CF. And guess what, it's about a dynamic library import error, but a different one on PyPy 3. Turns out Python (CPython) 3 on CF can't import some libraries as well.

We could say CF had a custom April 1st prank for me.

  • »
    »
    4 года назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    For what it's worth, I've encountered error 13131313 too, when I tried to use import std; in D language (it's an equivalent of #include <bits/stdc++.h> in GNU C++, useful for one-off scripts and short solutions).

    My guess at the time was that importing some libraries toggle a Security Violation custom check at the invoker. Didn't pursue it further though. Sounds more plausible now. Likely the same happens with Python libraries known to deal with internet connections.

    • »
      »
      »
      4 года назад, # ^ |
        Проголосовать: нравится 0 Проголосовать: не нравится

      The link with the PyPy case hints that it could be a missing library, i.e. HTTP 404 (or a general 400) instead of 401/403, because that was a problem with _hashlib and I doubt that uses extra system resources. Maybe Mike handles security in most languages simply by purging undesirable elements of the ecosystem.

      In your case, isn't the D compiler still terribly outdated? It could also be that this include just doesn't exist in the CF version.

      • »
        »
        »
        »
        4 года назад, # ^ |
          Проголосовать: нравится 0 Проголосовать: не нравится

        Yeah, something seems to happen on the invokers with the libraries viewed as security threats. If they are just removed, it may be possible to track in the repository, pbox.me.

        The D compiler is up to date. When I got that 13131313 error, the compiler was 2.086 (May 2019 version). And it got updated to 2.091 (March 2020 version) just recently, thanks to Mike for that :) .

        Tried again right now, I get a memory limit exceeded instead of 13131313.

        • »
          »
          »
          »
          »
          4 года назад, # ^ |
            Проголосовать: нравится 0 Проголосовать: не нравится

          Seems like Memory Limit is something deliberate, tried it on problems with different limits:

          • »
            »
            »
            »
            »
            »
            4 года назад, # ^ |
              Проголосовать: нравится 0 Проголосовать: не нравится

            Since import is also a runtime operation, not compile-time like #include, maybe the imported everything counts towards used resources in such a way that the memory runs out. It shouldn't be that large, but I don't know how exactly shared resources are counted and what's checked for MLE. Many recursive DLL/SO loads could hypothetically break it.

            • »
              »
              »
              »
              »
              »
              »
              4 года назад, # ^ |
                Проголосовать: нравится 0 Проголосовать: не нравится

              Well, I was testing with D, and import is compile-time there.
              On Testsys with DMD 2.089 (compiling and running a 32-bit Windows executable, same as Codeforces), a similar program with import std; compiles and runs just fine:

              So it's specific to Codeforces invokers.

              • »
                »
                »
                »
                »
                »
                »
                »
                4 года назад, # ^ |
                  Проголосовать: нравится 0 Проголосовать: не нравится

                import is compile-time there

                Are you sure about that? The docs talk about symbol name lookup, which is often a runtime thing. You definitely can resolve symbols from a "loaded" SO's PLT lazily when they're used during runtime, and you can do that at the program start (when they're loaded) too. I'm pretty sure your stdlib isn't linked statically either.

                This is a linker thing, both compile-time (ld etc) and runtime libdl.so. It's possible that D is using something custom for linking and the CF invoker is mishandling what it wants to do.

                Then again, I don't know about D, just general OS functionality and I'm guessing what the problem could be there. If you could view the startup part of your final executable, go over it step by step and find where it crashes with this error, that would be more productive.

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  4 года назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  You will be surprised. By default, the dmd Win32 compiler links the standard library statically from a phobos.lib file.

                  Most of it, anyway. There's CURL which has bindings in the standard library, but actually a DLL since it's a third party lib. And indeed importing CURL gets me a Runtime Error.

                  But the Memory Limit effect is something different still.

                • »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  »
                  4 года назад, # ^ |
                    Проголосовать: нравится 0 Проголосовать: не нравится

                  Huh. I guess the benefits of linking libstdc++.so dynamically don't exist in the case where you have a custom library that isn't used by anything else. Now that I think about it, some OJs use the -static flag to do it in C++ too.

                  So turns out the problem really was dynamic linking. That makes the MLE extra strange since if dynamic linking = security violation, then getting MLE instead = security risk. Well, MLE is either undefined behaviour of the judge or really too much memory allocated somehow.

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

how to solve C?

»
4 года назад, # |
  Проголосовать: нравится +1 Проголосовать: не нравится

how to solve B ? what are the first and second digit for in output ?

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I got wa64 on A, help me

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

For me problem A was a hint for problem C. C was very interesting.

»
4 года назад, # |
  Проголосовать: нравится +10 Проголосовать: не нравится

Remark: because of a bug in the "UnknownX" language, the problem H's input format must be concatenated into a single integer, and there are some problems unsolvable with UnknownX.

However, there's a workaround for that: separate the two numbers with 8192 spaces.

This is an accepted code for problem H, modified to take two numbers as input: Try it online!

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Wow... i really loved giving this contest. It was fun.!!

»
4 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Why hasn't the virtual participation been enabled? :) Would be fun to participate.