Muhammad.Ahmad's blog

By Muhammad.Ahmad, history, 18 months ago, In English

I just have to tell you that I have made a problem using polygon. I was just thinking why would not I share it to you guys. Must try to solve it. Please also suggest me what will be the estimated difficulty level of the problem.

https://codeforces.com/contestInvitation/e97581168e2cf5bb05ca773f4dfce2a0eafd1e20

This is a whole contest made in polygon. But to do this problem accept the contest invitation and open the problem:I

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

| Write comment?
»
18 months ago, # |
  Vote: I like it 0 Vote: I do not like it

It says I'm not allowed to view it.

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

One general advice about contest preparation — it's usually not a good idea to write who made the problems on the problem itself. Such information is better given in the editorials, as bad things may happen (say, massive amounts of downvotes) to the problemsetter if a participant has bad feelings about a certain problem during the competition.

»
18 months ago, # |
Rev. 3   Vote: I like it +4 Vote: I do not like it

I think there's something missing, like if our tree is something like this :

4
1 2 -1
2 3 -1
3 4 3

there is two possible ways to fix the roads :

Option 1
Option 2

Also I think the problem(if we ignore the issue) can be solved in O(nlogn) time

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

    That's not an issue. If you have multiple solutions, you can give any of them. for example if there is a whole road broken. You can fill it either ways, (top to bottom) or (bottom to top).