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%的重复率和只答不辨的态度双双过关.现在就是在家等着学校发毕业证了.顺带学学驾驶...可是我这么一个喜欢折腾的人,怎么能够让自己接受这么无聊的咸鱼时光呢?因为这个寒假 ...
随机推荐
- Grid Infrastructure 启动的五大问题 (文档 ID 1526147.1)
适用于: Oracle Database - Enterprise Edition - 版本 11.2.0.1 和更高版本本文档所含信息适用于所有平台 用途 本文档的目的是总结可能阻止 Grid In ...
- C++类构造函数、析构函数运行机理
http://blog.sina.com.cn/s/blog_6fd68d5f0100n60h.html 前言--构造函数.析构函数的简单理解:1)构造函数---对象被创建时候调用的函数:2)析构函数 ...
- shrio 权限管理filterChainDefinitions过滤器配置
/** * Shiro-1.2.2内置的FilterChain * @see ============================================================= ...
- 在Terminal中,如何打开Finder,并显示当前的目录
这是一个非常方便实用的小技巧,在Terminal中输入如下命令: $ open . 有图有真相: 参考: Open Finder in Current Folder from Terminal
- WebStorm换主题(护眼)
一.下载喜欢颜色的主题 http://www.phpstorm-themes.com/ 我用的豆沙绿护眼 <scheme name="Solarized Light My" ...
- javaEE(12)_数据库连接池
一.直接获取数据库连接和通过池获取示意图: 二.编写数据库连接池 1.实现DataSource接口,并实现连接池功能的步骤: •在DataSource构造函数中批量创建与数据库的连接,并把创建的连接加 ...
- pip install mysqlclient 报错:error: Microsoft Visual C++ 14.0 is required.
解决办法: 1. 在网址:https://www.lfd.uci.edu/~gohlke/pythonlibs/ 下载对应的whl文件,如我的环境是python3.7.2 windows32位版本 ...
- GIMP语言设置
初学GIMP,需要设置语言:点击 编辑 - 首选项 其他的配置如: 配置快捷键 自己熟悉吧!
- python--触发器, 储存过程, 事务
一. 触发器 使用触发器可以定制用户对某一张表的数据进行 [增, 删 ,改] 操作时前后的行为, (注意 没有查询),在进行增删改的时候出发的某个动作叫做 触发器. 其实就是在增删改的时候另外执行了 ...
- LeetCode(96) Unique Binary Search Trees
题目 Given n, how many structurally unique BST's (binary search trees) that store values 1-n? For exam ...