Блог пользователя hiddentesla

Автор hiddentesla, история, 7 лет назад, По-английски

Hello, currently i struggle with output only task. I usually can only come up with the most brute force solution. Is there any tips to deal with these kinds of problem?

  • Проголосовать: нравится
  • -1
  • Проголосовать: не нравится

»
7 лет назад, # |
  Проголосовать: нравится -13 Проголосовать: не нравится

You can try to analyze the given inputs separately and test for special cases of the problem. For example, this problem basically asks you to color a graph, which in general would not be possible in P, but once you look at the test data you can see that most of the cases contain special graphs which are easier to solve.