Hiding Gold Time Limit: 2000MS   Memory Limit: 32768KB   64bit IO Format: %lld & %llu Submit Status Description You are given a 2D board where in some cells there are gold. You want to fill the board with 2 x 1 dominoes such that all gold are covered…
题目大意: 统计相邻(上下左右)的‘#’的对数. 解法: 与题目hdu1507 Uncle Tom's Inherited Land*类似,需要用奇偶建图.就是行+列为奇数的作为X集合,偶尔作为Y集合,都是‘#’就连边.最后求最大匹配. 数据有点大,直接建图会出错(我试过).可以按照‘#’出现的顺序给顶点编号. #include<iostream> #include<cstdio> #include<cstring> #include<queue> #inc…
Battle ships Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1061    Accepted Submission(s): 377 Problem Description Dear contestant, now you are an excellent navy commander, who is responsible…
Battle ships Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1007    Accepted Submission(s): 353 Problem Description Dear contestant, now you are an excellent navy commander, who is responsible…
Problem D: Candy As a teacher of a kindergarten, you have many things to do during a day, one of which is to allot candies to all children in your class. Today you have N candies for the coming M children. Each child likes different candy, and as a t…
题意很简单:JOHN是一个农场主养了一些奶牛,神奇的是这些个奶牛有不同的品味,只喜欢吃某些食物,喝某些饮料,傻傻的John做了很多食物和饮料,但她不知道可以最多喂饱多少牛,(喂饱当然是有吃有喝才会饱) 输入数据有N,F,D,表示牛的个数,食物的数量,饮料的数量 接着输出N行表示N个牛的数据 每个牛的数据前2个是Fi和Di表示第i个牛喜欢吃的食物种数和饮料种数,接着输出Fi个食物的编号和Di个食物的编号 ok题意就是这样,这题主要考的是建图 需要把牛拆点,一分为二 图应该是 这种形式      源…
Going Home Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 21010   Accepted: 10614 Description On a grid map there are n little men and n houses. In each unit time, every little man can move one unit step, either horizontally, or vertica…
题目: You are given a 2D board where in some cells there are gold. You want to fill the board with 2 x 1 dominoes such that all gold are covered. You may use the dominoes vertically or horizontally and the dominoes may overlap. All you have to do is to…
[SCOI2007]修车 https://www.lydsy.com/JudgeOnline/problem.php?id=1070 Time Limit: 1 Sec  Memory Limit: 128 MBSubmit: 7306  Solved: 3108[Submit][Status][Discuss] Description 同一时刻有N位车主带着他们的爱车来到了汽车维修中心.维修中心共有M位技术人员,不同的技术人员对不同的车进行维修所用的时间是不同的.现在需要安排这M位技术人员所维…
题意: 给你一个N个点M条边的带权有向图,现在要你求这样一个值:该有向图中的所有顶点正好被1个或多个不相交的有向环覆盖.这个值就是 所有这些有向环的权值和. 要求该值越小越好. SOL: 本来还想tarjan什么的,就是不能往二分图上靠...然后看了二分图的建图觉得非常神奇.我们可以把一个点O拆成两个点O和O‘,发现一个点i如果能到点j,那么我们就将i与j’建一条边,然后构成整张图后S与S‘分别为两个集合来跑KM.正确性现在还有点晕,先挖个坑 领悟到建图的重要性,做得题太少还是太年轻. #inc…