- 博客(13)
- 资源 (2)
- 收藏
- 关注
原创 (POJ 3067)Japan 树状数组
Japan Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 27518 Accepted: 7447 DescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the
2017-04-29 20:44:45 511
原创 (POJ 2481)Cows 树状数组
Cows Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 18570 Accepted: 6246 DescriptionFarmer John’s cows have discovered that the clover growing along the ridge of the hill (wh
2017-04-29 19:39:34 481
原创 (POJ 2299)Ultra-QuickSort 树状数组求逆序对数 + 离散化
Ultra-QuickSort Time Limit: 7000MS Memory Limit: 65536K Total Submissions: 60461 Accepted: 22417 DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algor
2017-04-28 20:26:35 458
原创 (POJ 3352)无向图的边双连通分量模板题 + 在一个图中最少加几条边可以使得图边双连通
Road Construction Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 11779 Accepted: 5899 DescriptionIt’s almost summer time, and that means that it’s almost summer construction
2017-04-20 20:07:01 1445
原创 (POJ 2186)Popular Cows 强连通分量 + 缩点图
Popular CowsTime Limit: 2000MS Memory Limit: 65536K Total Submissions: 33190 Accepted: 13517 DescriptionEvery cow’s dream is to become the most popular cow in the herd. In a herd of N (1
2017-04-19 20:18:56 498
原创 有向图的强连通分量Kosaraju算法 和 Tarjan算法思维详解及代码模板
有向图的强连通分量 SCC: 在有向图G中,如果两个顶点间相互可达,则称两个顶点强连通(strongly connected)。如果有向图G的每两个顶点都强连通,称G是一个强连通图。非强连通有向图的极大强连通子图,称为强连通分量(strongly connected components)。如果把每个scc看成一个节点,那么有向图中所有的scc就构成了一个scc图Kosaraju算法的思想: 在讲
2017-04-18 19:40:05 3382 1
原创 无向图的割顶和桥,无向图的双连通分量入门详解及模板
割顶和桥:对于无向图G,如果删除某个节点u后,连通分量数目增加,则称u为图的割顶;如果删除某条边后,连通分量数目增加,则称该边为图的桥。对于连通图删除割顶或桥后都会使得图不再连通以下我,我们利用dfs的性质来快速找出一个连通图中的所有的割顶和桥 首先我们要引入”时间戳”这个概念:时间戳:表示在进行dfs时,每个节点被访问的先后顺序。每个节点会被标记两次,分别用pre[],和post[]表示。 例
2017-04-14 22:56:11 5836 3
原创 (CF 788)C. The Great Mixing <BFS>
题目链接: http://codeforces.com/problemset/problem/788/CC. The Great Mixingtime limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output Sasha and Kolya decid
2017-04-05 20:23:22 973
原创 (CF 788) B. Weird journey 欧拉通路 + dfs判断图的连通性
题目链接:http://codeforces.com/problemset/problem/788/BB. Weird journey time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Little boy Igor wants
2017-04-05 09:55:03 497
原创 (2016年中国大学生程序设计竞赛(杭州) )HDU 5943 Kingdom of Obsession 素数间距 + 匈牙利算法
Kingdom of Obsession Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1009 Accepted Submission(s): 289Problem Description There is a kindom
2017-04-03 18:12:37 495
原创 (2016年中国大学生程序设计竞赛(杭州)) HDU 5938 Four Operations 思维题 + 枚举
(HDU 5938)Four OperationsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 1151 Accepted Submission(s): 338Problem Description Little Ruins i
2017-04-03 18:06:09 670
原创 (CF 792E Colored Balls) 思维题 贪心
题目链接: http://codeforces.com/problemset/problem/792/EE. Colored Ballstime limit per test: 1 secondmemory limit per test: 256 megabytesinput: standard inputoutput: standard outputThere are n boxes wi
2017-04-03 13:13:38 1689
原创 (CF792 ABCD题解) 模拟,树状数组
A题目链接:http://codeforces.com/problemset/problem/792/A//题意: 给你n个数,问你两个数直接的差值得绝对值最小为多少,及有多少对满足这样的数/分析:排序后直接扫一遍即可//#include <iostream>#include <cstdio>#include <cstring>#include <algorithm>#include
2017-04-02 22:57:20 733
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人