自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 ACM 学习心得

ACM 学习心得STL:完美的艺术品STL 由四大部分组成:算法、容器、迭代器、仿函数。算法(algorithm)        算法定义了一组与实现无关的操作,也是 ACM 学习的核心。C++ 算法库的内容全都是一些比较基本的算法,包括移动、转换、遍历、删除、过滤等等。C++ 算法库本身是基于抽象的,在迭代器的抽象下,使得这些算法可以在不同结构的容器中重用。一个比较坑的地方就是我高中的时候学完 C

2016-07-02 10:09:28 2284

原创 专题四 · 1011

代码及解释#include <algorithm> #include <limits.h> #include <stdio.h> #include <string.h>// 最后一道 ACM 题 // 死活 A 不过去 // 然后我就看了别人的代码 A 了 // _:(´°ω°`」 ∠):_const int SIZE = 2000;int T, S, D, n; int map[SIZE][SIZ

2016-07-07 09:49:20 196

原创 专题四 · 1010

代码及解释#include <stdio.h>#include <iostream> #include <queue>// 最短路之后深搜 // 用的队列优化 // //typedef struct n1 { int distens, flog; } node;node N[1005]; int map[1005][1005], k; int direct[1005]; void set(int n

2016-07-06 12:06:28 200

原创 专题四 · 1009

代码及解释#include <iostream> #include <cstring>// 简单的 Floyd // 初始化的一个技巧是用 unsigned int 然后初始化 -1 // 更像是一个 trick // 还有一个是 INT_MAX 位于 limits.h // 更好的选择是 // std::numeric_limits<decltype(G[0][0])>::max // 位于 li

2016-07-04 21:37:52 247

原创 专题四 · 1008

代码及解释#include<stdio.h> #include<string.h> #include<algorithm>// 并查集的应用 // 判断边的两端是否在同一个联通分量里 // 然后在最后合并成一个回路struct node { int u,v,val; } edge[100005];int set[10005], circle[10005];int find_f(int x) {

2016-07-03 22:45:42 216

原创 专题四 · 1005

代码及解释#include <iostream> #include <stdio.h> #include <string.h>// // 连续两次莫名 AC,结果发现各种脑残手误 // 变量忘记初始化就使用 // 这个特别坑的地方调试了好几次才发现……int n,ans;int imap[110][110],dis[110],vis[110]; inline void Prim() { int

2016-07-03 18:32:16 221

原创 专题四 · 1006

代码及解释#include <iostream> #include <algorithm>// 天真的把上一道题稍微改了改, // 以为能过,结果 WA 了 (》:o 」∠)_ // 然后又老老实实的重新写了using std::cin; using std::cout; using std::endl;char set[1000]; int n,k;struct edge { char s,e

2016-07-02 22:45:00 265

原创 专题四 · 1004

代码及解释#include <iostream> #include <algorithm>// 刚刚考完计算机组成,赶快做一道题�� // 连续好几道 Kruskal,代码几乎都不用改(感谢老师��) //using std::cin; using std::cout; using std::endl;const int N = 200;int set[N];int find_f(int x) {

2016-07-02 09:55:52 537

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除