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

Автор fpc_coder, история, 3 года назад, По-английски

I'm trying to solve this task: Codewars — Square sums. The task asks you to find a permutation of $$${1, 2, \ldots, n}$$$ such that the sum of two adjacent elements is a perfect square. The constraint is $$$n\leq 1000$$$. My idea is to construct a graph where $$$i$$$ is connected to $$$j$$$ if $$$i+j$$$ is perfect square, then find a Hamiltonian path on this graph. However, backtrack to find Hamiltonian path is impossible because of large constraint. Anyone have idea on a heuristic to find Hamiltonian path on a graph that can be applied to this problem?

Полный текст и комментарии »

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

Автор fpc_coder, история, 3 года назад, По-английски

Where can I find the English statement of tasks from Polish Junior Olympiad in Informatics. If you can also provide a link of an online judge for them then it'd be great.

Полный текст и комментарии »

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

Автор fpc_coder, история, 3 года назад, По-английски

When I login to Topcoder, the practice problem list only have 12 problems. Where are all the other problems?

Полный текст и комментарии »

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