Codeshark round #1 — A2 and A3

Правка en1, от dario-dsa, 2015-06-30 14:36:10

Hi ,
I solved A1 like everybody else but now I have problems with A2 and A3. My main idea is not that special, try every number for P and generate all possible q and stop if you enter in the circle with map, so that idea is O(N^2) and that is not good. Can anyone help me and say some suggestion for that problem.
Task link

Теги codefoces, c++

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский dario-dsa 2015-06-30 14:36:10 409 Initial revision (published)