Python
Java
PHP
IOS
Android
Nodejs
JavaScript
Html5
Windows
Ubuntu
Linux
poj1463
1
POJ
【扩展KMP】POJ_3450| HDU_2328 Corporate Identity
原题直通车 POJ 3450 Corporate Identity HDU 2328 Corporate Identity 题意概述 找出N个串中最长公共子串 分析 一 可以直接枚举其中一个串的所有字串 跟所有串进行匹配找到结果 二 用其中
ACM算法题解
POJ
字符串
kmp
扩展
Knight Moves_dfs_2018_3_10
A friend of you is doing research on the Traveling Knight Problem TKP where you are to find the shortest closed tour of
DFS
POJ
poj 2155 Matrix
Problem poj org problem id 2155 vjudge net contest 146952 problem A Referencd www cnblogs com gj Acit p 3258880 html Mea
ACM
数据结构
线段树
POJ
poj1240
本题为已知M 叉树的前序遍历与后序遍历 要求给出对应树有多少种可能 与poj2255类似 只要划分出子树 就把问题规模缩小了 然后就可以递归 目前只会写递归 M叉树的前序遍历为 根 子树1 子树2 子树K K lt M M叉树的后序遍历为
POJ
poj 1195 Mobile phones
Problem poj org problem id 1195 vjudge net contest 146952 problem C Meaning 有一个 S S 的正方形区域 两维的下标范围都是是 0 S 1 有 4 种操作 1 0
ACM
数据结构
线段树
POJ
POJ 275 Drainage Ditches|网络流|dinic模版
问题描述 总时间限制 1000ms内存限制 65536kB 描述 Every time it rains on Farmer John s fields a pond forms over Bessie s favorite clover
POJ
算法
poj 2155 Matrix
Problem poj org problem id 2155 vjudge net contest 146952 problem A Meaning 一个 N N 的矩阵 A 初始时全部值为 0 有两种操作 1 C x1 y1 x2 y2
ACM
数据结构
线段树
POJ
POJ 2659 Raid|分治法|平面最近点对
题目描述 总时间限制 1000ms 内存限制 65536kB 描述 After successive failures in the battles against the Union the Empire retreated to its
POJ
算法
c
POJ--1159:Palindrome (DP求最长公共子序列)
1 题目源地址 http poj org problem id 1159 2 题目大意 题目就是给你一个字符串 问你添加最少几个字符之后字符串变成回文字符串 求给出的字符串和逆序的字符串的最长公共子序列 用总长度减去这个最长公共子序列的长度
ACM解题报告
POJ
动态规划
poj 1330 Nearest Common Ancestors
Problem poj org problem id 1330 vjudge net contest 80844 problem C Meaning 求最近公共祖先 Note 真 LCA 模版题 那就备份一发 LCA 模版 链式前向星存图
ACM
lca
图论
POJ
POJ--1458:Common Subsequence (DP求最长公共子序列)
1 题目源地址 http poj org problem id 1458 2 基本题意 给出两个序列 求出最长子序列的长度并输出 经典的动态规划求解 求最长公共子序列的经典DP解法代价为O mn 其中m和n分别为两个字符串的长度 具体实现如
ACM解题报告
POJ
动态规划
【题解】poj2689(LibreOJ10197) 线性筛
题目链接 筛出2到sqrt u 的所有质数 再标记 l u 中是质数p倍数的数 最后枚举相邻质数 部分代码实现参考了大佬题解 题目描述 给定两个整数 L R L R L R 求闭区间 L
POJ
线性筛
LibreOJ
POJ 2479 Dual Core CPU|网络流|dinic模版
问题描述 总时间限制 15000ms 单个测试点时间限制 5000ms 内存限制 65536kB 描述 As more and more computers are equipped with dual core CPU SetagLilb
POJ
算法
POJ--1328:Radar Installation (贪心)
1 题目源地址 http poj org problem id 1328 2 解题思路 该题题意是为了求出能够覆盖所有岛屿的最小雷达数目 每个小岛对应x轴上的一个区间 在这个区间内的任何一个点放置雷达 则可以覆盖该小岛 区间范围的计算用 x
ACM解题报告
POJ
贪心
POJ--2709:Painter (贪心)
1 题目源地址 http poj org problem id 2709 2 解题思路 每个颜料盒可能有3 12种颜色 其中每种颜色50ml 任意三种颜色 假设每种颜色Xml 可以混合出Xml的灰色 现在给出所需颜色的种数N 给出N个值分别
ACM解题报告
POJ
贪心
poj 1742 Coins
Problem poj org problem id 1742 Reference www cppblog com flyinghearts archive 2010 09 01 125555 html blog csdn net wang
ACM
DP
POJ
c
poj 2096 Collecting Bugs
Problem poj org problem id 2096 vjudge net contest 151678 problem Q Reference blog csdn net xingyeyongheng article detai
ACM
DP
概率DP
POJ
汉诺塔问题(Hanoi)-python递归实现
描述 描述 一 汉诺塔问题 有三根杆子A B C A杆上有N个 N gt 1 穿孔圆盘 盘的尺寸由下到上依次变小 要求按下列规则将所有圆盘移至C杆 每次只能移动一个圆盘 大盘不能叠在小盘上面 提示 可将圆盘临时置于B杆 也可将从A杆移出的圆
POJ
python
递归算法
算法
POJ 1635 Subway tree systems
题目 xff1a Some major cities have subway systems in the form of a tree i e between any pair of stations there is one and o
POJ
1635
Subway
Tree
systems
1
2
»