自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

algzjh的博客

Keep Calm and Carry On

  • 博客(68)
  • 资源 (6)
  • 收藏
  • 关注

转载 维数灾难

动态规划问题的维数即指的是各阶段上状态变量的维数。当状态变量的维数增加时,动态规划问题的计算量会呈指数倍增长,限制了人们用动态规划研究问题和解决问题的能力。 解决动态规划中的维数灾难的思想:降维,即通过一些特殊技巧或算法把一个高维的动态规划问题逐步分解为一些低维的动态规划问题,以此来减轻维数灾难。

2017-06-30 16:03:57 2188

原创 CF818B-Permutation Game

B. Permutation Gametime limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output n children are standing in a circle and playing a game. Children’s number

2017-06-30 02:03:59 1109

原创 CF818A-Diplomas and Certificates

A. Diplomas and Certificatestime limit per test1 second memory limit per test256 megabytes inputstandard input outputstandard output There are n students who have taken part in an olympiad. Now it’

2017-06-30 01:58:52 548

原创 todolist(jQuery实现)

index-jQuery.html<!DOCTYPE html><html lang="en"><head> <meta charset="utf-8"> <title>todo list</title> <link href="static/bootstrap.min.css" rel="stylesheet"></head><body> <div cla

2017-06-29 21:23:57 4149 1

原创 URAL1325-Dirt

Dirt— Hello, may I speak to Petrov, please? Hello, my darling… You know, there was a little accident at our home… No, no, don’t worry, your computer was not damaged. It is only a bit dirty there now. W

2017-06-29 19:40:24 505

原创 POJ3465-Battle

BattleYou’re Zhu Rengong, a formidable hero. After a number of challenging missions, you are finally facing the final Boss – a black dragon called Heilong. Due to his overwhelming power, you have to pl

2017-06-29 18:13:49 410

原创 UVA11802-All Your Bases Belong to Us

All Your Bases Belong to UsIt is very easy to find number of trailing zero in n! for a particular base b. In this problem you have to do the reverse. You have to find for how many bases b, n! has k t

2017-06-29 17:58:10 428

原创 CF820B-Mister B and Angle in Polygon

B. Mister B and Angle in Polygontime limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output On one quiet day all of sudden Mister B decided to draw ang

2017-06-28 04:36:37 1155

原创 CF820A-Mister B and Book Reading

A. Mister B and Book Readingtime limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Mister B once received a gift: it was a book about aliens, whic

2017-06-28 03:53:37 855

