Автор tourist, 3 года назад, перевод, По-русски

1782A - Ноутбук и проектор

Explanation
Source

1782B - Поход в кинотеатр

Explanation
Source 1
Source 2

1782C - Равные частоты

Explanation
Source

1782D - Много точных квадратов

Explanation
Source

1782E - Сжатие прямоугольников

Explanation
Source

1782F - Вставка скобок

Explanation
Source

1782G - Разнообразная раскраска

Explanation
Source (2nd approach)

1782H1 - Оконные сигналы (простая версия)

Explanation
Source for easy version
Source for hard version
  • Проголосовать: нравится
  • +253
  • Проголосовать: не нравится

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

Nice

Editorial is here)

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

omg tourist Editorial

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

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

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

Why are there so few upvotes on this blog?

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

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

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

what is the fast factorization method in in problem D.

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

    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.

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

Can anyone please explain C a little bit detailed

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

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

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

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

»
14 месяцев назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

For problem C:

Store the frequencies of each character in a 2D array freq[][] of size 26*2 (Character in 1st column and it's corresponding frequency in 2nd column. Sort the freq[][] array by frequencies(2nd col). Now there can be 1 <= d <= 26 (N % d == 0) distinct characters. I claim that a sliding window of length 'd' over the freq[][] array will give me the required characters with each character having frequency of N/d. This window will be the one that minimizes the loss. But how to calculate loss?

A simple solution will be the in the sliding window match the higher frequency characters with the lower frequency characters and balance out the remaining frequencies. This is due the fact that once we fix a frequency (N/d) we are picking the characters that are close to that frequency.

Here is the java submission: https://mirror.codeforces.com/contest/1781/submission/308437460