CSGO
CSGO
Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)
There are n Main Weapons and m Secondary Weapons in CSGO. You can only choose one Main Weapon and one Secondary Weapon. For each weapon, it has a composite score S.
The higher the composite score of the weapon is, the better for you.
Also each weapon has K performance evaluations x[1], x[2], …, x[K].(range, firing rate, recoil, weight…)
So you shold consider the cooperation of your weapons, you want two weapons that have big difference in each performance, for example, AWP + CZ75 is a good choose, and so do AK47 + Desert Eagle.
All in all, you will evaluate your weapons by this formula.(MW for Main Weapon and SW for Secondary Weapon)

Now you have to choose your best Main Weapon & Secondary Weapon and output the maximum evaluation.
On the first line, there is a positive integer T, which describe the number of data. Next there are T groups of data.
for each group, the first line have three positive integers n, m, K.
then, the next n line will describe n Main Weapons, K+1 integers each line S, x[1], x[2], …, x[K]
then, the next m line will describe m Secondary Weapons, K+1 integers each line S, x[1], x[2], …, x[K]
There is a blank line before each groups of data.
T<=100, n<=100000, m<=100000, K<=5, 0<=S<=1e9, |x[i]|<=1e9, sum of (n+m)<=300000
2 2 1
0 233
0 666
0 123
0 456
2 2 1
100 0 1000 100 1000 100
100 0
2000
#include <stdio.h>
#define INF 100000000000
#define M 200005//坐标个数 int D = ;//空间维数
struct Point
{
long long x[];
}pt[M]; long long dis[<<][M],minx[<<],maxx[<<];//去掉绝对值后有2^D种可能
void Get(int N)//取得所有点在指定状态(S)下的“本点有效距离”
{
int tot=(<<D);
for(int s=;s<tot;s++)//遍历所有维数正负状态
{
int coe[D];
for(int i=;i<D;i++)//设定当前状态的具体正负参数
if(s&(<<i)) coe[i]=-1.0;
else coe[i]=1.0; for(int i=;i<N;i++)//遍历所有点,确定每个点在当前状态下的“本点有效距离”
{
dis[s][i]=;
for(int j=;j<D;j++)
dis[s][i]=dis[s][i]+coe[j]*pt[i].x[j];
}
}
}
//取每种可能中的最大差距
void Solve(int N)
{
int tot=(<<D);
long long tmp,ans;
for(int s=;s<tot;s++)
{
minx[s]=INF;
maxx[s]=-INF;
for(int i=;i<N;i++)
{
if (minx[s]>dis[s][i]) minx[s]=dis[s][i];
if (maxx[s]<dis[s][i]) maxx[s]=dis[s][i];
}
}
ans=;
for(int s=;s<tot;s++)
{
tmp=maxx[s]-minx[s];
if(tmp>ans) ans=tmp;
} printf("%lld\n", ans-INF);
} int main()
{
int t;
scanf("%d",&t);
while(t--)
{
int n,m,k;
scanf("%d %d %d",&n,&m,&k);
D=k+;
for(int i=;i<n;i++)
{
for(int j=;j<=k;j++)
{
scanf("%lld",&pt[i].x[j]);
}
pt[i].x[]+=INF;
} for(int i=;i<m;i++)
{
for(int j=;j<=k;j++)
{
scanf("%lld",&pt[i+n].x[j]);
}
pt[i+n].x[]=-pt[i+n].x[];
}
Get(n+m);
Solve(n+m);
}
return ;
}
CSGO的更多相关文章
- GJM : 用Unity模仿CSGO里的火焰效果 [转载]
感谢您的阅读.喜欢的.有用的就请大哥大嫂们高抬贵手"推荐一下"吧!你的精神支持是博主强大的写作动力以及转载收藏动力.欢迎转载! 版权声明:本文原创发表于 [请点击连接前往] ,未经 ...
- 用Unity模仿CSGO里的火焰效果
CSGO里的火焰效果和真实的情况比较像,能沿着遮挡物前进,如下是模仿效果. 思路比较简单,开始想的是一圈一圈发出去,但是前圈与后圈的联系不好做,换种思路,每个方向发射一条线,这样根据上一个位置的方位先 ...
- 2017 Multi-University Training Contest - Team 9 1003&&HDU 6163 CSGO【计算几何】
CSGO Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Subm ...
- hdu 6435 CSGO(最大曼哈顿距离)
题目链接 Problem Description You are playing CSGO. There are n Main Weapons and m Secondary Weapons in C ...
- 杭电多校第十场 hdu6435 CSGO 二进制枚举子集
CSGO Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Subm ...
- 联盟周赛2019810 csgo (动态规划、不下降子序列)
今天起晚了...就做了俩题 难受的一批... 题目描述 著名第一人称射击游戏 csgo 因其优秀的平衡性,爽快的射击感和科学的战术配比赢得了世界广大玩家的好评. 在一局游戏中,分为两个阵营,他们的目标 ...
- CSGO 服务端扩展插件开发记录之"DropClientReason"(1)
最近开始接触到了CSGO这款游戏,还是老套路,就是想千方百计的从里面增添新的游戏功能,当然刚开始想做到游刃有余是有点困难, 跟之前做CS1.6的第三方开发一样,都得自己慢慢的摸索过来,纵然CSGO所使 ...
- CSGO项目
#include <Windows.h> #include <sstream> #include <iostream> #include <math.h> ...
- 阿里云Centos7部署私人CSGO服务器
大四毕业生,论文和答辩分别以1.8%的重复率和只答不辨的态度双双过关.现在就是在家等着学校发毕业证了.顺带学学驾驶...可是我这么一个喜欢折腾的人,怎么能够让自己接受这么无聊的咸鱼时光呢?因为这个寒假 ...
随机推荐
- Spring MVC能响应HTTP请求的原因?
很多Java面试官喜欢问这个问题: 一个Spring MVC的项目文件里,开发人员没有开发自己的Servlet,只通过注解@RequestMapping定义了方法home能响应发向 /mvc/test ...
- mvc工作总结
MVC的页面跳转方式(放在一般类): filterContext.Result = new RedirectResult("controller/action"); filterC ...
- Dockerfile优化建议
1. 减少镜像层 一次RUN指令形成新的一层,尽量Shell命令都写在一行,减少镜像层. 2. 优化镜像大小:清理无用数据 一次RUN形成新的一层,如果没有在同一层删除,无论文件是否最后删除,都会带到 ...
- python常用模块之json和pickle模块
json模块 json.dumps 将 Python 对象编码成 JSON 字符串 json.loads 用于解码 JSON 数据.该函数返回 Python 字段的数据类型. pi ...
- websocket 入门
什么是websocket WebSocket是HTML5新增的协议,它的目的是在浏览器和服务器之间建立一个不受限的双向通信的通道,比如说,服务器可以在任意时刻发送消息给浏览器. 为什么会出现 webs ...
- 解决VS2013无法安装ArcObjects10.2的问题
之前在网上看到的10.1在vs2012安装不上的问题,解决办法是改注册表HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\1 ...
- linux or msys2设置网络代理
在文件 .bashrc 中添加 export http_proxy="proxy IP:port" 如 export http_proxy="192.168.0.1:80 ...
- jquery动态实现填充下拉框
当点下拉框时动态加载后台数据. 后台代码 protected void doPost(HttpServletRequest request, HttpServletResponse response) ...
- base64类
public class Base64{ /** * how we separate lines, e.g. \n, \r\n, \r etc. */ private String lineSepar ...
- 将Xcode的本地代码push到github仓库上
1.首先,你得有一个github账号,如果没有的话就去注册一个,通过下面图片的方式创建一个github仓库. 2.创建仓库后填写相关的信息,比如说仓库名等. 3.在xcode上进行设置,添加远程git ...