0

Codeforces Round #844 Editorial

 1 year ago
source link: https://codeforces.com/blog/entry/111783
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client
By tourist, 10 days ago, In English

10 days ago, # |

Editorial is here)

  • 9 days ago, # ^ |

    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.

9 days ago, # |

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

  • 9 days ago, # ^ |

    adu sir thanhchauns2 manh wa

9 days ago, # |

Why are there so few upvotes on this blog?

  • 9 days ago, # ^ |

    Why are there so few upvotes on this comment?

9 days ago, # |

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

4 days ago, # |

what is the fast factorization method in in problem D.

  • 4 days ago, # ^ |

    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.

    • 4 days ago, # ^ |

      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.

6 minutes ago, # |

Can anyone please explain C a little bit detailed


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK