Блог пользователя visheshgautam.official

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

In this submission :https://mirror.codeforces.com/contest/1775/submission/207782995 I am getting MLE i have scartched my head for hours and its still not resolving,can any comrade help this noob?

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

»
3 года назад, скрыть # |
Rev. 3  
Проголосовать: нравится 0 Проголосовать: не нравится

(I think maybe you have read the tutorial and trying to do the same thing.)

I just take a quick look. The problem seems to be that there are too many edges. When you build the graph, it's enough to consider only prime factors instead of all the factors because if two numbers have the same common factor, they must have a common prime factor.

»
3 года назад, скрыть # |
 
Проголосовать: нравится +2 Проголосовать: не нравится

Just don't submit the code:)