“Miku is matchless in the world!” As everyone knows, Nakano Miku is interested in Japanese generals, so Fuutaro always plays a kind of card game about generals with her. In this game, the players pick up cards with generals, but some generals have co…
传送门:https://nanti.jisuanke.com/t/39271 题意: 给你n个人,每个人有一个权值 a_i ​,(a_i​是可以被100整除的))现在需要你将n个人分成两组,有m个关系,a和b有关系代表a和b不能放在同一个组内,为了两组实力尽量平均,要你求两组权值差值最小时最大的值是哪一个 题解: 二分图染色+dp 首先我们知道n个人必须全选分为两组,其次题目保证有解 因此我们很容易想到如果a->b,b->c,那么a一定和c要分在同一组内 这样我们就得到了很多个联通块 错误想法…
Miku is matchless in the world!” As everyone knows, Nakano Miku is interested in Japanese generals, so Fuutaro always plays a kind of card game about generals with her. In this game, the players pick up cards with generals, but some generals have con…
Miku and Generals Describe "Miku is matchless in the world!" As everyone knows, Nakano Miku is interested in Japanese generals, so Fuutaro always plays a kind of card game about generals with her. In this game, the players pick up cards with gen…
比赛链接: http://202.197.224.59/OnlineJudge2/index.php/Contest/problems/contest_id/36 题目来源: 2014嘉杰信息杯ACM/ICPC湖南程序设计邀请赛暨第六届湘潭市程序设计竞赛 ×  Problem A A simple problem   (求N % 1 + N % 2 + ....+ N % N, 待补) ?  Problem B Path √  Problem C Range   (单调栈) √  Problem…
[多校联考2019(Round 5)]蓝精灵的请求(二分图染色+背包) 题面 在山的那边海的那边住着 n 个蓝精灵,这 n 个蓝精灵之间有 m 对好友关系,现在蓝精灵们想要玩一个团队竞技游戏,需要分为两组进行,且每一组中任意两个蓝精灵都是好友.另外,他们还想要最小化每组蓝精灵内部的好友关系数之和.蓝精灵们怎么都想不到如何分组来进行游戏,所以找到你来帮助他们分组.(若第一组内部的好友关系数为 cnt1,第二组内部的好友关系数为 cnt2,则"每组蓝精灵内部的好友关系数之和"为 cnt1+…
早上8:00的高铁,所以不得不6点前起床,向火车站赶……到达西安后已经是中午,西工大距离西安北站大概3小时车程的距离,只好先解决午饭再赶路了……下午3.30的热身赛,一行人在3.35左右赶到了赛场,坐下后立即开始读题,A题快速幂很快就通过了,B题是一道非常恶心的大模拟,本蒟蒻手敲近两小时wa的生活不能自理,终于在终场前发现一个小bug但是没有提交蛮遗憾(自信AC,捂脸逃~).晚上,回到酒店后,很早就睡觉了,并不像第一次参加区域赛那样紧张的很晚才入睡. 第二天的正式赛开始后,我和队友分别从前中后三…
Problem Description The famous "Alice and Bob" are playing a game again. So now comes the new problem which need a person smart as you to decide the winner. The problem is as follows: They are playing on a rectangle paper, Alice and Bob take tur…
//n件物品,m种关系,(有关系的2个不能在同一组) //把所有物品分为2组,希望最后2组的差值尽可能小,输出较大者 /* 二分图涂色+可行性(01)背包 dp[i] =1表示 最后差值为i可行 建图后,对于每个连通分量记录差值,来求所有的可行 */ #include<bits/stdc++.h> using namespace std; int t,n,m; #define N 250 #define M 102000 int a[N],head[N],sum; int cnt,vis[N]…
Problem Description There are n planets ∼n. Each planet is connected to other planets through some transmission channels. There are m transmission channels in the galaxy. Each transmission channel connects two different planets, and each transmission…