自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(163)
  • 资源 (1)
  • 收藏
  • 关注

原创 POJ 3294_

Life Forms Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 13157 Accepted: 3701 DescriptionYou may have wondered why most extraterrestrial life forms resemble humans, differin

2016-07-27 19:06:46 321

原创 HDU 5761_2016 Multi-University Training Contest 3

Rower BoTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 659 Accepted Submission(s): 210 Special JudgeProblem Description There is a rive

2016-07-27 04:57:08 358

原创 HDU 4431 Mahjong(天津赛区亚洲区) 模拟题,方法很重要

MahjongTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4797 Accepted Submission(s): 973Problem Description Japanese Mahjong is a four-playe

2016-07-25 19:33:08 448

原创 POJ 3415 Common Substrings ( 后缀数组+单调栈(那篇论文中的题目。多谢罗神给的的思路)

Common Substrings Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 9781 Accepted: 3222 DescriptionA substring of a string T is defined as:T(i, k)=TiTi+1…Ti+k-1, 1≤i≤i+k-1≤|T|. Gi

2016-07-25 11:02:11 553

原创 HDU 1298 T9(字典树的经典应用)

T9Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2615 Accepted Submission(s): 976Problem Description A while ago it was quite cumbersome t

2016-07-24 19:17:45 574

原创 POJ 3450--->Corporate Identity(后缀数组求多个字符串的公共子串)

http://poj.org/problem?id=3450这题大概就是给你一堆字符串找到这堆字符串的公共部分这题标准答案是kmp,我有一篇用KMP做的–》http://blog.csdn.net/my_stage/article/details/52004770必须感叹一下,即使有后缀数组这样的数据结构但在这道题上依然还是比不过Kmp算法,同样这题也是后缀数组的一个模板题,希望大家可以有所收获,首

2016-07-23 18:10:37 456

原创 POJ 3450 Corporate Identity(kmp求多个字符串的最长公共子串)

http://poj.org/problem?id=3450#include <stdio.h>#include <string.h>const int max_N=4001;const int max_l=201;int n;char res[max_l],dict[max_N][max_l];int nexts[max_N];int min(int a,int b){return a<

2016-07-23 15:50:41 731 3

原创 POJ 2774 Long Long Message (后缀数组求最长公共子串)

http://poj.org/problem?id=2774纪念下我后缀数组第二题,也是自己不看题解A的后缀数组第一题题意就是给你两个很长的字符串之后求最长公共子串的长度。套用的是那篇后缀数组论文里的模板,之后因为要求两个串的最长公共子串,要把两个串连在一起,中间用一个不会出现的字符链接。我是把两个串转换成 s[i]-‘a’+1的形式之后以0为连接符号。之后套模板求出SA 和 height数组。之

2016-07-23 12:03:46 354

原创 2016 Multi-University Training Contest 2 HDU 5744 Keep On Movin

Keep On MovinTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 76 Accepted Submission(s): 68Problem Description Professor Zhang has kinds of

2016-07-21 19:40:07 379

原创 2016 Multi-University Training Contest 2 1009 It's All In The Mind

http://acm.hdu.edu.cn/contests/contest_showproblem.php?pid=1009&cid=705#include<iostream>#include<cstdio>#include<cstring>#include<cmath>#include<algorithm>using namespace std;const double Pi = a

2016-07-21 19:18:14 286

原创 HDU 2016 Multi-University Training Contest 2 1001

AcperienceTime Limit: 4000/2000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 132 Accepted Submission(s): 61Problem Description Deep neural networks (DNN) have

2016-07-21 19:01:30 436

原创 Codeforces Round #363 (Div. 2)

B. One Bomb time limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output You are given a description of a depot. It is a rectangular checkered field of

2016-07-20 09:59:53 268

原创 POJ 1017 Packets

题目 http://poj.org/problem?id=1017大致题意: 一个工厂制造的产品形状都是长方体盒子,它们的高度都是 h,长和宽都相等,一共有六个型号,分别为1*1, 2*2, 3*3, 4*4, 5*5, 6*6。 这些产品通常使用一个 6*6*h 的长方体箱子包装然后邮寄给客户。因为邮费很贵,所以工厂要想方设法的减小每个订单运送时的箱子数量BoxNum。解题思路: 由于盒

2016-07-20 09:56:47 400

原创 POJ 1677 Girls' Day

大模拟。。。。。。。。。#include<stdio.h>#include<string.h>#include<iostream>using namespace std;char girl[8][256];int gx[8];char wish[32][256];char beautiful[]="beautiful";char pretty[]="pretty";char lov

2016-07-17 16:22:50 512

原创 HDU 1107 武林(大模拟)

http://acm.hdu.edu.cn/showproblem.php?pid=1107模拟题,不说啥了,心碎了。一下午就扣这一题了。原因是 题意没给明白,只有不懂门派中有2人站在同一点上才会发生战斗!!!!!#include <stdio.h>#include <string.h>#include <algorithm>using namespace std;int maps[13]

2016-07-17 16:20:50 1906 1

原创 理工Oj 1341 Who will be punished

Who will be punished Time Limit: 1000 MS Memory Limit: 32767 K Total Submit: 559(93 users) Total Accepted: 208(80 users) Rating: Special Judge: No Description This time,suddenly,teacher Li wa

2016-06-30 08:52:49 533

原创 HDU 2846 字典树变形

RepositoryTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 4079 Accepted Submission(s): 1456Problem Description When you go shopping, you ca

2016-06-30 08:47:26 432

原创 HDU 4825 Xor Sum

http://acm.hdu.edu.cn/showproblem.php?pid=4825 字典树的经典问题—->求异或最大值题意大概是这样的,给你n个数让你存起来,之后每一次输入一个数num。(执行m次) 把num的值和之前的n个数的进行异或,要求输出能使其异或后数值最大的那个数字。因为最大不超过32位,所以我先把输入的n个数字转换为字符串,变为34位,用0补位。之后每次输入的时候也把num

2016-06-22 08:13:36 487

原创 HDU 1075字典树(水题)

传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1075就是先给你一些单词的翻译,之后再给你一句话然你翻译一下。字典树可以做,map也可以做。#include <stdio.h>#include <iostream>#include <string.h>#include <algorithm>#include <string>using name

2016-06-21 13:47:54 394

原创 HDU 1761—简单的字典树,需要释放内存

Phone ListTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 17037 Accepted Submission(s): 5737Problem Description Given a list of phone numbe

2016-06-20 17:18:12 557

原创 HDU 4763—Theme Section

http://acm.hdu.edu.cn/showproblem.php?pid=4763直接上KMP的代码,过后会把EX_KMP 的方法写出来之后再补上代码。#include <iostream>#include <string>#include <algorithm>#include <string.h>#define maxs 1000005using namespace std;

2016-06-11 23:24:40 328

原创 POJ 1011

Sticks Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 135722 Accepted: 31924 DescriptionGeorge took sticks of the same length and cut them randomly until all parts became at m

2016-05-24 21:43:01 520

原创 HDU 4333

B - Revolving Digits Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u SubmitStatusPracticeHDU 4333 Appoint description: Description One day Silence is interested in re

2016-05-10 21:53:16 908

转载 ZOJ 3870 本篇文章转载自——白羊_baiyang

原文链接:http://blog.csdn.net/qq_33184171/article/details/51183322B - Team Formation Time Limit:3000MS Memory Limit:131072KB 64bit IO Format:%lld & %llu SubmitStatusPracticeZOJ 3870 Description

2016-04-19 21:16:46 426

原创 POJ 3080 Blue jeanes

传送门 :http://poj.org/problem?id=3080 Blue JeansTime Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u SubmitStatusPracticePOJ 3080 Description The Genog

2016-04-13 13:04:18 540 1

原创 POJ 2406 Power Strings

POJ 2406 G - Power Strings Time Limit:3000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u SubmitStatusPracticePOJ 2406 Description Given two strings a and b we define a*b to be their

2016-04-13 12:54:26 433

原创 HUST 1010 The Minimum Length

KMP

2016-04-13 12:51:38 275

原创 HDU 1358 Period

HDU 1358 Period

2016-04-12 21:53:47 280

原创 POJ 2752

http://poj.org/problem?id=2752Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 15797 Accepted: 8020 DescriptionThe little cat is so famous, that ma

2016-04-07 12:52:17 340

原创 HDU 3746 Cyclic Nacklace (非常有意义的题目)

Cyclic NacklaceTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5475 Accepted Submission(s): 2472Problem Description CC always becomes very

2016-04-07 12:46:33 1422

原创 HDU 2087___kmp 字符串匹配

传送门:http://acm.hdu.edu.cn/showproblem.php?pid=2087剪花布条Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 14294 Accepted Submission(s): 9044Prob

2016-04-07 12:38:59 415

原创 HDU 1686

传送门:http://acm.hdu.edu.cn/showproblem.php?pid=1686OulipoTime Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 9226 Accepted Submission(s): 3718Pro

2016-04-07 12:35:29 405

原创 HDU 1711

KMP

2016-04-07 12:32:33 391

原创 FZU 2102 Solve equation

http://acm.fzu.edu.cn/problem.php?pid=2102一道看起来特别牛逼但是却很简单的题。给你一个等式A=K*B+d,给你A,B,C,C为当前进制数,让你求出满足等式的k与D.(k,d) 看似有进制转换跟着,但并不难,K为A/B(转换为10进制之后),d=A%B 之后就都懂了 。 `include include include include define

2016-04-02 08:14:24 392

原创 HDU 1874 畅通工程续

畅通工程续Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 40454 Accepted Submission(s): 14964Problem Description 某省自从实行了很多年的畅通工程计划后,终于修建了很多路。不过路

2016-03-15 08:34:16 371

原创 POJ 2492 A Bug is life

施法中…………………………………………………………………. …………………………………………………………………………… peng! 一道传送门: http://poj.org/problem?id=2492这题是类似于POJ1182食物链同样类型的,加权并查集。 可以先做这道题,之后在做1182—http://poj.org/

2016-03-13 15:40:55 438

原创 HDU 1076

An Easy TaskTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 3795 Accepted Submission(s): 2177Problem Description Ignatius was born in a leap year

2016-03-11 21:03:47 438

原创 POJ 1182 食物链

走你:http://poj.org/problem?id=1182详情写在代码里了。有疑问请评论#include <stdio.h>#include <algorithm>#include <string.h>#define MAXN 50010using namespace std;int r[MAXN],k,lie,f[MAXN],n;void init(){ int i

2016-03-11 13:00:54 953

原创 POJ 2236 Wireless Network

题目: A - Wireless Network Time Limit:10000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u SubmitStatus Description An earthquake takes place in Southeast Asia. The ACM (Asia Cooperate

2016-03-11 12:58:43 405

原创 哈理工OJ 1286迷宫宝藏(这个bfs有点意思)

飞机票带你看题: http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=1286//这里的代码是我之前A的,大家参考一下思路即可,这个题目的关键在于不用标记是否到达过的点,可以重复去走#include <stdio.h>#include <string.h>#include <algorithm>#i

2016-03-08 17:07:49 721

空空如也

空空如也

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

TA关注的人

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