The 2018 Egyptian Collegiate Programming Contest was held yesterday this was a problem from it where he asks for↵
↵
<img src="https://www.imageupload.co.uk/images/2018/10/21/rendercaa22.jpg" border="0">↵
↵
Where n<=10^5 and a[i]<=10^5 answer should be printed %10^9+7↵
↵
I would appreciate any help in solving this problem and thanks in advance
↵
<img src="https://www.imageupload.co.uk/images/2018/10/21/rendercaa22.jpg" border="0">↵
↵
Where n<=10^5 and a[i]<=10^5 answer should be printed %10^9+7↵
↵
I would appreciate any help in solving this problem and thanks in advance