Getting TLE

Правка en1, от Evan_Shareef, 2020-09-08 10:27:00

Idea at a glance: I precalculated all the sum of phi() values till some range. Then while for some query I ran a binary search on the precalculated sum of the euler values.... So according to this process complexity should be O(n) + T*(log(n)

Problem:

https://algo.codemarshal.org/contests/icpc-dhaka-19-preli/problems/G

My code:

https://pastebin.com/XcvSPtse

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Evan_Shareef 2020-09-08 10:29:40 219
en1 Английский Evan_Shareef 2020-09-08 10:27:00 390 Initial revision (published)