E-COM-NET
首页
在线工具
Layui镜像站
SUI文档
联系我们
推荐频道
Java
PHP
C++
C
C#
Python
Ruby
go语言
Scala
Servlet
Vue
MySQL
NoSQL
Redis
CSS
Oracle
SQL Server
DB2
HBase
Http
HTML5
Spring
Ajax
Jquery
JavaScript
Json
XML
NodeJs
mybatis
Hibernate
算法
设计模式
shell
数据结构
大数据
JS
消息中间件
正则表达式
Tomcat
SQL
Nginx
Shiro
Maven
Linux
1076
nyoj
1076
-方案数量 【排列组合 dp】
pid=
1076
方案数量时间限制:1000ms|内存限制:65535KB难度:2描述给出一个N*M的棋盘,左下角坐标是(0,0),右上角坐标是(N,M),规定每次只能向上或者向右走,问从左下角走到右上角
weixin_30436891
·
2020-08-24 10:52
Vasya and a Tree CodeForces -
1076
E
http://codeforces.com/contest/
1076
/problem/E这场竟然是acm赛制本以为先做e能多捞几分结果罚时爆炸还差点翻车。。
sunyutian1998
·
2020-08-24 10:15
树链剖分
主席树
Edge Deletion CodeForces -
1076
D
http://codeforces.com/contest/
1076
/problem/D求单源最短路时保存一下路径最后就是一棵树然后bfs一遍即可#includeusingnamespacestd;#definepbpush_backtypedeflonglongll
sunyutian1998
·
2020-08-24 10:15
最短路
Codeforces -
1076
D - Edge Deletion (最短路+思维)
题目链接:https://codeforces.com/problemset/problem/
1076
/D题意:给你一个n个点,m条边的DAG图,边为双向边,没有重边。
sugarbliss
·
2020-08-24 10:11
【最短路】
【Codeforces
1076
D】Edge Deletion | 最短路树
题目大意:给定n,m,k:n个点,m条边,要进行删边操作,最后可以保留最多k条边定义一个点i是好的当且仅当在删除一些边之后,1->i的最短路等于未删边之前的最短路输出最多可以有多少个好的点,输出保留边的个数与保留边的编号题目思路:刚开始看到删边,联想到最短路径还原。考虑求最短路的过程,可以知道求最短路的过程中一定会存在没有用的一些边即对最短路根本没有影响的边。如果对于一条边来说满足:dis[s]+
一只酷酷光儿( CoolGuang)
·
2020-08-24 09:59
最短路
codeforces
1076
D Edge Deletion
题目:传送门题意:给出n个点,m条边,要求图中最多有k条边的前提下,生成尽可能多的good点。good点:删除一些边和没删除前从1到good点的最短路径是一样的。思路:先求出各个点的最短路径,记录下每个点的前驱,然后走一遍bfs,将符合条件的边的序号加入vector中。代码如下:#include#include#include#include#include#includeusingnamespa
这样啊我也喜欢
·
2020-08-24 09:17
codeforces
CodeForces -
1076
D Edge Deletion 最短路标记边
Youaregivenanundirectedconnectedweightedgraphconsistingofnnverticesandmmedges.Let'sdenotethelengthoftheshortestpathfromvertex11tovertexiiasdidi.Youhavetoerasesomeedgesofthegraphsothatatmostkkedgesrema
mmk27
·
2020-08-24 09:49
最短路
Codeforces
1076
E——回溯
题意:给出一棵以1为根的有根树,边权全部为1,点权初始全部为0,给出m个查询,每个查询给出三个变量vdx,表示将v节点的子节点(包括自己)中与v之间的距离usingnamespacestd;constintmaxn=3e5+10;typedeflonglongll;typedefpairP;intn,m;inttot,head[maxn];structEdge{intto,next;}edges[
hao_zong_yin
·
2020-08-24 08:22
数据结构
Codeforces
1076
D Edge Deletion——最短路+dfs
题意:n个点m条边的无向连通图(无自环、重边),现在要删除一些边使得图最多剩下k条边,并且这样的点尽量多:这个点到1号节点的最短路不变思路:建出最短路树,统计边数,然后跑一遍dfs,在回溯的时候判断边数与k的关系,若边数>k就使边数减一,否则记录答案#includeusingnamespacestd;constintmaxn=3e5+10;typedeflonglongll;constllINF=
hao_zong_yin
·
2020-08-24 08:22
图论
Codeforces
1076
D——最短路算法
题目给你一个有n个顶点、m条边的无向带权图。需要擦除一些边使得剩余的边数不超过k,如果一个点在原始图到顶点1的最短距离为d,在删边后的图中到顶点的最短距离仍是d,则称这种点是good。问如何删边,使得good点最多。分析首先调用最短路算法求各点到顶点1的最短距离,同时记录下每点在最短路上的前一个顶点。然后从顶点1出发搜索一个大小为k的联通块即可(如果够k个)代码1#include2#include
dianshu1593
·
2020-08-24 08:20
codeforces
1076
E Vasya and a Tree 树上主席树
E.VasyaandaTree题意:给你一棵1为根节点的树,初始每个节点权值为0,有m次操作,每次操作vdx,表示将以v为根的子树,深度不超过d的所有节点加上x。思路:从深度为1的根节点开始遍历,到了深度为dep的v节点,若是该节点有操作dx,那么以该节点为根的主席树就要在dep+d的点加上一个权值x,然后怎么计算该点的答案呢,该点的答案就是该点的主席树区间[dep,n]和。#include#in
一只叫橘子的猫
·
2020-08-24 08:55
数据结构----线段树
codeforces题解
Edge Deletion CodeForces -
1076
D(水最短路)
题意:设从1到每个点的最短距离为d,求删除几条边后仍然使1到每个点的距离为d,使得剩下的边最多为k解析:先求来一遍spfa,然后bfs遍历每条路,如果d[v]==d[u]+Node[i].w则说明这条路要保留注意是按着走的路的顺序输出的wa1注意最大值设为0x3fwa3学到了。。。emm用memset设置数组为0x3f是无穷大#include#include#include#include#inc
babing2770
·
2020-08-24 07:55
Codeforces ~
1076
D ~ Edge Deletion (最短路,堆优化理解)
题意给你一个n个点,m条边的DAG图,边为双向边,没有重边。现在最多保留k条边,怎么使得好点个数最多。好点定义为:在原图中1到该点距离和只保留某一些边后的图中1到该点距离不变的点。先输出保留边的个数,然后输出这些保留的边的编号(1~m)。思路堆优化dijkstra中,更新前k个点用到的边就是答案。数据比较大,注意开longlong#includeusingnamespacestd;constint
张松超
·
2020-08-24 07:07
【最短路/差分约束】
Codeforces
1076
E E. Vasya and a Tree
这是一个静态问题按DFS走,进入一个子树时把子树根上挂的修改激活,离开子树时撤销这样所有的修改和查询都是对于深度的QvQ:递归三参数栈爆炸了#includeusingnamespacestd;#defineM524288#defineN300005typedeflonglongll;intL,R,aim,n,m,tot,s[N],dep;llt[M>q[N];structedge{intv,n;}
Pure_W
·
2020-08-24 07:00
CodeForces
Codeforces-
1076
E:Vasya and a Tree(树状数组)
E.VasyaandaTreetimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputVasyahasatreeconsistingofnverticeswithrootinvertex1.Atfirstallverticeshas0writtenonit.Letd(i,
Mitsuha_
·
2020-08-24 07:45
数据结构-线段树//树状数组
CodeForces
1076
E、Vasya and a Tree(线段树+离线)
E.VasyaandaTreetimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputVasyahasatreeconsistingofnnverticeswithrootinvertex11.Atfirstallverticeshas00writtenonit.Letd
Amovement
·
2020-08-24 07:55
CodeForces
1076
D、Edge Deletion (最短路+BFS)
D.EdgeDeletiontimelimitpertest2.5secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputYouaregivenanundirectedconnectedweightedgraphconsistingofnnverticesandmmedges.Let'sdenotethe
Amovement
·
2020-08-24 07:54
Codeforces
1076
D Edge Deletion(最短路瞎写)
Codeforces
1076
DEdgeDeletion(最短路瞎写)题意给一个无向简单联通图,删去边,留下最多k条边,问剩下的点里面从1开始的最短路距离不变的点最多怎么构造。
SparkFucker
·
2020-08-24 06:44
2018年算法训练
bzoj
1076
: [SCOI2008]奖励关
bzoj
1076
:[SCOI2008]奖励关看数据范围直接状压DP。
Starria
·
2020-08-24 05:12
状压dp
微积分2:常见的函数类型
转载于:https://www.cnblogs.com/zheng
1076
/p/11494696.html
weixin_30687051
·
2020-08-23 04:47
PAT
1076
Forwards on Weibo(30分)
PAT
1076
ForwardsonWeibo(30分)WeiboisknownastheChineseversionofTwitter.OneuseronWeibomayhavemanyfollowers
稀有的猪
·
2020-08-22 12:56
图
算法
c++
1076
Forwards on Weibo
WeiboisknownastheChineseversionofTwitter.OneuseronWeibomayhavemanyfollowers,andmayfollowmanyotherusersaswell.Henceasocialnetworkisformedwithfollowersrelations.WhenausermakesapostonWeibo,allhis/herfoll
暖i
·
2020-08-22 04:01
pat甲级
PAT
1076
Wifi密码 (15分) C++
下面是微博上流传的一张照片:“各位亲爱的同学们,鉴于大家有时需要使用wifi,又怕耽误亲们的学习,现将wifi密码设置为下列数学题答案:A-1;B-2;C-3;D-4;请同学们自己作答,每两日一换。谢谢合作!!~”——老师们为了促进学生学习也是拼了……本题就要求你写程序把一系列题目的答案按照卷子上给出的对应关系翻译成wifi的密码。这里简单假设每道选择题都有4个选项,有且只有1个正确答案。输入格式
ganlanA
·
2020-08-22 03:55
pat乙级
1076
Wifi密码 C语言实现
下面是微博上流传的一张照片:“各位亲爱的同学们,鉴于大家有时需要使用wifi,又怕耽误亲们的学习,现将wifi密码设置为下列数学题答案:A-1;B-2;C-3;D-4;请同学们自己作答,每两日一换。谢谢合作!!~”——老师们为了促进学生学习也是拼了……本题就要求你写程序把一系列题目的答案按照卷子上给出的对应关系翻译成wifi的密码。这里简单假设每道选择题都有4个选项,有且只有1个正确答案。输入格式
李皮要好好学习鸭
·
2020-08-21 21:36
PAT乙级
1076
Wifi密码(C语言)
1076
Wifi密码(15分)下面是微博上流传的一张照片:“各位亲爱的同学们,鉴于大家有时需要使用wifi,又怕耽误亲们的学习,现将wifi密码设置为下列数学题答案:A-1;B-2;C-3;D-4;请同学们自己作答
谭波波波啵
·
2020-08-21 20:45
PAT乙级(C语言)
PAT
乙级
pat乙级
1076
C语言
1076
Wifi密码(15分)下面是微博上流传的一张照片:“各位亲爱的同学们,鉴于大家有时需要使用wifi,又怕耽误亲们的学习,现将wifi密码设置为下列数学题答案:A-1;B-2;C-3;D-4;请同学们自己作答
XITMan
·
2020-08-21 17:33
pat考试
pat
c语言
1076
Wifi密码——C++实现
题目
1076
Wifi密码(15分)下面是微博上流传的一张照片:“各位亲爱的同学们,鉴于大家有时需要使用wifi,又怕耽误亲们的学习,现将wifi密码设置为下列数学题答案:A-1;B-2;C-3;D-4;
吉大秦少游
·
2020-08-21 07:19
但愿人长久,及时行孝否?
最好的团圆——“但愿人长久,父母笑开怀”公元
1076
年,是苏轼被贬密州的第三个年头。宦海浮沉二十载,他早已看淡了仕途的起伏,倒是与亲人聚少离多,成为他人生中最大的遗憾。
心中的和平宇宙
·
2020-08-20 02:45
hud题目分类
1001、1004、1005、1008、1012、1013、1014、1017、1019、1021、1028、1029、1032、1037、1040、1048、1056、1058、1061、1070、
1076
cc_wood
·
2020-08-19 09:14
算法之高精度
hdu
【机试练习】【C++】【PTA A
1076
Forwards on Weibo】
#include#include#include#includeusingnamespacestd;constintMAXN=1010;//邻接表表示的图vectoradj[MAXN];//这个邻接矩阵正好反着,表明谁的关注列表boolinq[MAXN]={false};intN=0,L=0;intfollow_num;intmaster_idx;intuser_cnt=0;void__bfs(i
岚匀
·
2020-08-19 08:33
机试
C++
[vijosP
1076
]海战
学弟请教的一道题目。。。背景在峰会期间,武装部队得处于高度戒备。警察将监视每一条大街,军队将保卫建筑物,领空将布满了F-2003飞机。此外,巡洋船只和舰队将被派去保护海岸线。不幸的是因为种种原因,国防海军部仅有很少的几位军官能指挥大型海战。因此,他们考虑培养一些新的海军指挥官,他们选择了“海战”游戏来帮助学习。描述在这个著名的游戏中,在一个方形的盘上放置了固定数量和形状的船只,每只船却不能碰到其它
dxyinme
·
2020-08-19 06:52
广搜
CF
1076
D Edge Deletion 最短路树
问题描述Codeforces洛谷(有翻译)题解最短路树,是一棵在最短路过程中构建的树。在\(\mathrm{Dijkstra}\)过程中,如果最终点\(y\)是由点\(x\)转移得到的,则在最短路树上\(x\)是\(y\)的父节点,\(x\)到\(y\)的最短路树上长度等于原图上转移\(x,y\)的边的长度。显然每一条边最多能贡献\(1\)的答案。在最短路树上选取边,能保证每一条边都贡献答案。选取
LIUZHH2088
·
2020-08-18 13:08
CF
1076
C Meme Problem 数学
CF
1076
CMemeProblem数学Tryguessingthestatementfromthispicture:Youaregivenanon-negativeintegerd.Youhavetofindtwonon-negativerealnumbersaandbsuchthata
looooooogn
·
2020-08-17 14:35
Codeforces Round
1076
(Educational Codeforces Round 54 Rated for Div. 2) F. Summer Practice Report
F.SummerPracticeReporttimelimitpertest2secondsmemorylimitpertest256megabytesinputstandardinputoutputstandardoutputVovahastakenhissummerpracticethisyearandnowheshouldwriteareportonhowitwent.Vovahasalre
Detective-Conan
·
2020-08-17 11:16
Codeforces
贪心算法
线性DP
Educational Codeforces Round 54 (Rated for Div. 2) A. Minimizing the String(思维)
题目链接:http://codeforces.com/contest/
1076
/problem/A题意是输入一个字符串,然后要求删除一个字符,输出删除一个字符后的字典序最小的字符串。
Ch_zaqdt
·
2020-08-17 11:29
CodeForces
Leetcode_
1076
_1077项目员工
题目描述编写一个SQL查询,报告所有雇员最多的项目。正确答案selectproject_idfromProjectgroupbyproject_idhavingcount(distinctemployee_id)>=all(selectcount(distinctemployee_id)fromProjectgroupbyproject_id)知识点ALL父查询中的结果集大于子查询中每一个结果集中
Schnappi_z
·
2020-08-16 22:48
LeetCode刷题-数据库(MySQL)-
1076
. Project Employees II
1076
.ProjectEmployeesII一、题目描述Table:ProjectColumnNameTypeproject_idintemployee_idint(project_id,employee_id
Asa_Wong
·
2020-08-16 22:45
MySQL
LeetCode MySQL
1076
. 项目员工II
文章目录1.题目2.解题1.题目Table:Project+-------------+---------+|ColumnName|Type|+-------------+---------+|project_id|int||employee_id|int|+-------------+---------+主键为(project_id,employee_id)。employee_id是员工表Emp
Michael阿明
·
2020-08-16 20:26
LeetCode
LeetCode-
1076
. 项目员工II(简单)
Table:Project+-------------+---------+|ColumnName|Type|+-------------+---------+|project_id|int||employee_id|int|+-------------+---------+主键为(project_id,employee_id)。employee_id是员工表Employee表的外键。Table:
红楼终究一场梦
·
2020-08-16 18:14
语言
数据库
1076
. Project Employees II 难度:简单
1、题目描述WriteanSQLquerythatreportsalltheprojectsthathavethemostemployees.Thequeryresultformatisinthefollowingexample:Projecttable:project_idemployee_id1112132124Employeetable:employee_idnameexperience_y
偲偲粑
·
2020-08-16 18:41
刷题
LeetCode 1075.
1076
Project Employees
droptableProjectdroptableEmployeesCreatetableProject(project_idint,employee_idint);insertintoProjectvalues(1,1);insertintoProjectvalues(1,2);insertintoProjectvalues(1,3);insertintoProjectvalues(2,1);i
chelseajcole
·
2020-08-16 17:08
车载终端794认证,905认证
道路运输车辆卫星定位系统终端通讯协议及数据格式》道路运输车辆卫星定位系统北斗兼容车载终端技术规范道路运输车辆卫星定位系统北斗兼容车载终端通讯协议技术规范JT/T905-2014《出租汽车服务管理信息系统》———第2部分:运营专用设备JT/T
1076
林工13145887645
·
2020-08-15 15:21
交通部认证
JT/T
794-2019
905认证
GB/T
35658-2017
GPS行驶记录仪794
【CodeVS
1076
】排序
Description给出n和n个整数,希望你从小到大给他们排序Input第一行一个正整数n第二行n个用空格隔开的整数Output输出仅一行,从小到大输出n个用空格隔开的整数SampleInput3312SampleOutput123Hint1>1>0)and(f[x>>1]>f[x])do17begin18swap(f[x],f[x>>1]);x:=x>>1;19end;20end;2122fu
weixin_30362801
·
2020-08-14 14:31
codevs
1076
排序
题目描述Description给出n和n个整数,希望你从小到大给他们排序输入描述InputDescription第一行一个正整数n第二行n个用空格隔开的整数输出描述OutputDescription输出仅一行,从小到大输出n个用空格隔开的整数样例输入SampleInput3312样例输出SampleOutput123数据范围及提示DataSize&Hint1#includeusingnamespa
weixin_30348519
·
2020-08-14 14:30
Codevs
1076
题解
Codevs
1076
题解题目描述Description给出n和n个整数,希望你从小到大给他们排序输入描述InputDescription第一行一个正整数n第二行n个用空格隔开的整数输出描述OutputDescription
Paul-M
·
2020-08-14 14:12
Codevs题集
Codevs_P
1076
排序(优先队列)
题目描述Description给出n和n个整数,希望你从小到大给他们排序输入描述InputDescription第一行一个正整数n第二行n个用空格隔开的整数输出描述OutputDescription输出仅一行,从小到大输出n个用空格隔开的整数样例输入SampleInput3312样例输出SampleOutput123数据范围及提示DataSize&Hint1#include#include#inc
BeiYu-oi
·
2020-08-14 13:10
Codevs
队列
CODEVS
1076
排序 (shell)
题目描述Description给出n和n个整数,希望你从小到大给他们排序输入描述InputDescription第一行一个正整数n第二行n个用空格隔开的整数输出描述OutputDescription输出仅一行,从小到大输出n个用空格隔开的整数样例输入SampleInput3312样例输出SampleOutput123数据范围及提示DataSize&Hint1usingnamespacestd;in
jialike2012
·
2020-08-14 13:29
CODEVS天梯
CODEVS
1076
排序(快排)
题目描述Description给出n和n个整数,希望你从小到大给他们排序输入描述InputDescription第一行一个正整数n第二行n个用空格隔开的整数输出描述OutputDescription输出仅一行,从小到大输出n个用空格隔开的整数样例输入SampleInput3312样例输出SampleOutput123数据范围及提示DataSize&Hint1usingnamespacestd;vo
jialike2012
·
2020-08-14 13:29
CODEVS天梯
归并排序——codevs
1076
纪念下AC的归并排序类型题……大佬勿喷,欢迎指出错误。归并排序是最近学会的一类排序方法(感谢“没有梦想__何必远方“),O(nlog2n)的复杂度,虽然和algorithm中的sort复杂度一样,但在做(装)题(逼)中也是经常用到的,比如我将会在本周内发布的另一题解——codevs1688求逆序对中就会有很大用处。这道题目虽然是一道水题,但用来练习归并排序也是一道非常好的题目,因此,下面的讲解并非
ihengrui
·
2020-08-14 13:18
1076
排序
1076
排序时间限制:1s空间限制:128000KB题目等级:白银Silver题目描述Description给出n和n个整数,希望你从小到大给他们排序输入描述InputDescription第一行一个正整数
MZ_OIer
·
2020-08-14 13:37
CODEVS
上一页
2
3
4
5
6
7
8
9
下一页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他