单选题

运行下面程序,输出结果是(  )

#include <bits/stdc++.h>
using namespace std;
int a[6]={16,8,32,10,9,21};
int func(int L,int R,int d)
{
    if(L>R) return 0;
    int sum=0,m=a[L],index=L;
    for(int i=L+1;i<=R;i++){
        if(m<a[i]){
            m=a[i];index=i;
        }
    }
    int lt=func(L,index-1,d+1);
    int rt=func(index+1,R,d+1);
    return lt+rt+m*d;
}
int main()
{
    cout<<func(0,5,1)<<endl;
    system("pause");
    return 0;
}
A

196

B

197

C

198

D

199

赣ICP备20007335号-2