佛奴儿
佛奴儿
全部文章
分类
未归档(985)
归档
标签
去牛客网
登录
/
注册
Roni
ACMer
TA的专栏
0篇文章
0人订阅
职场那些事儿
0篇文章
0人学习
全部文章
(共985篇)
康托展开&逆展开算法笔记
康托展开(有关全排列) 康托展开:已知一个排列,求这个排列在全排列中是第几个 康托展开逆运算:已知在全排列中排第几,求这个排列 定义: X=an(n-1)!+an-1(n-2)!+...+ai(i-1)!+...+a21!+a1*0! ai为整数,并且0<=ai<i(1<=i&...
2018-07-14
0
424
HDU 2102 A计划【三维BFS】
A计划 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 28414 Accepted Submission(s): 7129 P...
2018-07-12
0
344
UVA 11624 Fire!【两点BFS】
Joe 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. Help J...
2018-07-12
0
440
FZU 2150 Fire Game 【两点BFS】
Fat 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 board is con...
2018-07-12
0
289
HDU 1495 非常可乐【BFS/倒水问题】
非常可乐 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 22067 Accepted Submission(s): 8968 Problem...
2018-07-12
0
370
HDU 2612 Find a way【多起点多终点BFS/两次BFS】
Find a way Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 22390 Accepted Submission(s): 7304 P...
2018-07-11
0
317
洛谷 P3371 【模板】单源最短路径 【链式前向星+SPFA】
题目描述 如题,给出一个有向图,请输出从某一点出发到所有点的最短路径长度。 输入输出格式 输入格式: 第一行包含三个整数N、M、S,分别表示点的个数、有向边的个数、出发点的编号。 接下来M行每行包含三个整数Fi、Gi、Wi,分别表示第i条有向边的出发点、目标点和长度。 输出格式: 一行,包含N...
2018-07-11
0
379
POJ 2387 链式前向星下的SPFA
(POJ)[http://poj.org/problem?id=2387] Til the Cows Come Home Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 69789 Accepted: 23386 Descript...
2018-07-11
0
357
链式前向星写法下的DFS和BFS
Input 5 7 1 2 2 3 3 4 1 3 4 1 1 5 4 5 output 1 5 3 4 2 #include<bits/stdc++.h> using namespace std; const int maxn = 150; const int maxm = 105...
2018-07-10
0
464
深度理解链式前向星
我们首先来看一下什么是前向星. 前向星是一种特殊的边集数组,我们把边集数组中的每一条边按照起点从小到大排序,如果起点相同就按照终点从小到大排序, 并记录下以某个点为起点的所有边在数组中的起始位置和存储长度,那么前向星就构造好了. 用len[i]来记录所有以i为起点的边在数组中的存储长度. 用...
2018-07-10
0
425
首页
上一页
26
27
28
29
30
31
32
33
34
35
下一页
末页