题解
杂货店的阿猿
想进大厂的正在努力的渣本程序员
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Welcome Party(并查集+优先队列+邻接表)
Welcome Party The 44th World Finals of the International Collegiate Programming Contest (ICPC 2020) will be held in Moscow, Russia. To celebrate this annual event for the best competitive programmers around the world, it is decided to host a welcome party原创 2020-10-07 16:32:49 · 331 阅读 · 0 评论 -
Team Formation(异或+位移+并)
Team Formation For an upcoming programming contest, Edward, the headmaster of Marjar University, is forming a two-man team from N students of his university. Edward knows the skill level of each student. He has found that if two students with skill level A原创 2020-10-07 16:18:11 · 297 阅读 · 0 评论 -
Forest Program(dfs+并查集+快速幂)
Forest Program The kingdom of Z is fighting against desertification these years since there are plenty of deserts in its wide and huge territory. The deserts are too arid to have rainfall or human habitation, and the only creatures that can live inside the原创 2020-10-06 19:21:39 · 332 阅读 · 0 评论 -
洛谷 P1629 邮递员送信
有一个邮递员要送东西,邮局在节点1。他总共要送n一1样东西,其目的地分别是节点2到节点n。由于这个城市的交通比较繁忙,因此所有的道路都是单行的,共有m条道路。这个邮递员每次只能带一样东西,并且运送每件物品过后必须返回邮局。求送完这n一1样东西并且最终回到邮局最少需要的时间。 输入格式 第一行包括两个整数,n和m,表示城市的节点数量和道路数量。 第二行到第(m+1)行,每行三个整数,,v, u,表示从u到v有一条通过时间为u的道路。 输出格式 输出仅一行,包含一个整数,为最少需要的时间。 输入输出样例 输入原创 2020-09-23 20:42:11 · 220 阅读 · 0 评论 -
最短路
给定一个 nn 点 mm 边的有向带权图表示一座城市,起点为 11 。送餐小哥需要给 nn 个客户送外卖,第 ii 个客户的家在第 ii 号点。由于他的车子容量很小,所以一次只能容纳一份外卖,所以送达外卖之后就要回到起点取新的外卖送下一单,直到全部送到位置。 有向图保证联通。外卖小哥一定走的最短路。 求送餐小哥走的总路程。 输入格式 第一行一个整数 TT,表示数据组数。 对于每组数据,第一行两个整数 nn 和 mm 。 接下来 mm 行,每行三个整数 u_i,v_i,c_iu 表示每条有向边。 输出格式 对原创 2020-09-23 16:53:29 · 241 阅读 · 0 评论 -
P1042 乒乓球
题目背景 国际乒联现在主席沙拉拉自从上任以来就立志于推行一系列改革,以推动乒乓球运动在全球的普及。其中1111分制改革引起了很大的争议,有一部分球员因为无法适应新规则只能选择退役。华华就是其中一位,他退役之后走上了乒乓球研究工作,意图弄明白1111分制和2121分制对选手的不同影响。在开展他的研究之前,他首先需要对他多年比赛的统计数据进行一些分析,所以需要你的帮忙。 题目描述 华华通过以下方式进行分析,首先将比赛每个球的胜负列成一张表,然后分别计算在1111分制和2121分制下,双方的比赛结果(截至记录末原创 2020-09-22 10:10:20 · 314 阅读 · 0 评论
分享