联合权值(codevs 3728)
Description
无向连通图 G 有 n 个点,n−1 条边。点从 1 到 n 依次编号,编号为 i 的点的权值为 Wi,每条边的长度均为 1。图上两点 (u,v) 的距离定义为 u 点到 v 点的最短距离。对于图 G 上的点对 (u,v),若它们的距离为 2,则它们之间会产生Wv×Wu 的联合权值。
请问图 G 上所有可产生联合权值的有序点对中,联合权值最大的是多少?所有联合权值之和是多少?
Input Format
第一行包含 1 个整数 n。
接下来 n−1 行,每行包含 2 个用空格隔开的正整数 u,v,表示编号为 u 和编号为 v 的点之间有边相连。
最后 1 行,包含 n 个正整数,每两个正整数之间用一个空格隔开,其中第 i 个整数表示图 G 上编号为 i 的点的权值为 Wi。
Output Format
输出共 1 行,包含 2 个整数,之间用一个空格隔开,依次为图 G 上联合权值的最大值和所有联合权值之和。由于所有联合权值之和可能很大,输出它时要对10007取余。
Sample Input
5
1 2
2 3
3 4
4 5
1 5 2 3 10
Sample Output
20 74
Hint
aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUEAAAEfCAIAAABQ6OPhAAAgAElEQVR4nO3deXRcV50v+iN5TGLHcUKcAMklTQhheIQhsOgwdC4E0p0mt7N6SICVMPP6chne6w48ukO/Bh7NvSyS22FKyOhZtuahNFuyZpVqUlWdYQ+/vc+pSZJleZBkS9YsVb0/jl3Iki1LsqSqkn6fBYlSquG3verrfc4+e++jJBBCmUxJdQEIoeuCGUYos2GGEcpsmGGEMhtmGKHMlpEZHhwc/MEPfvDFL35xamoq1bUglGIZmeH+/v5bb71VUZQLFy6kuhaEUizzMpybm/v2t79dURTMMEKJ68nw9PR0MBh0Op25ubklJSWVlZW1tbVVVVWlpaUFBQXNzc2dnZ1DQ0MrWOsnPvEJ5XKYYYSWk+HR0dHOzs5Dhw7V19cTQqSUnHOYhXPOGGtsbMzLyzt27Nj58+dXpNZPfvKT995777333vvOd74zOzsbM4xQYhkZdrvd+fn5Ho+HMRYKhQzDIITA5UzT5JwTQoQQXq83Ly+vubl5BYseGhq6+e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72Kb3Enr2LFj1dXVy/jo73//+w8//PD+/ftnPyiltDOsadrKtBCtEMxw+hofH6+urm5ubrYnb1FKhRCqqtoXiu0A2z8Eg0H77NcwDCFEIBAoLS01DGOlLgj39/e/613vsjO8jJtFoVWFGU5rk5OTXq/X4XB0dHTYMQYAe8LWbBcvGnOu63p9fX1xcfGKbGR54cKF+++//8Ybb7TTu2PHjtOnT1//26KVhRnODJWVlbm5ue3t7YQQVVUJIckrwHaAVVUtLS0tKChYwTGn4eHhT3/60/fcc8/u3bvtGN98883LuLUiWlWY4Yxx9uzZvr6+ioqKo0ePHjlyxL6DaX5+/uHDh/ft2+f3+0+fPr0i9yKebXJycmJiIhKJPP/883aMn3/++ZX9CHSdMMOZKh6PT01NrcY7j42NXfGGTN/4xjcURXn88cdX40PRsmGG0WXOnj1r97ft7e1zfmVfIv7ABz6QksLQ1WCG0WXGxsbsDL/44otzfvXss88qivLkk0+mpDB0NZhhNNdHP/pRRVEeeuih5OB2PB53OBx2tn/3u9+ltjw0B2YYzeV0Ojdt2qQoys6dO9/3vvd98YtfvO222zZv3ozzpdMTZhhdwb59+/bs2TNn3dI3v/lNvGlTGsIMoyuLx+OU0pdffvn5559/7bXXzp8/n+qK0JVhhhHKbJhhhDIbZhihzIYZRiizYYYRymz/PzyqrSROHnP7AAAAAElFTkSuQmCC" alt="" />
距离为 2 的有序点对有(1,3),(2,4),(3,1),(3,5),(4,2),(5,3)。其联合权值分别为 2,15,2,20,15,20。其中最大的是 20,总和为 74。
对于30%的数据,1<n≤100;
对于60%的数据,1<n≤2000;
对于100%的数据,1<n≤200000,0<Wi≤10000。
保证一定存在可产生联合权值的有序点对。
/*
刚开始用的三重循环,华丽丽的TLE了,70分 (⊙o⊙) !!!
正解:枚举每个点,这个点所连接的任意两点的距离为2,把它们都放到一个数组里,取最大的两个数相乘即为当前最优解,对于所有点取大;至于权值和,补充一个数学知识:
(a+b+c)^2=a*a+b*b+c*c+2ab+2ac+2bc, 2ab+2ac+2bc即为当前和,对于所有点取和。
*/
#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
#include<cstring>
#define M 200010
using namespace std;
vector<int> grap[M];
int n,a[M],q[M];
int cmp(const int x,const int y)
{
return a[x]>a[y];
}
int main()
{
scanf("%d",&n);
for(int i=;i<n;i++)
{
int x,y;
scanf("%d%d",&x,&y);
grap[x].push_back(y);
grap[y].push_back(x);
}
for(int i=;i<=n;i++)
scanf("%d",&a[i]);
int sum=,maxn=;
for(int i=;i<=n;i++)
{
int cnt=,x=,y=;
if(grap[i].size()>)
{
for(int j=;j<grap[i].size();j++)
{
q[++cnt]=grap[i][j];
x+=a[grap[i][j]];x%=;
y+=a[grap[i][j]]*a[grap[i][j]];y%=;
}
sort(q+,q+cnt+,cmp);
maxn=max(maxn,a[q[]]*a[q[]]);
sum+=x*x-y;
sum=(sum+)%;
}
}
printf("%d %d",maxn,sum);
return ;
}
联合权值(codevs 3728)的更多相关文章
- Codevs 3728 联合权值
问题描述 无向连通图G有n个点,n-1条边.点从1到n依次编号,编号为i的点的权值为Wi ,每 条边的长度均为1.图上两点(u,v)的距离定义为u点到v点的最短距离.对于图G上的点 对(u,v),若它 ...
- 「NOIP2014」「Codevs3728」 联合权值(乱搞
3728 联合权值 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题目描述 Description 输入描述 Input Description 输出描述 Ou ...
- codevs3728联合权值(LCA)
3728 联合权值 时间限制: 1 s 空间限制: 128000 KB 题目等级 : 黄金 Gold 题解 查看运行结果 题目描述 Description 输入描述 Input Des ...
- NOIP2014联合权值
无向连通图G有n个点,n-1条边.点从1到n依次编号,编号为i的点的权值为Wi ,每条边的长度均为1.图上两点(u, v)的距离定义为u点到v点的最短距离.对于图G上的点对(u, v),若它们的距离 ...
- P1906联合权值
描述 无向连通图 G 有 n 个点,n-1 条边.点从 1 到 n 依次编号,编号为 i 的点的权值为 WiWi, 每条边的长度均为 1.图上两点(u, v)的距离定义为 u 点到 v 点的最短距离. ...
- [NOIP2014] 提高组 洛谷P1351 联合权值
题目描述 无向连通图G 有n 个点,n - 1 条边.点从1 到n 依次编号,编号为 i 的点的权值为W i ,每条边的长度均为1 .图上两点( u , v ) 的距离定义为u 点到v 点的最短距离. ...
- NOIp 2014 #2 联合权值 Label:图论 !!!未AC
题目描述 无向连通图G 有n 个点,n - 1 条边.点从1 到n 依次编号,编号为 i 的点的权值为W i ,每条边的长度均为1 .图上两点( u , v ) 的距离定义为u 点到v 点的最短距离. ...
- 【洛谷P1351】联合权值
我们枚举中间点,当连的点数不小于2时进行处理 最大值好搞 求和:设中间点 i 所连所有点权之和为sum 则对于每个中间点i的联合权值之和为: w[j]*(sum-w[j])之和 #include< ...
- Noip2014 提高组 T2 联合权值 连通图+技巧
联合权值 描述 无向连通图 G 有 n 个点,n-1 条边.点从 1 到 n 依次编号,编号为 i 的点的权值为 WiWi, 每条边的长度均为 1.图上两点(u, v)的距离定义为 u 点到 v 点的 ...
随机推荐
- npm install -g cnpm --registry=https://registry.npm.taobao.org
npm install -g cnpm --registry=https://registry.npm.taobao.org
- iOS打包上传app store各种问题解决总结
问题1 this action could not be completed. try again 问题2 there was an error sending data to the iTunes ...
- 在Solr中配置中文分词IKAnalyzer
李克华 云计算高级群: 292870151 交流:Hadoop.NoSQL.分布式.lucene.solr.nutch 在Solr中配置中文分词IKAnalyzer 1.在配置文件schema.xml ...
- layui模块规范
刚入公司不久,就开始做项目了,最后还是选择用layui来做前端的页面,一来是可以自适应,二来是用框架比较方便,简洁. 先看下Layui的介绍: layui 是一款采用自身模块规范编写的情怀级前端UI框 ...
- 高精度A+B
#include<stdio.h> #include<string.h> int main() { int lenth1,lenth2,n,i,j,k,s; scanf(&qu ...
- Base64编码密钥时关于换行的几个问题。
在windows下一个javaweb应用,需要用http传递公钥pk.一般是String pk = BASE64ENCODER.encode(pkBytes);base64编码时,每76个字母就要换行 ...
- Windows10+anaconda,python3.5, 安装glove-python
Windows10+anaconda,python3.5, 安装glove-python安装glove安装之前 Visual C++ 2015 Build Tools开始安装安装glove最近因为一个 ...
- django(django框架了解,http协议)
Django框架 学习目的: 完成web应用的编写 django的作用: 0.业务逻辑分发(路由分发) 1.业务逻辑实现: 业务逻辑根据分发来完成具体的事,再根据具体事的需求,和页面或数据库交互,返回 ...
- subprocess模块windows系统命令和linux系统命令
windows系统 查看所有进程 tasklist 查找指定进程 tasklist | findstr pycharm 程序名称 PID(大写) 数量 大小 python exe 2640 conso ...
- LeetCode(150) Evaluate Reverse Polish Notation
题目 Evaluate the value of an arithmetic expression in Reverse Polish Notation. Valid operators are +, ...