what is the need of adding 0 in cumsum at index 0 ?
without that we can also do that ?
i am thinking like …
step 1: cumsum[0,1,…,n-1]
step2: perform cumsum[i]%n for each i , do implace.
step 3: count the frequency of each no. which is ranging from 0 to n-1
step 4 : for all those freq[i]>=2, do the combination (freq[i] C2; and add then to answer