自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Vmorish

—— Anything is possible

  • 博客(18)
  • 收藏
  • 关注

转载 HDU - 5517 Triple(二维树状数组)

Problem DescriptionGiven the finite multi-set A of n pairs of integers, an another finite multi-set B of m triples of integers, we define the product of A and B as a multi-setC=A∗B={⟨a,c,d⟩∣⟨a,b⟩∈A, ⟨c,d,e⟩∈B and b=e}For each ⟨a,b,c⟩∈C, its BETTER set

2017-09-29 15:41:21 292

原创 HDU - 5536 Chip Factory(字典树)

Problem DescriptionJohn is a manager of a CPU chip factory, the factory produces lots of chips everyday. To manage large amounts of products, every processor has a serial number. More specifically, the factory produces n chips today, the i-th chip produce

2017-09-22 09:22:12 312

原创 PHP实现验证码功能

//先做个记录,功能还不完善,界面还太丑画图的时候要安装扩展库gd2,我安装的命令是sudo apt-get install php-gd,加上php版本号之后说找不到包,就多尝试几次了captcha.php<?php //设置session,开启会话功能 session_start(); //设置验证码图片大小 $image = imagecrea

2017-09-20 23:26:15 388

转载 Ubuntu17.04重启搜狗输入法

//原文:http://blog.csdn.net/zhangxiao93/article/details/53267676、搜狗输入法老是出问题,输入不了中文,正写代码写的起劲,就不想用关机这种方法来解决这个问题了,百度了一下,用下面的命令解决这个问题,真的有用,嘻嘻嘻嘻#!/bin/shpidof fcitx | xargs killpidof sogou-qimpanel | x

2017-09-20 14:57:19 1016

原创 PHP+MySql实现一个简单的留言板

//嗯,跟着书学的,代码不是自己写的,但是都能理解,有时间自己去写个好看一点的吼吼吼~留言板是接触WEB开发的基础,写一个留言板需要知道前端的一些基础标签,对数据库有一个了解会基础SQL语言,PHP基础知识,前段基础+数据库基础+PHP基础=>留言板。前方高能哇(界面真的是吃藕诶…先建一个数据库,数据库里有两张表,一个存账号密码,一个存留言信息//创建数据库,里面有两张表Admin

2017-09-15 17:38:30 29524 10

原创 POJ - 1113 Wall(计算几何凸包)

DescriptionOnce upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, that he would not listen to his Architect's proposals to build a beautiful brick wall with a perfect sha

2017-09-14 23:08:33 394

原创 PHP连接数据库基础知识及易错点

emmmmm,想用PHP写计网的课设,所以滚去看了下PHP连接数据库…以下操作都是在Ubuntu17.04,LAMP下进行,且PHP数据库的扩展包为MySqli,MySqli为MySql的扩展版,在使用上稍有区别,比较容易混淆,要注意下面是PHP连接数据库的一些最最最基本的操作额,分界线两边的代码要分开操作一些细节问题:mysqli_connect()的第一个参数就是本机的地址,写

2017-09-14 11:40:00 2919 4

转载 HDU - 5489 Removed Interval (dp+线段树) 2015合肥网络赛

HDU - 5489 Removed Interval (dp+线段树) 2015合肥网络赛Problem DescriptionGiven a sequence of numbers A=a1,a2,…,aN, a subsequence b1,b2,…,bk of A is referred as increasing if b1<b2<…<bk. LY has just learned how to find the longest increasing subsequence (LIS).Now

2017-09-13 12:55:26 455

原创 记2017暑假这一段生活

