自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

不想宅的冷同学

势在必行 试着起飞 怎样都归作成长

  • 博客(323)
  • 资源 (1)
  • 收藏
  • 关注

转载 leetcode-最长回文子串

作者:LeetCode-Solution链接:https://leetcode-cn.com/problems/longest-palindromic-substring/solution/zui-chang-hui-wen-zi-chuan-by-leetcode-solution/来源:力扣(LeetCode)方法一:动态规划思路与算法class Solution: def longestPalindrome(self, s: str) -> str:

2020-09-23 11:27:58 161

原创 Mac利用homebrew安装xgboost(傻瓜教程)

Homebrew国内如何自动安装(国内地址)常见错误参考xgboost官网 安装教程1.安装Homebrew2.安装gcc-6brew install gcc 3.重点!选择根目录作为安装xgboost的地址cd ~git clone --recursive https://github.com/dmlc/xgboost4.进入xgboost目录编译cd xgboost; cp make/config.mk ./config.mk; make -j45.安装.

2020-05-12 19:09:11 628 1

原创 用A*算法解决八数码问题 MATLAB

代码:bashuma.mfunction []=bashumaglobal e; %open表计数global i; %close表计数global m; %循环次数计数a=0;b=0;n=0;i=0;e=1;m=0;%初始化dis=[1 2 3;8 0 4;7 6 5]; %目标节点f.prev=zeros(3);f.con=[7 5 3;1

2017-04-18 16:58:59 9759 2

原创 北京林业大学“计蒜客”杯程序设计竞赛 网络赛 G. 易彰彪的一张表 (KMP)

易彰彪最近有点奇怪,一向爱打游戏他最近居然盯着一张全是大小写字母的表在看,好像在找什么东西。他说,这是他女神给他的一张表,他需要回答女神的问题——在忽略大小写(即大写字母和小写字母视为同一字母)的情况下,是否能在表中找到某一连续的字符串(第 ii 行的尾部和第 i + 1i+1 行的头部视为相连)。但是英语不好的易彰彪一看到字母就头晕,聪明的你能帮他解决这个问题吗?输入格式:第一行会输

2016-04-24 14:45:41 1843 2

原创 北京林业大学“计蒜客”杯程序设计竞赛 网络赛 B. 大钉骑马走江湖 (广搜)

1000ms 32768K江湖是什么,对于在象棋界厮杀的大钉来说,江湖就是一个矩阵,他的目标,就是在江湖之中骑着马,从他的位置出发,走到终点。当然,大钉的马也遵从中国象棋中的“马走日”的规则,而且在矩阵中,也会有一些障碍物,马不能跳到障碍物上;如果大钉的马面前有障碍物,即被“别马腿”,那么他将不能跳向有障碍物的左前和右前这两个方向。请问最少需要多少步,大钉才能骑着马跳到终点。输

2016-04-24 14:02:35 1021

原创 北京林业大学“计蒜客”杯程序设计竞赛 网络赛 A. 喝酒

王大钉喜欢喝酒,存货都喝完了,他就去楼下买,正好楼下的商店为了响应学校的 ACM 校赛推出了优惠活动:凡是在本店买的啤酒,喝完以后 33 个空瓶可以换一瓶,44 个瓶盖也可以换一瓶酒。王大钉觉得太合算了,决定多买,现在他手里的钱可以买 NN 瓶酒,但是他算不出来,通过活动兑换他一共可以喝到多少瓶?他很难过,你能帮他计算一下他能喝的酒的数量吗?输入格式:输入第一行是一个正整数 TT,代表

2016-04-24 13:36:15 995

原创 ZOJ 146 - The 13th Zhejiang Provincial Collegiate Programming Contest - C Defuse the Bomb

Defuse the BombTime Limit: 2 Seconds      Memory Limit: 65536 KBThe bomb is about to explode! Please defuse it as soon as possible!There is a display showing a number from 1 to 4 on the bomb

2016-04-23 14:16:28 926

原创 HDU 1241 Oil Deposits(DFS)

Oil DepositsTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 22278    Accepted Submission(s): 12839Problem DescriptionThe GeoSurv

2016-04-13 20:16:39 404

原创 HDU 1016 Prime Ring Problem

Prime Ring ProblemTime Limit: 4000/2000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 39784    Accepted Submission(s): 17541Problem DescriptionA rin

2016-04-13 19:28:13 524

原创 HDU 2612 Find a way (广搜,队列)

Find a wayTime Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 9040    Accepted Submission(s): 2897Problem DescriptionPass a year lea

2016-04-12 16:55:45 758

原创 POJ 2752 Seek the Name, Seek the Fame

Seek the Name, Seek the FameTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 15829 Accepted: 8038DescriptionThe little cat is so famous, that many couple

2016-04-11 17:26:17 443

原创 HDU 1556 Color the ball

Problem DescriptionN个气球排成一排,从左到右依次编号为1,2,3....N.每次给定2个整数a b(a Input每个测试实例第一行为一个整数N,(N 当N = 0,输入结束。Output每个测试实例输出一行,包括N个整数,第I个数代表第I个气球总共被涂色的次数。Sample Input31 12 23 33

2016-04-10 15:40:15 836

原创 BC-水题 jrMz and angles

Problem DescriptionjrMz has two types of angles, one type of angle is an interior angle of nn-sided regular polygon, and the other type of angle is an interior angle of mm-sided regular polygo

2016-04-09 20:25:51 736

原创 山东省第四届 A Rescue The Princess

题目描述    Several days ago, a beast caught a beautiful princess and the princess was put in prison. To rescue the princess, a prince who wanted to marry the princess set out immediately. Yet, th

2016-04-09 11:43:08 854

原创 HDU 1247 Hat’s Words

Problem DescriptionA hat’s word is a word in the dictionary that is the concatenation of exactly two other words in the dictionary.You are to find all the hat’s words in a dictionary.Input

2016-04-08 21:09:55 904

原创 HDU 1232 畅通工程

Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路? Input测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N ( 注意:

2016-04-08 19:32:34 346

原创 HDU 1342 Lotto

Problem DescriptionIn a Lotto I have ever played, one has to select 6 numbers from the set {1,2,...,49}. A popular strategy to play Lotto - although it doesn't increase your chance of winning - is

2016-04-07 21:11:54 520

原创 HDU 1257 最少拦截系统

Problem Description某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里

2016-04-07 20:33:21 357

原创 HDU 2693 Bone Collector II

Problem DescriptionThe title of this problem is familiar,isn't it?yeah,if you had took part in the "Rookie Cup" competition,you must have seem this title.If you haven't seen it before,it doesn't m

2016-04-07 13:22:08 507

原创 HDU 1087 Super Jumping! Jumping! Jumping!

Problem DescriptionNowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to

2016-04-06 21:04:57 273

原创 ZOJ 1079 Robotic Jigsaw

Statement of the ProblemYour task here is to write a program to aid in the assembly of a jigsaw puzzle by a robot.The puzzle is a rectangular array of flat four-sided pieces. Except for the outer

2016-04-06 12:42:28 577

转载 memory.h学记

memory.h学记1.介绍:功能:提供内存操作函数函数:extern void *memchr(const void *buffer, int ch, size_t count);extern void *memcpy();extern void *memset();extern int memcmp();2.函数介绍:1).memchr(co

2016-04-05 20:05:57 3961

原创 ZOJ 1002 Fire Net

ZOJ Problem Set - 1002Fire NetTime Limit: 2 Seconds      Memory Limit: 65536 KBSuppose that we have a square city with straight streets. A map of a city is a square board with n rows and n

2016-04-05 19:44:07 316

转载 next_permutation函数 字典序排列

原文地址http://blog.sina.com.cn/s/blog_9f7ea4390101101u.html这是一个求一个排序的下一个排列的函数,可以遍历全排列,要包含头文件下面是以前的笔记    与之完全相反的函数还有prev_permutation  (1) int 类型的next_permutation int main(){ int

2016-04-05 13:09:09 517

原创 HDU 1686 Oulipo

题目Problem DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book

2016-04-04 20:33:11 296

原创 ACM-水题 Beauty of Array

题目:DescriptionEdward has an array A with N integers. He defines the beauty of an array as the summation of all distinct integers in the array. Now Edward wants to know the summation of the

2016-04-03 16:21:05 1234

原创 ACM-水题 吃糖果

题目DescriptionHOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果都吃完?请你写个程序帮忙计算一下。  Input第一行有一个整数T,接下来

2016-04-03 14:35:53 539

原创 ACM-水题 Higher Math

题目DescriptionYou are building a house. You’d prefer if all the walls have a precise right angle relative to the ground, but you have no device to measure angles. A friend says he has a gre

2016-04-03 14:34:27 492

原创 ACM-水题 Demacia of the Ancients

题目DescriptionThere is a popular multiplayer online battle arena game called Demacia of the Ancients. There are lots of professional teams playing this game. A team will be approved a

2016-04-03 14:30:44 461

原创 ACM-水题 May Day Holiday

题目 DescriptionAs a university advocating self-learning and work-rest balance, Marjar University has so many days of rest, including holidays and weekends. Each weekend, which consists of Saturda

2016-04-02 16:58:01 767

原创 ACM-水题 Lunch Time

题目DescriptionThe 999th Zhejiang Provincial Collegiate Programming Contest will be held in Marjar University. The canteen of Marjar University is making preparations for this grand competit

2016-04-02 16:55:34 394

原创 ACM-水题 Ace of Aces

题目 There is a mysterious organization called Time-Space Administrative Bureau (TSAB) in the deep universe that we humans have not discovered yet. This year, the TSAB decided to elect an outsta

2016-04-02 16:53:41 599

原创 HDU 1166 敌兵布阵

题目敌兵布阵Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 38750    Accepted Submission(s): 16353Problem DescriptionC国的死对头A国这段时间正

2016-04-01 20:16:12 292

原创 POJ 2532 Star

题目DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars t

2016-04-01 19:15:52 531

原创 第五周 编程题

C#输入一个由若干字符组成的字符串,输出其中的大写字母、小写字母、数字和其他字符的个数。代码using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication1{ class Program

2016-04-01 16:34:05 401

原创 hdu 4513 吉哥系列故事――完美队形II(Manacher算法求回文串长度)

Manacher 算法:http://www.cnblogs.com/biyeymyhjob/archive/2012/10/04/2711527.htmlB - 吉哥系列故事――完美队形IITime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status

2015-11-19 20:17:54 410

原创 poj 1325 Machine Schedule(最大匹配,匈牙利算法)

#include #include #include using namespace std;int way[501][501],boy[501],girl[501];int k,m,n;bool findways(int x){ for (int i=1; i<=m; i++) { if(!girl[i]&&way[x][i])

2015-11-17 17:37:19 405

原创 poj 1422 Air Raid(最小路径覆盖)

#include #include #include using namespace std;int way[1001][1001],boy[1001],girl[1001];int m,n;bool findways(int x){ for (int i=1; i<=m; i++) { if(!girl[i]&&way[x][i]

2015-11-17 17:29:27 901

原创 poj 3041 Asteroids(二分图匹配匈牙利算法)

#include #include #include using namespace std;int way[501][501],boy[501],girl[501];int m,n;bool findways(int x){ for (int i=1; i<=m; i++) { if(!girl[i]&&way[x][i])

2015-11-17 17:22:31 381

原创 hdu 2063 过山车(基础二分图匹配匈牙利算法)

http://blog.csdn.net/dark_scope/article/details/8880547          趣写算法#include #include #include using namespace std;int way[501][501],boy[501],girl[501];int k,m,n;bool findways(int x

2015-11-17 17:15:55 410

论文MWEC支撑数据.zip

数据分析与知识发现期刊论文MWEC:一种基于多语义词向量的中文新词发现方法,论文支撑数据,包括: [1] 张乐,冷基栋,袁梦龙. Newworddiscovery_data.zip. 新浪产经、搜狐体育、马蜂窝旅游和网易云音乐网络文本数据121.9M [2] 张乐,冷基栋,袁梦龙. Random2000.zip. 新浪产经、搜狐体育、马蜂窝旅游和网易云音乐四个领域分别随机选取的2000条网络文本数据 [3] 张乐,冷基栋,袁梦龙. annotations.zip. 新浪产经、搜狐体育、马蜂窝旅游和网易云音乐四个领域分别随机选取的2000条网络文本数据的人工标注结果

2021-09-20

空空如也

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

TA关注的人

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