Egor's blog

By Egor, 10 years ago, translation, In English

Task A

This is pretty simple task - we have cycle and must direct all edges on it in one of 2 directions. We need to calculate cost of both orientation and print smallest of them.
There is a small trick - we can calculate cost of only one orientation and then cost of the other will be sum of costs of all edges minus cost of first orientation.

Read more »

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