need help with this problem

Revision en1, by TuHoangAnh, 2022-02-23 17:49:56

given an array consists of $$$n$$$ integers and an integer $$$p$$$, find number of pair($$$i,j$$$):

so that $$$i<j$$$ and $$$(a[i]*a[j])$$$ $$$mod$$$ $$$p$$$ $$$=$$$ $$$(a[i]+a[j])$$$ $$$mod$$$ $$$p$$$

$$$n<=10^5$$$

$$$1<p<=10^9$$$

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English TuHoangAnh 2022-02-23 17:49:56 218 Initial revision (published)