原创 LeetCode-104. Maximum Depth of Binary Tree

Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node./** * Definiti

2017-06-27 22:06:08 541

原创 LeetCode-94. Binary Tree Inorder Traversal

Binary Tree Inorder TraversalGiven a binary tree, return the inorder traversal of its nodes’ values.For example: Given binary tree [1,null,2,3], 1 \ 2 / 3 return [1,3,2].Note:

2017-06-27 21:59:56 498

原创 LeetCode-2. Add Two Numbers

Add Two NumbersYou are given two non-empty linked lists representing two non-negative integers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two number

2017-06-27 21:42:49 462

原创 LeetCode-206. Reverse Linked List

Reverse Linked ListReverse a singly linked list./** * Definition for singly-linked list. * function ListNode(val) { * this.val = val; * this.next = null; * } *//** * @param {ListNode} h

2017-06-27 21:26:34 471

原创 LeetCode-1. Two Sum

Two SumGiven an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would have exactly one solution, and you may not use the s

2017-06-27 20:40:18 441

原创 Python3学习笔记-基本数据类型

1、Python可以同时为多个变量赋值,如a, b = 1, 2。 2、一个变量可以通过赋值指向不同类型的对象。 3、数值的除法(/)总是返回一个浮点数,要获取整数使用//操作符。 4、在混合计算时,Python会把整型转换成为浮点数。 5、Python中的字符串用单引号(‘)或双引号(“)括起来,同时使用反斜杠()转义特殊字符。 6、Python 字符串不能被改变。向一个索引位置赋值,比

2017-06-26 21:52:31 475

原创 CF821B-Okabe and Banana Trees

B. Okabe and Banana Treestime limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Okabe needs bananas for one of his experiments for some strange re

2017-06-26 20:38:23 1216

原创 CF821A-Okabe and Future Gadget Laboratory

A. Okabe and Future Gadget Laboratorytime limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Okabe needs to renovate the Future Gadget Laboratory a

2017-06-26 20:31:31 659

原创 汇编-求和

data segment array dw 1,2,3,4 sum dw ?data endscode segment assume cs:code,ds:datastart: mov ax,data mov ds,ax ;--------------- mov cx,4 mov ax,0LP: add ax,[bx] inc bx loop LP

2017-06-23 17:24:11 3411

原创 汇编-十六进制转二进制输出

data segment binval dw 0B39hdata endscode segment assume cs:code,ds:datastart: mov ax,data mov ds,ax ;--------------- mov bx,binval mov cx,16LP1: rol bx,1 mov dl,0 adc dl,30h m

2017-06-23 16:37:50 5924

原创 汇编-字符串判回文

data segment str db 'abcdefgtegfedcba' len equ $-str msg1 db 'Yes$' msg2 db 'No$'data endscode segment assume cs:code,ds:datastart: mov ax,data mov ds,ax ;--------------- mov bx,off

2017-06-23 16:26:45 2531

原创 汇编-字符串小写转大写

data segment org 1000h buffer db 'hello ASM!zjh20170623' strlen equ $-buffer org 2000h outstr db strlen dup(?) db '$'data endscode segment assume cs:code,ds:datastart: mov ax,data m

2017-06-23 16:08:00 1102

原创 汇编-冒泡排序

data segment a dw 1,4,6,7,9,0,3,5data endscode segment assume cs:code,ds:datastart: mov ax,data mov ds,ax mov cx,8 dec cxLP1: push cx mov dx,0 mov si,0LP2: mov bp,a[si] cmp bp

2017-06-23 15:54:17 542

原创 汇编-将数据区的字符串逆序输出

data segmentstr db 'Hello World!','$'data endscode segment assume cs:code,ds:datamain proc far mov ax,data mov ds,ax lea si,str mov cx,0LP1: cmp byte ptr [si],'$' je output inc si

2017-06-23 15:28:20 2005

原创 汇编-将输入的字符串逆序输出

data segment crlf db 0dh,0ah,'$'data endscode segment assume cs:code,ds:datastart: mov ax,data mov ds,ax ;--------------- mov cx,0input: mov ah,01h int 21h cmp al,0dh jz output

2017-06-23 13:43:57 4742

原创 汇编-十六进制输入输出

data segment ASCII db 30h,31h,32h,33h,34h,35h db 36h,37h,38h,39h ;0~9的ASCII码 db 41h,42h,43h,44h,45h,46h ;A~F的ASCII码 hex db 06h,0fh,0eh,08h ;任意设定一个待转换的一位16进制数data endscode segment

2017-06-23 11:39:56 3119

原创 汇编-十进制输入输出

data segmentinfo1 db 0dh,0ah,'input a decimal number:$'info2 db 0dh,0ah,'output a decimal number:$'data endscode segment assume cs:code,ds:datamain proc far call decibin call binidec call

2017-06-23 10:18:07 4644

原创 汇编-统计字符串中大写字母的个数(小于10个)

data segment String db 'Hello The World!' String2 db '$' x1 db 0 x2 db 0 x3 db 0 x4 db 0data endscode segmentassume cs:code,ds:datastart: mov ax,data mov ds,

2017-06-23 09:50:23 3899

原创 汇编-判断素数

data segment Val dw 100 msg1 db 'Yes$' msg2 db 'No$' data ends code segment assume cs:code,ds:data start: mov ax,data mov ds,ax mov bx,Val call judge

2017-06-23 07:00:42 3422

原创 汇编-输入小写字母用大写字母显示

START: MOV AH,1INT 21HCMP AL,'a'JB RET1CMP AL,'z'JA RET1SUB AL,20HMOV DL,ALMOV AH,2INT 21HJMP STARTRET1: RET

2017-06-22 16:37:38 1670

原创 COJ1229-压缩文件

1229: 压缩文件Submit Page Summary Time Limit: 1 Sec Memory Limit: 128 Mb Submitted: 100 Solved: 50 Description Staginner得知gestapolur的y570上有《使命召唤8》时,便决定copy到自己的本子上亲自过把瘾,但无奈《使命召唤8》如果压缩成一

2017-06-20 17:02:27 424

原创 棋盘覆盖问题(分治)

#include<iostream>#include<string>#include<cstdio>#include<algorithm>#include<cstring>using namespace std;const int MAXN=105;int cnt;int mat[MAXN][MAXN];void chessBoard(int tr,int tc,int dr,int

2017-06-20 11:14:23 524

原创 POJ1664-放苹果

放苹果Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 34012 Accepted: 21038 Description把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。 Input第一行是测试数据的数目t(0 <=

2017-06-19 10:10:36 295

原创 整数划分问题

q(n,m)q(n,m):最大加数不大于m的n的划分数#include<iostream>#include<string>#include<algorithm>#include<cstring>using namespace std;const int MAXN=1e5;int n;int q(int n,int m)//最大加数不大于m{ if((n==1)||(m==1))

2017-06-19 10:08:44 312

原创 全排列的递归与非递归写法

递归#include<iostream>#include<string>#include<cstring>using namespace std;const int MAXN=1e5;char arr[MAXN];int cnt;void permutation(int k,int m){ if(k==m-1) { cout<<"the "<<++cnt

2017-06-19 09:21:29 576

原创 算法优化策略

1、最大子段和问题 2、最大子矩阵和问题 3、最大m子段和问题 4、动态规划加速原理 利用四边形不等式性质 (1)货物存储问题 5、问题的算法特征 (1)贪心策略(货物储运问题) 相同层序定理:存在货物储运问题的最优合并树,其各原始结点在最优合并树种所处的层序与相应的原始结点在相容合并树中所处的层序相同。 算法三部曲: 组合、标记层序、重组 数据结构:可并优先队列(左偏树)

2017-06-18 21:45:31 2410

原创 近似算法

1、顶点覆盖问题的近似算法 2、旅行售货员问题近似算法 (1)具有三角不等式性质的旅行售货员问题 (2)一般的旅行售货员问题 3、集合覆盖问题的近似算法 4、子集和问题的近似算法

2017-06-18 21:33:40 1305

原创 NP完全性理论

1、计算模型 (1)随机存取机RAM (2)随机存取存储程序机RASP (3)图灵机 2、问题变换与计算复杂性归约 3、非确定性图灵机 4、Cook定理:布尔表达式的可满足问题SAT是NP完全的。 5、一些典型的NP完全问题 (1)合取范式的可满足性问题 (2)3元合取范式的可满足性问题 (3)团问题 (4)顶点覆盖问题 (5)子集和问题 (6)哈密顿回路问题 (7)旅行

2017-06-18 21:29:54 589

原创 概率算法

1、随机数 2、数值概率算法 (1)用随机投点法计算π值 (2)用平均值法计算定积分 (3)解非线性方程组 3、舍伍德算法 (1)线性时间选择算法 (2)跳跃表 4、拉斯维加斯算法 (1)n皇后问题 (2)整数因子分解 5、蒙特卡罗算法 (1)主元素问题 (2)素数测试

2017-06-18 21:19:49 670

原创 分支限界法

1、单源最短路径问题 2、装载问题 3、布线问题 4、0-1背包问题 5、最大团问题 6、旅行售货员问题 7、电路板排列问题 8、批处理作业调度

2017-06-18 21:04:49 785

原创 回溯法

1、递归回溯 2、迭代回溯 3、子集树与排列树 4、装载问题 5、批处理作业调度 6、符号三角形问题 7、n皇后问题 8、0-1背包问题 9、最大团问题 10、图的m着色问题 11、旅行售货员问题 12、圆排列问题 13、电路板排列问题 14、连续邮资问题

2017-06-18 21:01:28 409

数独问题的0-1整数规划模型

数独问题的0-1整数规划模型

2017-01-19

旅行商问题的0-1整数规划模型及算法

旅行商问题的0-1整数规划模型及算法

2017-01-19

中南大学本科毕业设计样式表

中南大学本科毕业设计样式表

2017-01-12

2016年中南校队选拔赛第二场解题报告

2016中南校队选拔赛第二场解题报告,一共八道题,时间:2016.8.24.

2016-08-25

2016中南校队选拔赛第一场解题报告.pptx

2016中南校队选拔赛第一场解题报告,一共八道题,时间:2016.8.23.

2016-08-23

空空如也

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

TA关注的人

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