codeforces 1067F (Educational Codeforces Round 65 (Rated for Div. 2) F. Scalar Queries ) 树状数组计算贡献
F.ScalarQueriestimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouaregivenanarraya1,a2,…,ana1,a2,…,an.Allaiaiarepairwisedistinct.Let'sdefinefunctionf