Am I using policy based ordered_set wrong? Please help

Revision en1, by yesnomaybe, 2020-10-19 12:52:55

Question link : https://www.codechef.com/problems/AVGMED Question summary : Find number of subarrays of length K, such that average >= median and also the median and average must both be prime or non prime.

Solution link using ordered_set : https://www.codechef.com/viewsolution/39036972 Am I doing something wrong with how to use ordered_set? Or my solution is wrong itself? Please help.

Code

Another solution : https://www.codechef.com/viewsolution/38989875 Similar solution which got accepted. I am not to able to see what I did wrong (I am blind or what?). Can someone kindly help?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English yesnomaybe 2020-10-19 12:53:47 481
en1 English yesnomaybe 2020-10-19 12:52:55 2975 Initial revision (published)