HDU-4283 You Are the One

The TV shows such as You Are the One has been very popular. In order to meet the need of boys who are still single, TJUT hold the show itself. The show is hold in the Small hall, so it attract a lot of boys and girls. Now there are n boys enrolling in. At the beginning, the n boys stand in a row and go to the stage one by one. However, the director suddenly knows that very boy has a value of diaosi D, if the boy is k-th one go to the stage, the unhappiness of him will be (k-1)*D, because he has to wait for (k-1) people. Luckily, there is a dark room in the Small hall, so the director can put the boy into the dark room temporarily and let the boys behind his go to stage before him. For the dark room is very narrow, the boy who first get into dark room has to leave last. The director wants to change the order of boys by the dark room, so the summary of unhappiness will be least. Can you help him?

Input
  The first line contains a single integer T, the number of test cases. For each case, the first line is n (0 < n <= 100)
  The next n line are n integer D1-Dn means the value of diaosi of boys (0 <= Di <= 100)
  
Output
  For each test case, output the least summary of unhappiness .
  
Sample Input
2 
5
1 2 3 4 5
5
5 4 3 2 2

Sample Output
Case #1: 20
Case #2: 24

/*
	HDU-4283
	做法 区间DP
	dp[i][j]表示i到j这段区间内的最小代价
	状态转移方程: 区间(i,j)内假设第i个人在第k次出去,枚举k 
	dp[i][j]=min(dp[i][j],dp[i+1][k]+dp[k+1][j]+a[i]*(k-i)+(k-i+1)*(sum[j]-sum[k]));
*/
#include<bits/stdc++.h>
using namespace std;
#define maxn 1010
#define INF 0x3f3f3f3f
int a[maxn],sum[maxn],dp[maxn][maxn];
int main(){
	int t,cas=0; cin>>t;
	while(t--){
		int n; cin>>n;
		for(int i=1;i<=n;i++){
			cin>>a[i];
			sum[i]=sum[i-1]+a[i];
		} 
		for(int i=1;i<=n;i++){
			for(int j=1;j<=n;j++){
				if(j>i) dp[i][j]=INF;
				else dp[i][j]=0;
			} 
		}
		for(int len=1;len<=n;len++){
			for(int i=1;i<=n-len;i++){
				int j=i+len;
				for(int k=i;k<=j;k++){
					dp[i][j]=min(dp[i][j],dp[i+1][k]+dp[k+1][j]+a[i]*(k-i)+(k-i+1)*(sum[j]-sum[k]));
				}
			}
		}
		cout<<"Case #"<<++cas<<": "<<dp[1][n]<<endl;
	}
	return 0;
}
/*
2 
5
1 2 3 4 5
5
5 4 3 2 2
*/

这些文档涵盖了5G网络优化的多个方面,包括**载波聚合、干扰管理、负载均衡、电调核查等**。以下是对这些文档内容的详细总结: #### **5G网络优化中的载波聚合技术** - **载波聚合的定义和作用**: - 载波聚合(CA)是3GPP在Release 10阶段引入的技术,通过将多个连续或非连续的载波聚合成更大的带宽,提高整网资源利用率和用户体验。 - **开启步骤及脚本**: - 确认站内是否有CA License。 - 添加CA组并配置相关参数。 - 基站盲配置开关打开,激活门限设置,增加CA小区集辅小区配置。 - **载波聚合A5测量事件开关的作用**: - A5测量事件开关打开时,支持CA的UE会A4转A5,调整A5门限1到-43dBm,类似于走A4事件触发异频切换。 - 关闭时,当UE处于载波聚合状态下才会将A4转A5,但不会调整A5门限1。 #### **干扰管理和优化** - **系统外干扰**: - 信号放大器和信号屏蔽器是主要的干扰源。解决建议包括协调推进信号放大器关、替、拆工作,引导用户使用VOLTE业务,以及联系公安进行收缴关闭信号屏蔽器。 - **系统内干扰**: - 包括杂散干扰、阻塞干扰和互调干扰。解决方法包括调整天面、增加隔离度,加装滤波器等。 #### **移动性负载均衡(MLB)配置方案** - **背景描述**:随着LTE用户数的快速发展,部分小区的用户数或PRB利用率已接近容量极限。MLB是指eNodeB判断小区的负载状态,当小区处于高负载状态时,将负载高小区中部分UE转移到负载低的小区,平衡异频或异系统之间的负载。 - **方案分析与实施**: - 方案介绍:MLB分为触发模式、选择目标小区、负载均衡执行三个阶段。根据这三个维度可划分为以下各种类型。 - 配置原则:确定候选邻区,交互负载信息,识别交互邻区和盲邻区,确定目标小区列表。 - 均衡执行:现网采用切换的方式转移同步态用户,RRC connection release方式转移空闲态用户。 - 三种均衡方式的优缺点对比:异频同步态用户数均衡(转移同步态用户)、异频同步态用户数均衡(转移空闲态用户)、异频空闲态UE预均衡。 #### **FDD电调核查及修改方法** - **FDD侧电调修改方法**:查询电调天线配置信息和子单元配置信息,可以查询/修改电子下倾角。 - **GSM侧电调修改方法**:查询天线设备编号、框槽号及天线设备序列号等信息。 - **常见的天线类型及匹配问题**:HW天线是现网绝大多数天线类型,需特别注意设备厂家编码和设备序列号的匹配问题。 综上所述,这些文档详细介绍了5G网络优化中的关键技术和方法,从载波聚合到干扰管理再到移动性负载均衡和FDD电调核查等方面提供了全面的指导和解决方案。通过这些内容的学习和应用,可以有效提升5G网络的性能和用户体验。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值