fpc_coder's blog

By fpc_coder, history, 3 years ago, In English

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?

Full text and comments »

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

By fpc_coder, history, 3 years ago, In English

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.

Full text and comments »

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

By fpc_coder, history, 3 years ago, In English

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

Full text and comments »

  • Vote: I like it
  • 0
  • Vote: I do not like it