乱写句子
文章平均质量分 58
yjy_aii
等待花开
展开
-
2019.08.15【NOIP提高组】模拟 B 组 排序、计算几何+数论、高精度优化+二分图/网络流
2019.08.15【NOIP提高组】模拟 B 组 排序、计算几何+数论、高精度优化+二分图/网络流 0【NOIP2013模拟联考3】库特的向量(code) 两个n维向量的数量积 1 【NOIP2013模拟联考3】恭介的法则(rule) 2 【NOIP2013模拟联考3】沙耶的玩偶(doll) 开门那一瞬,阳光照在你的身上原创 2019-08-16 16:18:14 · 549 阅读 · 1 评论 -
poj2823 Sliding Window 单调队列
题目 An array of size n ≤ 106 is given to you. There is a sliding window of size k which is moving from the very left of the array to the very right. You can only see the k numbers in the window. Each t...原创 2019-01-05 08:32:07 · 197 阅读 · 0 评论 -
2883 烽火传递 动态规划+单调队列
题目 烽火台又称烽燧,是重要的军事防御设施,一般建在险要或交通要道上。一旦有敌情发生,白天燃烧柴草,通过浓烟表达信息;夜晚燃烧干柴,以火光传递军情,在某两座城市之间有 n 个烽火台,每个烽火台发出信号都有一定代价。为了使情报准确地传递,在连续 m 个烽火台中至少要有一个发出信号。请计算总共最少花费多少代价,才能使敌军来袭之时,情报能在这两座城市之间准确传递。 对于50%的数据,M≤N≤1,000 ...原创 2019-01-05 13:29:27 · 1067 阅读 · 0 评论 -
poj2446 Chessboard 最大匹配
题目 Alice and Bob often play games on chessboard. One day, Alice draws a board with size M * N. She wants Bob to use a lot of cards with size 1 * 2 to cover the board. However, she thinks it too easy t...原创 2018-12-22 10:04:23 · 239 阅读 · 0 评论 -
zoj Place the Robots 最大匹配
题目 Robert is a famous engineer. One day he was given a task by his boss. The background of the task was the following: Given a map consisting of square blocks. There were three kinds of blocks: Wall, ...原创 2018-12-21 22:05:52 · 260 阅读 · 0 评论 -
[USACO1.4]等差数列 Arithmetic Progressions 枚举
题目 An arithmetic progression is a sequence of the form a, a+b, a+2b, …, a+nb where n=0, 1, 2, 3, … . For this problem, a is a non-negative integer and b is a positive integer. Write a program that fin...原创 2018-12-22 17:01:37 · 650 阅读 · 0 评论 -
1344 Knights 最大匹配
题目 We are given a chess-board of size nn, from which some fields have been removed. The task is to determine the maximum number of knights that can be placed on the remaining fields of the board in su...原创 2018-12-15 10:44:55 · 395 阅读 · 0 评论 -
1341 Asteroids(pku 3041) 最大匹配
题目 给出一个矩阵,上面有敌人,每个子弹可以打出一横行或者一竖行,问最少用多少子弹消灭都有敌人,如: X.X .X. .X. x表示敌人,显然用两个子弹就可以解决所有敌人。 题解 这题的建图在于一边为行,一边为列,有敌人的行和列连边,求最小点覆盖=最大匹配 代码 #include <cstdio> #include <cstring> using namespace st...原创 2018-12-14 22:04:52 · 125 阅读 · 0 评论 -
[USACO1.3]虫洞wormhole 搜索+模拟
题目 Farmer John’s hobby of conducting high-energy physics experiments on weekends has backfired, causing N wormholes (2 <= N <= 12, N even) to materialize on his farm, each located at a distinct ...原创 2018-12-22 13:57:37 · 630 阅读 · 0 评论 -
[IOI1999][USACO1.5]数字三角形 Number Triangles 动态规划
题目 Consider the number triangle shown below. Write a program that calculates the highest sum of numbers that can be passed on a route that starts at the top and ends somewhere on the base. Each step c...原创 2018-12-29 22:21:33 · 303 阅读 · 0 评论 -
poj2594 Treasure Exploration 最大匹配
题目 Have you ever read any book about treasure exploration? Have you ever see any film about treasure exploration? Have you ever explored treasure? If you never have such experiences, you would never k...原创 2018-12-19 17:25:55 · 213 阅读 · 0 评论 -
P2055 [ZJOI2009]假期的宿舍 网络流(二分图匹配)
题目 题目描述 学校放假了 · · · · · · 有些同学回家了,而有些同学则有以前的好朋友来探访,那么住宿就是一个问题。 比如 A 和 B 都是学校的学生,A 要回家,而 C 来看B,C 与 A 不认识。我们假设每个人只能睡和自己直接认识的人的床。那么一个解决方案就是 B 睡 A 的床而 C 睡 B 的床。而实际情况可能非常复杂,有的人可能认识好多在校学生,在校学生之间也不一定都互相认识。 我...原创 2019-05-10 22:13:43 · 226 阅读 · 0 评论 -
2019.06.06 【NOIP提高组】模拟 A 组 模拟+指针+bfs
0 求导 求导的意思: 多项式是由若干个单项式构成的 单项式的一般形式是ax^b,其中ab都是常数,x是自变量 对于单项式axb求导,结果就是(ab)x(b-1) 对于多项式求导,就是把构成它的所有单项式分别求导之后相加 特别地,对于ax^0,即对常数a求导,结果是0 1 成绩调研 2 跟踪 ...原创 2019-06-13 18:44:09 · 257 阅读 · 0 评论 -
1340 最小路径覆盖 最大匹配
题目 定义: 一个不含圈的有向图G中,G的一个路径覆盖是一个其结点不相交的路径集合P,图中的每一个结点仅包含于P中的某一条路径。路径可以从任意结点开始和结束,且长度也为任意值,包括0。请你求任意一个不含圈的有向图G的最小路径覆盖数。 提示:最小路径覆盖数=G的定点数-最小路径覆盖中的边数 最小路径覆盖数=原图G的顶点数-二分图的最大匹配数 题解 把原图的每个点拆成两个点,然后从有向边的起点向终点连...原创 2018-12-15 14:39:07 · 177 阅读 · 0 评论