上一页 1 ··· 6 7 8 9 10
摘要: LightOJ 1289 LCM from 1 to nDescription Given an integer n, you have to find lcm(1, 2, 3, …, n) lcm means least common multiple. For example... 阅读全文
posted @ 2015-08-25 20:38 KatarinaYuan 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 一.二分图二分图又称作二部图,是图论中的一种特殊模型。 设G=(V,E)是一个无向图,如果顶点V可分割为两个互不相交的子集(A,B),并且图中的每条边(i,j)所关联的两个顶点i和j分别属于这两个不同的顶点集(i in A,j in B),则称图G为一个二分图。当且仅当无向图G的每... 阅读全文
posted @ 2015-07-27 17:18 KatarinaYuan 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 无向图的双连通块题目描述给出一个无向图,求其中双连通块的个数以及其中最大的双连通块。输入第1行:2个整数n和m,n表示图的结点个数,m表示图中边的数量 (1#include#include#include#include#includeusing namespace std;#de... 阅读全文
posted @ 2015-07-23 21:51 KatarinaYuan 阅读(312) 评论(0) 推荐(0) 编辑
摘要: 问题 K(1668): 割点和割边题目描述给出一个无向连通图, 求出所有割点与割边的数量。输入第1行: 2个整数N,M (1 #includeusing namespace std;#define MAXN 5000#define MAXM 10000struct node{ ... 阅读全文
posted @ 2015-07-23 21:38 KatarinaYuan 阅读(392) 评论(0) 推荐(0) 编辑
摘要: 1849: 【基础算法】8数码问题版本一题目描述 在一个3*3的九宫格棋盘里,放有8个数码,数码的数字分别是1~8等8个数字。可以通过在九宫格里平移数码来改变状态。数码在任何情况下都不能离开棋盘。给出8个数码的初始状态(没放数码的空格用0表示)和目标状态,问从初始状态到目标状态,最... 阅读全文
posted @ 2015-07-23 19:42 KatarinaYuan 阅读(258) 评论(0) 推荐(0) 编辑
摘要: u到v或者v到uDescriptionIn order to make their sons brave, Jiajia and Wind take them to a big cave. The cave has n rooms, and one-way corridors ... 阅读全文
posted @ 2015-07-22 20:47 KatarinaYuan 阅读(162) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10