Getting TLE

Правка en2, от Evan_Shareef, 2020-09-08 10:29:40

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

If needs to sign up to see the problem then please check this drive link ( problem number G) to see the problem

Drive link :
https://drive.google.com/file/d/10k4fXa1SZWQM79XbwONUMyAWk70zwMCt/view?usp=drivesdk

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)