How to solve this question?

Правка en1, от samuels_882, 2019-12-06 16:40:11

Given an array A of size n.count the number of pairs such that A[i]*A[j]==A[i]+A[j]. Since the constraint of A[i] is upto 10^9 and N is upto 40,000 , I cannot run the naive technique of running a double loop. Any other way to solve it in one loop?

Теги #implementation

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский samuels_882 2019-12-06 16:40:11 274 Initial revision (published)