you give integer array a_0 a_1 dot a_n 1 integer k you perform follow code itlong long ans 0 create 64bit sign variable initially equal 0forint 1 k int idx rndnext0 n 1 generate random integer 0 n 1 inclusive integer 0 n 1 probability choose an aidx aidx aidx iYour task calculate expect value variable an perform codenote input generate accord special rule input format section