Bredor's blog

By Bredor, 4 years ago, In English

Good evening, everyone.

In the course of the quarantine, nature has cleaned up so much that I came back to CF. Hello to those who don't know me, and sorry to others.

I want to introduce a few amendments to the gym section and add my contest there. I originally planned to host it on April 1st, but I was a bit late, so the contest will be half-joke, half-traditional.

You will be given from 6 to 8 tasks and from 2 to 3 hours. During the contest, you will be provided with the opportunity to help Mike, Rudolph, and some other good people.

The competition will be suitable for all divisions, genders, and races.

Of course, I would like to thank MikeMirzayanov for CF and Polygon, and also express my condolences to people who agreed to test the problems.

The winner will be awarded a valuable prize — an online certificate.

The contest will start on Jun/26/2020 18:35 (Moscow time), follow the link: contest link. Don't forget to set yourself a reminder! When the contest is over, I will post an editorial.

UPD1: Registration will open 6 hours before the contest

UPD2: Registration is open now! Contest is available for registration by the link above and in the gym

UPD3: IMPORTANT NOTE! If you have coach mode enabled — you have to disable it in gym to be able to register for contest

UPD4: One hour before contest!

UPD5: 10 minutes before contest!

UPD6: Contest has started!

UPD7: Thank you for all contestants! Editorial would be posted on the weekend

UPD8: Editorial is published. Also, I have forgotten to add some important tests to $$$G$$$, and some incorrect solutions got AC. Following best practices, it was decided to add new tests when the contest is over. However, to keep everything consistent, I did not rejudge any solutions.

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

| Write comment?
»
4 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Oh god damn it, I remember you

»
4 years ago, # |
  Vote: I like it -10 Vote: I do not like it

The winner will be awarded a valuable prize — an online certificate.

Sarcastic?

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

А откуда будут взяты задачи контеста? ( просто интересно )

»
4 years ago, # |
  Vote: I like it -10 Vote: I do not like it

Any reason keeping the contest length unusually to 2 hours 28 minutes?

»
4 years ago, # |
  Vote: I like it -10 Vote: I do not like it

Ok after trying B,I and vasya are in same condition!! LOL

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    So rage quit competitive programming like Vasya, lol

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it -10 Vote: I do not like it

      Well I guess now I am alone coz 34 people(till now) helped him!! LOL

»
4 years ago, # |
  Vote: I like it +12 Vote: I do not like it

Correlation between answers(you'll know when you know), Russian vulgarity, and unusual length of a contest- Sire, you have my respect!

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

    Just realized the solution for the equation in question A was 228, this guy is a frickkin legend!

»
4 years ago, # |
  Vote: I like it +67 Vote: I do not like it

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

What the hell was test 2 in C?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it -13 Vote: I do not like it

    Trash problem: The intended solution is "Anime is trash" (unpopular opinion).

    • »
      »
      »
      4 years ago, # ^ |
        Vote: I like it 0 Vote: I do not like it

      For a while I doubted my sanity, forgot this is not an official contest :P

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

      Why do you think it's unpopular?

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

How to solve problem B?

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

    Do binary exponentiation, except instead of a*1ll*b%m use a*b%m, where a and b are int.

  • »
    »
    4 years ago, # ^ |
    Rev. 2   Vote: I like it +3 Vote: I do not like it

    These are the two relevant articles:

    English users had a disadvantage, since code on the Russian website had int. Implying that Vasya copy-pasted the code without realizing internally it needs to use long long.

    So, this binpow "works":

    int binpow (int a, int n, int m) {
    	if (n == 0)
    		return 1;
    	if (n % 2 == 1)
    		return (binpow (a, n-1, m) * a) % m;
    	else {
    		int b = binpow (a, n/2, m) % m;
    		return (b * b) % m;
    	}
    }
    
»
4 years ago, # |
  Vote: I like it +4 Vote: I do not like it

Can someone explain me solution for B? xD

»
4 years ago, # |
Rev. 2   Vote: I like it +47 Vote: I do not like it

thank u bredor

EDIT: no thank

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Will you provide editorial?)

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

    Sure, but tomorrow because it's late night in Bratsk

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Why binpow solution doesn't work for B on python?

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

    Because Vasya's bug was an overflow (with signed 32-bit integers), and Python's int does not overflow.

»
4 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

Can anyone explain how to solve Problem C Anime?

»
4 years ago, # |
  Vote: I like it 0 Vote: I do not like it

How to solve "Listen to your Heart " ?

  • »
    »
    4 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    from equation we can see sqrt(x-3) It implies x is >=3. Start iterating from 3(value of x) to ... and put x in Equation. whenever L.H.S==R.H.S you got the answer. Don't forget to use Double

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

    Open bredor's profile and look at his hat