09 2017 档案
摘要:【有向图强连通分量】 在有向图G中,如果两个顶点间至少存在一条路径,称两个顶点强联通(strongly connected),如果有向图G的每两个顶点都强联通,称有向图G是一个强联通图。非强联通图有向图的极大强联通子图(对于“极大”的理解,就是在一个局部子图中不能再大。就像是数学中的求一个函数中的极
阅读全文
摘要:1240 莫比乌斯函数 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 1240 莫比乌斯函数 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 1240 莫比乌斯函数 基准时间限制:1 秒 空间限制:131072 KB 分值:
阅读全文
摘要:#include #define F first #define S second #define pb push_back #define NL cout pii; typedef pair pis; typedef pair pss; typedef vector vi; typedef vector vii; typedef vector vs; typedef vector vi...
阅读全文
摘要:#1579 : Reverse Suffix Array #1579 : Reverse Suffix Array 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 There is a strong data structure called "Suffix Array"
阅读全文
摘要:题目1 : Visiting Peking University 题目1 : Visiting Peking University 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 Ming is going to travel for n days and the dat
阅读全文
摘要:#include <iostream> #include <cmath> #include <cstdio> #include <cctype> #include <cstdlib> #include <cstring> #include <climits> #include <set> #incl
阅读全文
摘要:【1544分析】:(参考https://zhuanlan.zhihu.com/p/26063938) 我们的思想是每次读取一行,然后再扫描该行的字符,同时计算结果。如果使用getchar( )边读边算,虽然代码较短,但容易写错,并且相对较难理解; 可以把string作为流进行读写,定义在sstrea
阅读全文
摘要:1265 四点共面 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 收藏 关注 1265 四点共面 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基础题 1265 四点共面 基准时间限制:1 秒 空间限制:131072 KB 分值: 0 难度:基
阅读全文
摘要:A. Mahmoud and Ehab and the MEX time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output A. Mahmo
阅读全文
摘要:1459 迷宫游戏 基准时间限制:1 秒 空间限制:131072 KB 你来到一个迷宫前。该迷宫由若干个房间组成,每个房间都有一个得分,第一次进入这个房间,你就可以得到这个分数。还有若干双向道路连结这些房间,你沿着这些道路从一个房间走到另外一个房间需要一 些时间。游戏规定了你的起点和终点房间,你首要
阅读全文
摘要:Problem Description Consider a network G=(V,E) with source s and sink t . An s-t cut is a partition of nodes set V into two parts such that s and t be
阅读全文
摘要:Problem Description A cubic number is the result of using a whole number in a multiplication three times. For example, 3×3×3=27 so 27 is a cubic numbe
阅读全文
摘要:Problem Description The Chinese Zodiac, known as Sheng Xiao, is based on a twelve-year cycle, each year in the cycle related to an animal sign. These
阅读全文
摘要:#include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<algorithm> #include<set> #include<bitset> #include<map> #include<queue>
阅读全文
摘要:#include<cmath> #include<set> #include<list> #include<deque> #include<map> #include<queue> #include<cstdio> #include<cstring> #include<algorithm> #inc
阅读全文
摘要:Problem Description Here you have a set of strings. A dominator is a string of the set dominating all strings else. The string S is dominated by T if
阅读全文
摘要:Problem Description Apple is Taotao's favourite fruit. In his backyard, there are three apple trees with coordinates (x1,y1) , (x2,y2) , and (x3,y3) .
阅读全文
摘要:乘法逆元及其求法 1.乘法逆元定义:在wiki中也叫倒数,当然是% p 后的,其实就是倒数。如果ax≡1(mod p),且gcd(a,p)=1(a与p互质),则称a关于模p的乘法逆元为x。 在求解除法取模问题(a/b)%m时,我们可以转化为(a%(b∗m))/b, 但是如果b很大,则会出现爆精度问题
阅读全文
摘要:A. Tree 题库链接【并查集+树上dfs】 (把每条路径先拆开拆成u->lca和lca->v(去掉lca),然后在树上dfs,回溯的时候把儿子挂到当前节点/带权并查集维护路径乘积) (把每条路径先拆开拆成u->lca和lca->v(去掉lca),然后在树上dfs,回溯的时候把儿子挂到当前节点/带
阅读全文
摘要:Background Professor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that
阅读全文
摘要:An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers, but an unex
阅读全文
摘要:Description Farmer John and Betsy are playing a game with N (1 <= N <= 30,000)identical cubes labeled 1 through N. They start with N stacks, each cont
阅读全文
摘要:The police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. H
阅读全文
摘要:Problem Description Ruins is driving a car to participating in a programming contest. As on a very tight schedule, he will drive the car without any s
阅读全文
摘要:Problem Description Little Ruins is a studious boy, recently he learned the four operations! Now he want to use four operations to generate a number,
阅读全文
摘要:一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。
阅读全文
摘要:The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote fr
阅读全文
摘要:Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a
阅读全文
摘要:二分图就不赘述了,我在知识资料整理有相关资料。 .最大匹配 .最小路径覆盖 .最小点覆盖 .最大独立集 最大匹配:二分图中边集最大的那个匹配 最小路径(边)覆盖:用尽量小的不想交简单路径覆盖有向无环图(DAG)G的所有顶点 最小顶点(点)覆盖:用最少的点,让每条边都至少和其中一个点关联 最大独立集:
阅读全文
摘要:能全都做完,你的矩阵【矩阵综合题】就小成了 1.hdu 1005 矩阵基础题 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1005 题解代码链接:http://blog.csdn.net/a601025382s/article/details/102
阅读全文