自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 web移动开发问题录

做移动开发已有2个月,来总结下一些常见问题meta<!-- 加上这个meta标签,可以让网页宽度自适应手机屏幕宽度width=device-width:宽度是设备屏幕宽度initial-scale=1:初始缩放比例1.0maximum-scale=1: 最小缩放比例user-scalable=no:不允许用户点击屏幕放大浏览--><meta name="viewport" conten

2017-11-15 18:16:22 428

原创 css命名规范

开发当中,经常为css命名发愁;现来整理下css命名和书写规范:命名关键词:分类、缩写、前缀选择器必须以某前缀开头:以 .g- .m- .c- .js-为前缀,然后加上有语义的缩写 前缀 说明 示例 g-(global) 全局,修改后影响全局 g-mod m- (module) 模块 m-list m-detail c-(component) 组件 m-

2017-11-15 16:16:42 706

原创 移动端判断设备

移动端判断设备

2017-11-15 11:20:53 461

原创 ural 1306 堆排序找中位数

题目要求找到一个数组的中位数要是直接排序然后找到中位数的话,肯定是超内存的选择堆排序,用STL中的make_heap, pop_heap, push_heap代码如下:#include #include #include #include #include using namespace std;int main() { int N, half, i; int t

2013-12-05 19:10:12 1431

原创 逆转向迭代器

