自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

say_c_box的博客

只是为了记录

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

原创 codeforces Gym - 101190A——Abbreviation

http://codeforces.com/gym/101190/attachments恶心的模拟题,队友写的代码。#include#include#includeusing namespace std;string inn,out,wrd,cu1,cu2;int co1,co2;bool jup(char c){ if('A'<=c&&c<='Z') re

2017-07-23 22:08:56 802

原创 HUST 1017 - Exact cover——舞蹈链,精确点覆盖

舞蹈链入门教程:http://www.cnblogs.com/grenet/p/3145800.html1017 - Exact coverTime Limit: 15s Memory Limit: 128MBSpecial Judge Submissions: 7538 Solved: 3868DESCRIPTIONThere is an

2017-07-21 11:37:21 369

原创 HDU1074——Doing Homework(状态压缩dp)

Doing HomeworkTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 9323    Accepted Submission(s): 4405Problem DescriptionIgnatius ha

2017-07-02 21:45:00 392

原创 HDU1069——Monkey and Banana(动态规划)

Monkey and BananaTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15100    Accepted Submission(s): 7997Problem DescriptionA group

2017-07-02 21:42:29 329

原创 最优二叉查找树详解(算法导论学习笔记)

代码均未经过严格测试,仅供参考最优二叉查找树动态规划原理动态规划与分治法相似,都是通过组合子问题的解来求解原问题。动态规划通常是用来求解最优化问题(optimization problem).这类问题可以有很多个可行解,每个解都有一个值,我们希望寻找最优值(最大值或者最小值)的解。我们称这样的解为问题的一个最优解(oneoptimization solution)而不是最优解(theoptimiz

2017-06-08 09:04:14 20301 1

原创 DFT和FFT详解(算法导论学习笔记)

代码均为做严格测试,仅供参考分治法基本原理将原问题分解为几个规模较小但类似于原问题的子问题,递归的求解这些子问题。然后再合并这些子问题的解来建立原问题的解。递归求解这些子问题,然后再合并这些子问题的解来建立原问题的解。分治法在分层递归时都有三个步骤:分解原问题为若干子问题,这些子问题是原问题规模较小的实例。解决这些子问题,递归的求解各个子问题。然而若子问题的规模足够小。则直接求解。合并这些子问

2017-06-08 09:02:16 19900

原创 Mac使用mysql中出现ERROR 1045: Access denied for user: 'root@localhost' 以及密码过期解决方法

文章链接 昨天学数据库,安装的时候完全没看到设置密码的地方… 然后登陆不进去,一直出现ERROR 1045: Access denied for user: ‘root@localhost’报错 找了一晚上资料终于找到一个可行的解决办法,分享一个。1. 用安全模式进入数据库1.1 打开系统偏好设置,如果你的电脑已经安装mysql,会在下面有一个mysql的按钮。点进去关闭mysql服务。 1

2017-06-02 10:50:14 22079 5

原创 codeforces 812C——Sagheer and Nubian Market(二分)

C. Sagheer and Nubian Markettime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOn his trip to Luxor and Aswan

2017-06-02 10:22:36 778

原创 codefoces 812B——Sagheer, the Hausmeister(动态规划)

B. Sagheer, the Hausmeistertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSome people leave the lights at

2017-06-02 10:20:43 677

原创 POJ1661——Help Jimmy(动态规划)

Help JimmyTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 11553 Accepted: 3790Description"Help Jimmy" 是在下图所示的场景上完成的游戏。 场景中包括多个长度和高度各不相同的平台。地面是最低

2017-05-28 23:16:20 464

原创 POJ1458————Common Subsequence

Common SubsequenceTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 52488 Accepted: 21709DescriptionA subsequence of a given sequence is the given seque

2017-05-28 23:05:31 364

原创 HDU1024 ——Max Sum Plus Plus(动态规划)

Max Sum Plus PlusTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 28869    Accepted Submission(s): 10125Problem DescriptionNow I

2017-05-28 16:01:40 388

原创 codeforces 811D——Vladik and Favorite Game(bfs)

D. Vladik and Favorite Gametime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThis is an interactive problem.

2017-05-28 13:03:08 713

原创 codeforces811C——Vladik and Memorable Trip(动态规划)

C. Vladik and Memorable Triptime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVladik often travels by trains

2017-05-28 13:00:50 1830

转载 使用python的Flask实现一个简单RESTful API服务器端

找了一篇教程学习了一下,为了加深印象照着写了一遍存下来,原文链接如下:传送门REST的六个特性Client-Server:服务器端与客户端分离。Stateless(无状态):每次客户端请求必需包含完整的信息,换句话说,每一次请求都是独立的。Cacheable(可缓存):服务器端必需指定哪些请求是可以缓存的。Layered System(分层结构):服务器端与客户端通讯必需标准化,服务器的变更

2017-05-25 15:53:46 5175

原创 python中的filter函数

filter函数本质上是一个过滤函数,从一个序列中筛选出你需要的函数。 其参数是一个函数和一个序列,把传入的函数以此作用于每个参数,根据返回值确定是否保留。比如从一个序列中筛选出奇数def is_odd(n): return n % 2 == 1 a=[1,2,3,4,5,6] a = filter(is_odd, a) print a比如从一个字典序列

2017-05-25 10:57:43 1925

原创 python入门教程&学习笔记

python学习笔记本篇笔记根据python简明教程中觉得值得注意的地方摘取而成基本概念4种类型的数——长整数,整数,浮点数,负数。三引号可以表示多行的字符串,三引号中可以自由的使用单引号和双引号python中用到的任何东西都称之为对象,使用变量时只需要给它们赋一个值。不需要声明或定义数据类型。控制流if语句注意if语句在结尾处包含一个冒号——我们通过它告诉Python下面跟着一个语句块。

2017-05-23 14:33:54 1031 2

原创 codeforcodeforces 808E——Selling Souvenirs(动态规划)官方题解详解

E. Selling Souvenirstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAfter several latest reforms many tour

2017-05-16 08:46:52 1808 1

原创 codeforcodeforces 808D——Array Division(查找,set)

D. Array Divisiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVasya has an array a consisting of positi

2017-05-16 08:31:15 1228

原创 codeforces 808C——Tea Party(贪心)

C. Tea Partytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp invited all his friends to the tea par

2017-05-16 08:21:53 1272

原创 codeforces 808B——Average Sleep Time

B. Average Sleep Timetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt's been almost a week since Polycarp

2017-05-16 08:17:22 1367

原创 codecodefor 808A——Lucky Year

A. Lucky Yeartime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputApart from having lots of holidays throughout

2017-05-16 08:15:03 754

原创 codeforces Gym 100269K——Kids in a Friendly Class(可图性判定)

题目传送门:http://codeforces.com/gym/100269/attachments/download/1978/20132014-acmicpc-neerc-nothern-subregional-contest-en.pdf主要学会了一点,是否可以把一个序列,每个数的值是对应点的度。还原成一个图。方法就是,每次找到需要度最大的点,设其度为d[i],找到d[i]个

2017-05-10 20:05:34 712

原创 codeforce Gym100269F——Flight Boarding Optimization(动态规划)

题目传送门:http://codeforces.com/gym/100269/attachments/download/1978/20132014-acmicpc-neerc-nothern-subregional-contest-en.pdfdp[i][j]表示i为最后一个分段的结尾,一共分了j端。详细的解释可以看这篇博客,想到预处理正序对就很简单了。http://blog.

2017-05-10 19:59:18 538

原创 codeforces 804B——Ice cream coloring(图论,dfs,数据结构,好题)

C. Ice cream coloringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIsart and Modsart were trying to solv

2017-05-05 18:47:33 911

原创 codeforces 804B——Minimum number of steps(模拟,贪心)

B. Minimum number of stepstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe have a string of letters 'a' a

2017-05-05 18:42:30 438

原创 codeforces 804A——Find Amir

A. Find Amirtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA few years ago Sajjad left his school and regi

2017-05-05 18:38:00 941

原创 codeforces 788B—— Weird journey(图论,组合,欧拉回路变形)详解

Weird journeytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLittle boy Igor wants to become a traveller.

2017-03-30 21:21:08 970

原创 codeforces 788A——Functions again(动态规划)

A. Functions againtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSomething happened in Uzhlyandia again...

2017-03-30 20:12:05 1072

原创 codeforces 792E —— Colored Balls (贪心,不定方程,数学)

E. Colored Ballstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are n boxes with colored balls on the

2017-03-29 22:46:14 955

原创 codeforces 792D——Paths in a Complete Binary Tree(二叉树,数学)

D. Paths in a Complete Binary Treetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputT is a complete binary t

2017-03-29 22:34:05 791

原创 codeforces 792C —— Divide by Three(分类讨论)

C. Divide by Threetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA positive integer number n is written on

2017-03-29 22:30:11 595

原创 codeforces 792B——Counting-out Rhyme(数组模拟链表)

B. Counting-out Rhymetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputn children are standing in a circle an

2017-03-29 22:22:01 459

原创 AC自动机模板

#include#include#includeusing namespace std;const int maxnode=11000;const int sigma_size=26;struct AC_Automata{ int ch[maxnode][sigma_size]; int val[maxnode]; // 每个字符串的结尾结点都有一个非0的val

2017-03-23 21:48:27 280

原创 HDU4345————Permutation(置换群,dp)

PermutationTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 910    Accepted Submission(s): 536Problem DescriptionThere is an arra

2017-03-23 11:09:26 349

原创 HDU4342——History repeat itself(数学)

History repeat itselfTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1709    Accepted Submission(s): 805Problem DescriptionTom t

2017-03-23 10:27:54 347

原创 HDU4341——Gold miner(分组背包)

Gold minerTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2292    Accepted Submission(s): 875Problem DescriptionHomelesser likes

2017-03-23 10:18:16 581

原创 UVALive 3942 - Remember the Word(DP,字典树)

题目链接:https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1943白书P209// test.cpp : 定义控制台应用程序的入口点。//#define _CRT_SECURE_NO_WARNINGS#include

2017-03-14 21:53:54 374

原创 Codeforces Round #403 (Div. 2, based on Technocup 2017 Finals) 题解(ABCDE) (二分,dfs序,数据结构)

A. Andryusha and Sockstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndryusha is an orderly boy and like

2017-03-07 19:59:05 524

原创 POJ1037————A decorative fence(动态规划)

A decorative fenceTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7545 Accepted: 2869DescriptionRichard just finished building his new house. Now the

2017-03-04 10:43:29 1594

空空如也

空空如也

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

TA关注的人

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