By tourist, 23 months ago, In English

1782A - Parallel Projection

Explanation
Source

1782B - Going to the Cinema

Explanation
Source 1
Source 2

1782C - Equal Frequencies

Explanation
Source

1782D - Many Perfect Squares

Explanation
Source

1782E - Rectangle Shrinking

Explanation
Source

1782F - Bracket Insertion

Explanation
Source

1782G - Diverse Coloring

Explanation
Source (2nd approach)

1782H1 - Window Signals (easy version)

Explanation
Source for easy version
Source for hard version
  • Vote: I like it
  • +253
  • Vote: I do not like it

| Write comment?
»
23 months ago, # |
  Vote: I like it +14 Vote: I do not like it

Nice

Editorial is here)

»
23 months ago, # |
Rev. 2   Vote: I like it +34 Vote: I do not like it

omg tourist Editorial

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

    omg tourist Editorial

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

    Do you know why your comment was downvoted? Probably not. Actually, the same comment can be upvoted in a different time/place.

    A possible reason is that some random person just randomly downvoted your comment and then some other insane users just continue downvoting without thinking. Toxic, crazy, but this is the reality here.

»
23 months ago, # |
Rev. 2   Vote: I like it +8 Vote: I do not like it

A simple solution to problem E:

The solution for height = 1 is trivial. I'll discuss about a similar solution for height = 2.

Step 1 : Solve the trivial problem for the rectangle covers both rows only.

Step 2 : Let's detach the rectangles we chose in step 1 into 2 rectangles in the first and second row.

Step 3 : Solve the trivial problem for each rows.

Step 4 : Merge the rectangle in step 2.

Caution: for the rectangles created in step 2, you can only remove or keep them without shrinking.

My submission: 189882008

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

Why are there so few upvotes on this blog?

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

    Why are there so few upvotes on this comment?

»
23 months ago, # |
Rev. 2   Vote: I like it +6 Vote: I do not like it

I would recommend replacing "Source" with "(Source) Code", at first glance I thought it was the inspiration or the source of the problem :D

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

what is the fast factorization method in in problem D.

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

    Check all numbers n where n*n<=p and n>=1 where p is the number you want to factor. The factors will always be when p%n==0 and the factors themselves will be n and p/n. This works because when we check all numbers less than or equal to sqrt of p, the following pair(p/n) will get all the numbers greater than or equal to sqrt of p.

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

      This is the general factorization I thought there is faster factorization method possible for this. By the way how to optimize the second part of the problem.

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

Can anyone please explain C a little bit detailed

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

    We iterate through all the divisors of length N of string, and for each character greedily try to change them so that equal frequencies can be maintained. The greedy idea for constructing the string is explained in the editorial.

    Here's a link to my submission, maybe the top submissions would be shorter: https://codeforces.net/contest/1781/submission/206606856

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

can anyone give hint on how to solve the bonus task of problem $$$D$$$ given in the editorial?

  • »
    »
    2 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    This is the solution to the bonus task.

    Submission: 295549509

    The logic is very similar to what is given in tutorial. Hope it helps

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

loved your approach @tourist everytime.

»
11 days ago, # |
Rev. 2   Vote: I like it +5 Vote: I do not like it

$$$E$$$ has some pretty weak tests. My $$$O(n^2 \log n)$$$ solution passed in $$$<1$$$ second. Can more testcases be added?