记2017暑假这一段生活 两个多月,很长也很短,不长也不短,但它就这样过去了,很感慨。如果说学到了什么东西,当然有很多,比如最基础的数据结构包括单调栈单调队列树状数组线段树等等,还有难一点的主席树啊,数链剖分啊以及了解离线处理可持久化…当然这些都是很实质上的东西,同时还有一些其他感悟。原来大学也可以像高中一样每天好好的学习哇,真的很感谢两个队友在刚开始集训的时候把我从网易云这个坑里拉出来了(当然,现在还是喜欢网易云,真是有点觉得自己有一段时间很沉迷啊,仔细想想,如果自己荒废了今年的暑假,那现在我应该会

2017-09-12 15:06:43 383 1

原创 HDU-6052 card card card(尺取法)

HDU-6052 card card card(尺取法)Problem DescriptionAs a fan of Doudizhu, WYJ likes collecting playing cards very much. One day, MJF takes a stack of cards and talks to him: let's play a game and if you win, you can get all these cards. MJF randomly assigns

2017-09-11 21:43:17 278

转载 凸包问题的五种解法

凸包详解凸包问题的五种解法前言:首先,什么是凸包? 假设平面上有p0~p12共13个点,过某些点作一个多边形,使这个多边形能把所有点都“包”起来。当这个多边形是凸多边形的时候,我们就叫它“凸包”。如下图: 这里写图片描述然后,什么是凸包问题? 我们把这些点放在二维坐标系里面,那么每个点都能用 (x,y) 来表示。 现给出点的数目13,和各个点的坐标。求构成凸包的点?解一:穷举法(蛮力法)时间复杂度:O(n³)。 思路:两点确定一条直线,如果剩余的其它点都在这条直线的同一侧,

2017-09-07 20:59:01 471

原创 HDU - 6183 Color it(线段树)

HDU - 6183 Color it(线段树)Problem DescriptionDo you like painting? Little D doesn't like painting, especially messy color paintings. Now Little B is painting. To prevent him from drawing messy painting, Little D asks you to write a program to maintain foll

2017-09-07 15:02:27 353

原创 HDU - 6191 Query on A Tree(可持久化字典树)

HDU - 6191 Query on A Tree(可持久化字典树)Problem DescriptionMonkey A lives on a tree, he always plays on this tree.One day, monkey A learned about one of the bit-operations, xor. He was keen of this interesting operation and wanted to practise it at once.M

2017-09-06 21:19:11 517

原创 HDU - 4575 Tree(可持久化字典树)

HDU - 4575 Tree(可持久化字典树)Problem Description Zero and One are good friends who always have fun with each other. This time, they decide to do something on a tree which is a kind of graph that there is only one path from node to node. First, Zero will give

2017-09-06 16:32:28 571 1

原创 NBUT - 1457 Sona (莫队算法)

NBUT - 1457 Sona (莫队算法)问题描述Sona, Maven of the Strings. Of cause, she can play the zither.Sona can't speak but she can make fancy music. Her music can attack, heal, encourage and enchant.There're an ancient score(乐谱). But because it's too long, Sona can

2017-09-04 20:17:50 335

原创 HYSBZ - 2038 小Z的袜子(分块+莫队算法)

HYSBZ - 2038 小Z的袜子(分块+莫队算法)Description作为一个生活散漫的人,小Z每天早上都要耗费很久从一堆五颜六色的袜子中找出一双来穿。终于有一天,小Z再也无法忍受这恼人的找袜子过程,于是他决定听天由命……具体来说,小Z把这N只袜子从1到N编号,然后从编号L到R(L 尽管小Z并不在意两只袜子是不是完整的一双,甚至不在意两只袜子是否一左一右,他却很在意袜子的颜色,毕竟穿两只不同色的袜子会很尴尬。你的任务便是告诉小Z,他有多大的概率抽到两只颜色相同的袜子。当然,小Z希望这个概率尽

2017-09-04 14:54:05 319

原创 POJ - 2104 K-th Number(主席树)

POJ - 2104 K-th Number(主席树)DescriptionYou are working for Macrohard company in data structures department. After failing your previous task about key insertion you were asked to write a new data structure that would be able to return quickly k-th order

2017-09-03 19:52:24 297

原创 HYSBZ - 2243 [SDOI2011]染色(树链剖分)

HYSBZ - 2243 [SDOI2011]染色(树链剖分)Description给定一棵有n个节点的无根树和m个操作,操作有2类:1、将节点a到节点b路径上所有点都染成颜色c;2、询问节点a到节点b路径上的颜色段数量(连续相同颜色被认为是同一段),如“112221”由3段组成:“11”、“222”和“1”。请你写一个程序依次完成这m个操作。Input第一行包含2个整数n和m,分别表示节点数和操作数;第二行包含n个正整数表示n个节点的初始颜色下面 行每行包含两个整数x和y,表示x和y

2017-09-03 09:11:31 273

空空如也

空空如也

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

TA关注的人

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