自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 yii2 储存控制过滤器ACF笔记

存取控制过滤器ACFuse yii\web\Controller;use yii\filters\AccessControl;class SiteController extends Controller{ public function behaviors() { return [ 'access' => [ ...

2018-03-21 21:01:46 223

原创 kruskal模版 [结构体存图]

kruskal的时间复杂度是O(eloge)。这里因为要给边排序,所以要用结构体存图。 然后用到了并查集检查两个点是否在同一连通分量里,以为在同一连通分量里的两个点如果链接一定形成了环,就不是树了。#include <iostream>#include <vector>#include <string>#include <cstring>#include <algorithm>#inc

2017-03-27 22:01:06 348

原创 POJ-3268 Silver Cow Party[Dijkstra] [邻接矩阵] [置换矩阵]

Time Limit: 2000MS Memory Limit: 65536KTotal Submissions: 21046 Accepted: 9625Description:One cow from each of N farms (1 ≤ N ≤ 1000) conveniently numbered 1..N is going to attend the big

2017-03-21 20:01:16 403

原创 POJ 2378. Til the Cows Come Home [dijkstra模版] [邻接矩阵]

Language:Til the Cows Come HomeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 49872 Accepted: 16910Description:Bessie is out in the field and wants to get back to the barn to

2017-03-21 19:46:12 164

原创 HUD_1745 I Hate It!【线段树】【最值查询修改】

Problem Description: 很多学校流行一种比较的习惯。老师们很喜欢询问,从某某到某某当中,分数最高的是多少这让很多学生很反感。不管你喜不喜欢,现在需要你做的是,就是按照老师的要求,写一个程序,模拟老师的询问。当然,老师有时候需要更新某位同学的成绩。Input:本题目包含多组测试,请处理到文件结束。在每个测试的第一行,有两个正整数 N 和 M ( 0<N<=200000,0<

2017-03-14 20:46:32 206

原创 Jin Ge Jin Qu[01背包]

(If you smiled when you see the title, this problem is for you ^_^)For those who don‘t know KTV, see: http://en.wikipedia.org/wiki/Karaoke_boxThere is one very popular song called Jin Ge Jin Qu(劲歌金曲).

2017-03-10 19:59:05 254

原创 线段树模版[interval tree][区间更新]

这是线段树带区间更新的模版,用结构体实现的。

2017-03-09 00:00:16 262

原创 LightOJ - 1112 Curious Robin Hood [interval tree]

Robin Hood likes to loot rich people since he helps the poor people with this money. Instead of keeping all the money together he does another trick. He keeps n sacks where he keeps this mo

2017-03-03 21:06:54 310

原创 HUD 2546 饭卡 【 01 dp】

饭卡

2017-02-28 19:48:34 310

原创 POJ_1426 FIND THE MULITIPLE [数字dfs]

dfs

2017-02-06 21:48:30 169

原创 迷宫问题 POJ - 3984

记录唯一路径的bfs

2017-01-25 19:51:55 210

原创 Catch That Cow POJ - 3278 [bfs][最短路]

Catch That Cow Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point K

2017-01-25 18:22:47 322

原创 POJ 3253 fence repair [STL][priority_queue]

优先队列

2017-01-22 20:10:43 145

原创 POJ 2503 Babelfish [map & string]

poj 2503 babel fish

2017-01-22 17:15:48 223

原创 A - Registration system STL专练

A registration system 题解

2017-01-21 15:17:35 397

原创 单向链表

单项链表模版代码:

2016-12-31 00:11:55 347

原创 迭代器

迭代器的使用有点类似指针 引用它的值时要用到‘*’运算符下面是标准代码:#include <iostream>#include <vector>#include <cstdio>using namespace std;int main() { vector<int> ivec; ivec.push_back(1); ivec.push_back(2); ive

2016-12-28 09:16:10 177

原创 J题 游戏模拟

J:Ostap and Grasshopper

2016-12-22 16:42:07 258

转载 背包九讲里的01背包

P01: 01背包问题 题目 有N件物品和一个容量为V的背包。第i件物品的费用是c[i],价值是w[i]。求解将哪些物品装入背包可使价值总和最大。 基本思路 这是最基础的背包问题,特点是:每种物品仅有一件,可以选择放或不放。 用子问题定义状态:即f[i][v]表示前i件物品恰放入一个容量为v的背包可以获得的最大价值。则其状态转移方程便是: f[i][v]=max{f[i-1][v],f[

2016-12-08 13:47:11 167

空空如也

空空如也

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

TA关注的人

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