
ACM学习
夏日蹲坑
这个作者很懒,什么都没留下…
展开
-
STL常见数据结构、并查集
STL: 这个学C++已经很熟悉了,第一节课学到了一些新的使用和需要注意到的地方。 map 比较值得注意的是map了解到可以多个“关键词”组合,形式如下: map<string, map<string, int> > mp //注意到结尾> >,需要空格。 就可以写成: ...原创 2018-07-24 19:14:38 · 1912 阅读 · 0 评论 -
网络流24题2——太空飞行计划问题(最大权闭合图)
网络流24题的第二题,主要是一些学习的总结努力做到比大佬们的博客都要简单易懂~!适合初学网络流的同学问题描述:太空飞行通过进行实验获取利润。现已确定了实验集合 E={E_1 ,E_2 …E_m },和进行这些实验需要使用的全部实验仪器的集合 I={I_1 ,I_2 …I_n }。实验 E_j 需要用到的仪器是 I 的子集 R_j ⊆I。配置仪器 I_k 的费用为 c_k 美元。实验 E_...原创 2019-08-13 16:37:39 · 192 阅读 · 0 评论 -
模板拾遗ACM
目录1. 回文自动机(是的,就这一个,之后补充)2. 四舍五入函数一个蒟蒻图论选手什么模板都只看皮毛就好1. 回文树 / 回文自动机(回文串数量问题就用它)const int MAXN = 100005 ; const int N = 26 ; struct Palindromic_Tree { int next[MAXN][N] ;//next指针...转载 2019-07-25 00:55:59 · 106 阅读 · 0 评论 -
CF #542 Div2 C(BFS)
C. Connecthttp://codeforces.com/contest/1130/problem/CAlice lives on a flat planet that can be modeled as a square grid of size n×nn×n, with rows and columns enumerated from 11 to nn. We represent...原创 2019-02-26 17:59:42 · 291 阅读 · 0 评论 -
UVA 11624 Fire!(BFS)
UVA 11624https://vjudge.net/contest/281425#problem/JJoe works in a maze. Unfortunately, portions of the maze have caught on fire, and the owner of the maze neglected to create a fire escape plan. ...原创 2019-02-26 17:45:23 · 128 阅读 · 0 评论 -
FZU-Problem 2150 Fire Game(枚举+BFS)
FZU-Problem 2150http://acm.fzu.edu.cn/problem.php?pid=2150Fat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid of this ...原创 2019-02-26 16:41:31 · 160 阅读 · 0 评论 -
hdu 6351 Beautiful Now(BFS+暴力)
hdu 6351 Beautiful Nowhttp://acm.hdu.edu.cn/showproblem.php?pid=6351Anton has a positive integernn, however, it quite looks like a mess, so he wants to make it beautiful afterkkswaps of digits....原创 2019-03-01 18:59:36 · 250 阅读 · 0 评论 -
CodeForces - 616C The Labyrinth(BFS+预处理)
CodeForces - 616Chttp://codeforces.com/problemset/problem/616/CYou are given a rectangular field ofn × mcells. Each cell is either empty or impassable (contains an obstacle). Empty cells are mar...原创 2019-03-01 11:51:31 · 315 阅读 · 0 评论 -
POJ 3087 Shuffle'm Up(模拟+读题)
POJ 3087http://poj.org/problem?id=3087A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips, S1...原创 2019-02-27 17:08:18 · 253 阅读 · 0 评论 -
线段树初步
第一次了解线段树,虽然学长的讲解一下还是有点懵,后来在网上发现大家初次接触线段树都有类似的感觉。看来离了解各种算法和学好ACM还是有不小差距,继续加油!一、什么是线段树线段树叫“区间”更容易理解,线段树区间的起点终点通常都是整数。这么看来:线段树其实就是一个简单的二叉树!特别在于,线段树的根是总线段的长度(区间),然后二分法把这棵树切成一次一次均匀地划分开,当然区间也越来越小……最后,...原创 2018-07-24 19:17:36 · 192 阅读 · 0 评论 -
网络流24题1——飞行员配对方案问题
网络流24题的第一题,主要是一些学习的总结努力做到比大佬们的博客都要简单易懂~!适合初学网络流的同学问题描述:每一架飞机都需要配备在航行技能和语言上能互相配合的 2 名飞行员,其中 1 名是英国飞行员,另 1 名是外籍飞行员。对于给定的外籍飞行员与英国飞行员的配合情况,编程找出一个最佳飞行员配对方案,使皇家空军一次能派出最多的飞机。数据输入:第 1 行有 2 个正整数 m和 n。n 是...原创 2019-08-12 21:53:26 · 502 阅读 · 0 评论