2018 Huawei Software Elite Challenge - Final Questions

The following descriptions are mainly about the change points relative to the rematch questions, and other descriptions and conditions are the same:
Generic description change points:
Physical server:  There are still three types of physical servers: General, High-Performance, and Large-Memory, but each type of server has a different price. A new server will incur a corresponding deployment cost.
Virtual machine specifications: Virtual machines  of different specifications usually have different rental prices. It is assumed that only the monthly rental scenario needs to be considered, and the length of the rental period (months) does not need to be considered. In addition, it is assumed that a virtual machine with a CPU greater than or equal to 16 and a CPU to memory (GB) ratio of 1:1 can only be placed on a High-Performance physical server with a memory greater than or equal to 32 GB and a memory (GB) equal to A virtual machine with a CPU ratio greater than or equal to 4:1 can only be placed on a large-memory physical server, and other types of virtual machines are not required.
Competition program content:  Please design a program that can accurately predict the distribution of virtual machines and find a virtual machine deployment solution with the greatest profit margin: Maximize the profit margin of the cloud platform under the premise of ensuring the accuracy of the prediction.
Changes in the winning and losing rules of the game:
Compare the product of the prediction accuracy output by the contestant's program and the profit margin, and the larger one wins. If the scores are the same, the running times of the programs are compared, and the one with the shorter time wins. If the running time is also the same, the ranking will be distinguished according to the time of submission. If the output result does not satisfy the constraints, the score is zero. 
(Note: Sales Profit Margin = (Total Revenue - Total Cost)/Total Revenue)
Supplementary explanation of changes:
1. The above requirements require that a specific type of virtual machine must be placed on a specific type of physical server, but it is not required that a certain type of physical server can only accommodate a specific type of virtual machine, that is, any physical server with resource fragments can pass the fill any type of virtual machine to reduce redundancy;
2. The maximum number of training data sets for each test case in the finals is 100,000;
3. The running time of the program should not exceed 120s (single use case);
4. The types of virtual machine specifications that need to be predicted are expanded to the following 24 types:
flavor1  1  1024
flavor2  1  2048
flavor3  1  4096
flavor4  2  2048
flavor5  2  4096
flavor6  2  8192
flavor7  4  4096
flavor8  4  8192
flavor9  4  16384
flavor10  8  8192
flavor11  8  16384
flavor12  8  32768
flavor13  16  16384
flavor14  16  32768
flavor15  16  65536
flavor16  32  32768
flavor17  32  65536
flavor18  32  131072
flavor19  1  8192
flavor20  2  16384
flavor21  4  32768
flavor22  8  65536
flavor23  16  131072
flavor24  32  262144
Remarks: flavor name CPU core memory size (MB)
Program input and output change points:
input file format
Program input is a space-delimited text file, each line of the file ends with a newline character ('\r\n').
The file format is:
Number of physical server types (default 3)
Type name 1 Number of CPU cores of physical server Memory size (GB) Hard disk size (GB) Price (10,000 yuan)
Type name 2 Number of CPU cores of physical server Memory size (GB) Hard disk size (GB) Price (10,000 yuan)
Type name 3 Number of physical server CPU cores Memory size (GB) Hard disk size (GB) Price (10,000 yuan)
(Blank line)
Number of virtual machine specifications
虚拟机规格名称1 CPU核数 内存大小(MB) 租赁价格(元)
虚拟机规格名称2 CPU核数 内存大小(MB) 租赁价格(元)
。。。(如上虚拟机规格信息若干行)
(空行)
预测开始时间
预测结束时间(时间跨度单位为:天)
(文件结束)
示例:
3
General  56  128  1200  3.49
Large-Memory  84  256  2400  4.36
High-Performance  112  192  3600  5.45
(备注:物理服务器类型名称不超过16个字符,CPU核数为不超过3位的整数,内存大小为不超过3位的整数,硬盘大小为不超过4位的整数,价格为浮点数,保留到小数点后两位。1GB=1024MB)
3
flavor5  2  4096  190.20
flavor10  8  8192  640.30
flavor15  16  65536  2380.50
(备注:虚拟机规格名称最大不超过10位字符,CPU字段最大不超过两位字符,内存字段最大不超过6位字符,价格为浮点数,保留到小数点后两位。)
2017-01-09 00:00:00
2017-01-15 23:59:59 //注:即7天的时间跨度
(备注:日期与具体时间之间为空格符。需要预测的时间跨度为1~4个星期,开始预测时间紧接着训练数据结束时间,每轮训练数据集是延续并逐步增加的,具体见决赛赛制说明。)
(文件结束)
输出文件格式
程序输出为一个以空格分隔的文本文件,文件每行以换行符(’\n’)为结尾。
文件格式为:
预测的虚拟机总数
虚拟机规格名称1 虚拟机个数
虚拟机规格名称2 虚拟机个数
……(如上预测的不同规格虚拟机名称及数量若干行)
(空行)
物理服务器类型名称1 预测所需数量
名称1-服务器1 虚拟机规格名称1 能放置该类型虚拟机个数 虚拟机规格名称2 能放置该类型虚拟机个数 ……
名称1-服务器2 虚拟机规格名称1 能放置该类型虚拟机个数 虚拟机规格名称2 能放置该类型虚拟机个数 ……
……(如上每种类型物理服务器对应放置每种虚拟机规格数量若干行)
(空行)
物理服务器类型名称2 预测所需数量
名称2-服务器1 虚拟机规格名称1 能放置该类型虚拟机个数 虚拟机规格名称2 能放置该类型虚拟机个数 ……
名称2-服务器2 虚拟机规格名称1 能放置该类型虚拟机个数 虚拟机规格名称2 能放置该类型虚拟机个数 ……
……(如上每种类型物理服务器对应放置每种虚拟机规格数量若干行)
(空行)
物理服务器类型名称3 预测所需数量
名称3-服务器1 虚拟机规格名称1 能放置该类型虚拟机个数 虚拟机规格名称2 能放置该类型虚拟机个数 ……
名称3-服务器2 虚拟机规格名称1 能放置该类型虚拟机个数 虚拟机规格名称2 能放置该类型虚拟机个数 ……
……(如上每种类型物理服务器对应放置每种虚拟机规格数量若干行)
(文件结束)
(备注:物理服务器名称可用“类型名称-阿拉伯数字”表示,如General-1)
示例:
6
flavor5  3
flavor10  2
flavor15  1
General  2
General-1  flavor5  2
General-2  flavor5  1  flavor10  1
Large-Memory  1
Large-Memory-1  flavor10  1
High-Performance  1
High-Performance-1  flavor15  1
(备注:每个字段之间用空格隔开即可。如果输出结果中某种类型的物理服务器所需个数为0,则不需要写出来,例如“General 0”这种情况可以直接省略不写。)
单个用例评分公式变化点:
:表示第i种虚拟机规格的实际数量;;
:表示预测出来的第i种虚拟机规格数量;
: 表示虚拟机规格的集合;
: 表示预测到的第v个虚拟机的租赁价格;
: 表示所放置的第h个物理主机的部署成本;
: 表示预测出来的虚拟机集合;
: 表示所需要的物理主机集合。
(备注:由于这里统计的只是虚拟机按月租赁的价格,并非买断价格,假设每台物理服务器的寿命为50个月,即计算总部署成本的时候应为物理服务器的总价格乘以2%。单个用例满分为100分。注意如果出现利润率小于等于0的情况,均为0分。如以上例子中,利润率计算结果应为: 
运行环境
开发语言支持:C/C++、Java 7/8、Python 2.7
CPU:Intel(R) Xeon(R) CPU E5-2680 V4 @ 2.40GHz
内存:2G
CPU核数:单核
编译器:gcc 4.8.4、java 1.8、python 2.7
操作系统:Ubuntu 14.04.4 LTS 64位,内核版本 Linux version 4.4.0-31-generic
SDK:为方便选手做题,分别提供c++(兼容c)、Java、Python的SDK包供参考(见DevCloud项目),详细描述信息请见SDK目录下的readme.txt。

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325936869&siteId=291194637