ural 1100把1 216 311 220 33 526 47 122 4变成3 526 422 416 320 31 211 27 1也就是b相同的话就按顺序输出,否者按照b大的在前面用map和vector的话,里面的元素默认是按照从小到大排的,这时候就需要用到转逆向迭代器元素在map中的存在方式[5]((1,[

2013-12-04 19:31:55 865

原创 UVA 12447-两个二进制只有一位不一样

D - Pieces and BitsTime Limit:1000MS     Memory Limit:0KB     64bit IO Format:%lld & %lluSubmit Status Practice UVA 12447DescriptionProblem D: Pieces and BitsGiven an even in

2013-10-03 20:25:10 1227

原创 N个点求最大的四边形面积

codeforces 340B Maximal Area Quadrilateral(叉积)参考博客:http://www.cnblogs.com/zstu-abc/archive/2013/08/31/3293327.html题意:平面上n个点(n分析:1、第一思路是枚举四个点,以O(n4)的算法妥妥超时。2、以下思路源自官方题解  以

2013-08-31 20:59:01 4134

原创 hdu 1004-统计出现次数最多的字符串

Let the Balloon RiseTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 58628    Accepted Submission(s): 21533Problem DescriptionCon

2013-08-22 22:57:09 1101

原创 杭电多校联赛<9>

1005EBCDICTime Limit: 2000/2000 MS (Java/Others)    Memory Limit: 102400/102400 K (Java/Others)Total Submission(s): 51    Accepted Submission(s): 10Problem DescriptionA mad scien

2013-08-20 19:43:21 1045

原创 kmp匹配算法

参考博客:http://www.ruanyifeng.com/blog/2013/05/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm.html假设我想知道"BBCABCDAB ABCDABCDABDE"这个字符串里面能否找到"ABCDABD"接下去我们用kmp算法完成任务:(1). 首先字符串:"BBCABCDAB ABCDABCDABD

2013-08-10 16:33:32 870

原创 codefores-335B-求最长的回文序列

B. Palindrometime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputGiven a string s, determine if it contains an

2013-08-09 09:45:57 1048

原创 杭电第五场多校联系-整数划分-五边形定理

记录一下。五边形定理很强大,这题数据要求100000,用dp肯定是超时的。代码:#include #include #include using namespace std;#define LL long longLL p[100005];int T,n,t;int main() { p[0] = 1; p[1] = 1; p[2] = 2; for (

2013-08-08 18:59:15 1009

原创 整数划分

求n表示成1到n 有几种和的表示方法例如:4 = 4            4 = 3 + 1            4 = 2 + 2            4 = 2 + 1 + 1            4 = 1 + 1 + 1 + 1用m表示划分成几个数相加那么:根据n和m的关系,考虑以下几种情况:(1) 当n=1时,不论m的值为多少(m>0),只有一种划

2013-08-07 21:28:26 671

原创 poj 1014 - 多重背包

关键词:  01背包,多重背包的二进制拆分#include #include #include #include #define MAX 300010using namespace std;int num[MAX];int cou,sum;void add(int k, int value) { //多重背包的二进制拆分 for(int i = 0; ; i++

2013-08-04 15:43:32 621

原创 POJ 1308-判断是不是一棵树

B - Is It A Tree?Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 1308DescriptionA tree is a well-known data structure tha

2013-07-23 10:30:35 906

原创 poj 1201 -Intervals

DescriptionYou are given n closed, integer intervals [ai, bi] and n integers c1, ..., cn. Write a program that: reads the number of intervals, their end points and integers c1, ..., cn from th

2013-07-22 15:49:08 788

原创 poj 1716-Integer Intervals

Integer IntervalsTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 11884 Accepted: 5017DescriptionAn integer interval [a,b], a Write a program that: f

2013-07-22 15:10:08 769

原创 poj 3159-Candies

CandiesTime Limit: 1500MS Memory Limit: 131072KTotal Submissions: 20430 Accepted: 5412DescriptionDuring the kindergarten days, flymouse was the monitor of his

2013-07-22 12:49:54 1604

原创 poj 2406

下面的文章来自于http://www.ruanyifeng.com/blog/2013/05/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm.html字符串匹配是计算机的基本任务之一。举例来说,有一个字符串"BBC ABCDAB ABCDABCDABDE",我想知道,里面是否包含另一个字符串"ABCDABD"?许

2013-07-21 10:02:28 730

原创 hdu 1520-树形DP

A - Anniversary partyTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionThere is going to be a party to celebrate the 80-th Anniver

2013-07-18 14:47:22 3324

原创 poj 2506-计算方格摆放的方法数

D - TilingTime Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit StatusDescriptionIn how many ways can you tile a 2xn rectangle by 2x1 or 2x2 tiles?

2013-06-12 19:29:37 1093

原创 zoj 计算子矩阵的平方和

做这个题目有点技巧,要算一个矩阵内元素的平方,然后相加,一般的做法超时,此时我们先把一小块一小块的矩阵的平方和算好,保存下来,然后直接求和就好了H - Evaluate Matrix SumTime Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%lld & %lluSubmit Status Pra

2013-06-04 17:06:02 1095

原创 算一个日期是星期几

F - What day is itTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 2133DescriptionToday is Saturday, 17th Nov,2007. Now, if

2013-05-30 00:55:30 828

原创 最近题目基础练习

1、计算一个数在不同的进制下的阶乘的位数阶乘位数的公式:log(xy) = log(x) + log(y), 所以100的阶乘:log(1) + log(2) + ....log(100)最后转化成不同的进制:最后除以log(base)后 +1 就好了(base指的是进制)需要注意的是,开数组的时候要开double,否则是错的代码:double a[1000005] = {0}

2013-05-21 12:21:11 560

原创 乘法与位数

题目意思:给你一个数,然后转化成相应进制的数,算出阶乘以后,求阶乘的位数阶乘的位数我们这么来算:例如1000的阶乘log10(1) + log10(2) + ...+log10(1000) 取整后加1然后转化成进制的话就是: 除以log10(base) 后加1题目:A - Digits of FactorialTime Limit:2000MS     Memo

2013-05-18 23:44:33 798

原创 1到n打乱,求交换次数

、B - Old SortingTime Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%lld & %lluSubmit StatusDescriptionGiven an array containing a permutation of 1 to n, you have to f

2013-05-18 20:34:01 1306

原创 对于输入字符串数组的处理,三维数组

DescriptionDo you know password table? A password table is used to protect the security of the online account. When a user needs to login to his/her online account or pay for money, he/she may nee

2013-05-16 15:53:14 4149

原创 判断一个字符是不是数字

判断一个字符是不是数字,也就是从字符串中提取字符串通过isdigit()函数来运算:其功能的实现见代码:#include #include #include #include #include #include #include #include using namespace std;string str;int main () { while (cin >

2013-05-12 10:18:55 1060

原创 UVA 10006

题目意思:快速幂求摸。。。。G - Carmichael NumbersTime Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %lluSubmit Status Practice UVA 10006Description  Carmi

2013-05-12 09:04:01 1494

原创 UVA-10008统计单词的数量

题目意思:统计给出的 单词的数量,要求从小到大排列并输出分析:结构体进行排列是比较方便的I - What's Cryptanalysis?Time Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %lluSubmit Status Practice UVA 10008

2013-05-12 08:41:51 1803

原创 UVA 10000 -Longest Paths-Bellman - Ford,flody,spfa

\A - Longest PathsTime Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %lluSubmit Status Practice UVA 10000Description  Longest Paths

2013-05-11 18:05:02 1464

原创 CodeForces 102A - flody

I - ClothesTime Limit:2000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64uSubmit Status Practice CodeForces 102ADescriptionA little boy Gerald entered a clothes sho

2013-05-11 17:49:48 802

原创 ZOJ 3693-进位

H - Happy Great BGTime Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%lld & %lluSubmit Status Practice ZOJ 3693DescriptionThe summer training of ZJU ICPC in July is abo

2013-05-11 10:31:43 1382

原创 poj 3332-判断字符串是否合法

C - Parsing Real NumbersTime Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 3332DescriptionWrite a program that read a line o

2013-05-11 10:03:13 1577

原创 poj-3628-Bookshelf 2

题目意思:有个书架,高度为H,现在FJ有N个奶牛,每个奶牛有个高度hi,现在将奶牛堆起来,使得堆起来的高度大于等于H,现在要求最小高度差。B - Bookshelf 2Time Limit:1000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64uSubmit Status Prac

2013-05-11 09:19:08 862

原创 poj 3602-字符串模拟

D - Typographical LigaturesTime Limit:1000MS     Memory Limit:131072KB     64bit IO Format:%I64d & %I64uSubmit Status Practice POJ 3602DescriptionTypesetting involves the prese

2013-05-11 08:58:32 1153

原创 字符串处理string

- Children's GameTime Limit:3000MS     Memory Limit:0KB     64bit IO Format:%lld & %lluSubmit StatusDescription4th IIUC Inter-University Programming Contest, 2005

2013-05-01 15:32:33 767

原创 poj 3070-Fibonacci-矩阵幂乘

FibonacciTime Limit: 1000msMemory Limit: 65536KBThis problem will be judged on PKU. Original ID: 307064-bit integer IO format: %lld      Java class name: MainPrev Submit Status Sta

2013-04-30 19:40:47 1688

原创 poj 3164-最小树形图

参考博文:http://www.cnblogs.com/nanke/archive/2012/04/11/2441725.htmlF - Command NetworkTime Limit:1000MS     Memory Limit:131072KB     64bit IO Format:%I64d & %I64uSubmit Status Practic

2013-04-29 10:40:19 697

原创 poj 1422 - 最小路径覆盖

题意:一个地图上有n个小镇,以及连接着其中两个小镇的有向边,而且这些边无法形成回路。现在选择一些小镇空降士兵(1个小镇最多1个士兵),士兵能沿着边走到尽头,问最少空降几个士兵,能遍历完所有的小镇。最小路径覆盖问题,因为是有向图,就可以把一条路径拆成起点和终点,从而建立二分图最小路径覆盖 = 节点数 - 最大匹配数G - Air RaidTime Limit:

2013-04-28 23:52:39 1625

经典动态规划

关于动态规划的详细介绍,分类以及一些经典的例题。相信你看过以后会大有收获

2012-10-24

空空如也

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

TA关注的人

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