自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

江东小熊熊

我大概已经是一头废熊了~

  • 博客(148)
  • 资源 (2)
  • 收藏
  • 关注

原创 Windows编程 消息以及窗口程序

消息程序:#include <windows.h>#include "stdafx.h"int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow){ MessageBox (NULL, TEX...

2018-10-30 18:25:45 518 1

原创 使用CreateProcess()创建进程

#include <iostream>#include <windows.h>using namespace std; int main(int argc, char* argv[]){ STARTUPINFO si = { sizeof(si) }; PROCESS_INFORMATION pi; si.dwFlags = STARTF_USESHO...

2018-10-30 18:13:19 12675

原创 LeetCode 209. Minimum Size Subarray Sum

题目描述Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which the sum ≥ s. If there isn't one, return 0 instead.Example: Input: s = 7, n...

2018-07-08 19:20:54 204

原创 LeetCode 345. Reverse Vowels of a String

题目描述Write a function that takes a string as input and reverse only the vowels of a string.Example 1:Given s = "hello", return "holle".Example 2:Given s = "leetcode", return "leotcede".Note:The vowels ...

2018-07-08 14:44:49 179

原创 LeetCode 344. Reverse String

题目描述 Write a function that takes a string as input and returns the string reversed.Example:Given s = "hello", return "olleh".代码实现class Solution {public: string reverseString(string s) { r...

2018-07-08 13:41:18 136

原创 LeetCode 125. Valid Palindrome

问题描述Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.Note: For the purpose of this problem, we define empty string as valid palindrome.Examp...

2018-07-08 13:30:55 170

原创 LeetCode 88. Merge Sorted Array

题目描述Given two sorted integer arrays nums1 and nums2, merge nums2 into nums1 as one sorted array.Note:The number of elements initialized in nums1 and nums2 are m and n respectively.You may assume that ...

2018-07-06 20:08:10 128

原创 LeetCode 80. Remove Duplicates from Sorted Array II

问题描述Follow up for “Remove Duplicates”: What if duplicates are allowed at most twice? For example, Given sorted array nums = [1,1,1,2,2,3], Your function should return length = 5, with the first five e...

2018-07-06 19:29:00 120

原创 LeetCode 26. Remove Duplicates from Sorted Array

题目描述Given a sorted array, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this by modifying...

2018-07-06 19:08:03 134

原创 LeetCode 27.Remove Element

题目描述Given an array and a value, remove all instances of that value in-place and return the new length. Do not allocate extra space for another array, you must do this by modifying the input array in-p...

2018-07-06 18:27:56 94

原创 汇编语言 求出首地址为DATA的100字数组的最小偶数,并把它存放在AX中

datas segment data dw 1,2,3,4,5datas ends codes segment main proc far ...

2018-07-06 15:48:36 5487

原创 LeetCode 283.Move Zeroes

题目描述Given an array nums, write a function to move all 0’s to the end of it while maintaining the relative order of the non-zero elements. For example, given nums = [0, 1, 0, 3, 12], after calling your...

2018-07-06 15:46:41 90

原创 汇编语言 将20个数据的数组分成两组,正数数组P和负数数组N,并分别显示两个数组的个数

data segment array dw 1,2,3,-4,5,-6,7,-8 data endsext segment pdata dw 8 dup(?) ndata dw 8 dup(?) a db 30h b db 30hext ends code segmentassume cs:code,ds:data,es:extstart: ...

2018-05-03 17:06:44 6281 3

原创 汇编语言 给出一组数 (例如20个数), 按照从小到大的顺序排序

assume ds:data data segment a dw 1,4,2,5,7,9,6,3 data ends code segment start: mov ax,data mov ds,ax mov cx,8 dec cx lop1: push cx ...

2018-05-03 17:05:36 11934 3

原创 汇编语言 输入一个字符或数字,放到指定寄存器AH中,并显示该数字

data segment char db '?'data endsstack segment db 128 dup ('?')stack ends assume cs:code,ds:data,ss:stackcode segmentstart: mov ax,data mov ds,ax mov ah,0 ;进行输入 ...

2018-05-03 17:04:42 10470

原创 汇编语言 位操作指令、控制转移指令、系统调用显示功能练习

1. 给出一个数,例如 37H或68H,请将此数显示在屏幕上。2. 给定三个无符号数(字或字节),求出最大值,并将最大值存入MAX单元,并在屏幕上显示。3. 上述三个数改为带符号的数第一题data segment pkey db "press any key...$"endsstack segment dw 128 dup(0)endscode segme...

2018-05-03 17:02:34 976

原创 汇编语言 将数据区BUF1中的10个数,传送到数据区BUF2中并计算BUF1数据的累加和

data segment buf1 db '0123456789' data ends ext segment buf2 db 10 dup(0) ext endsassume cs:code,ds:data,es:ext code segment start: mov ax,data mov ds,ax;源址 mov ax,ex...

2018-05-03 16:55:59 7837

原创 线性插值 二次插值 拉格郎日插值

#include<iostream>#include<cmath>using namespace std;void Linear_interpolation(double *x, double *y, double input);//分段线性插值void Quadratic_interpolation(double *x,double *y,double u);/...

2018-05-03 16:51:32 2653

原创 列主元消元法

#include<iostream>#include<cmath>using namespace std;#define N 4void display(double(*a)[N], double *b){ for(int i=0;i<N;i++) { for(int j=0;j<N;j++) { cout<<a[i][j...

2018-05-03 16:49:01 2454 1

原创 顺序消元法

#include<iostream>using namespace std;#define N 4int main(){ double a[N][N]={ {1.1348, 3.8326, 1.1651, 3.4017}, {0.5301, 1.7875, 2.5330, 1.5435}, {3.4129, 4.9317, 8.7643, 1.3142}, {...

2018-05-03 16:48:25 2193

原创 迭代法

#include<iostream>#include"math.h"using namespace std;int main(){ double x=0.5; double sum; do{ x=(2-exp(x))/10; sum=exp(x)+10*x-2; } while(sum>0.5*pow(10.0,-3)); cout<<x&...

2018-05-03 16:46:11 1100

原创 二分法

#include<iostream>#include"math.h"using namespace std;int main(){ double left=0; double right=1; double x; double value; do{ x=(left+right)/2; value=exp(x)+10*x-2; if(value>0)...

2018-05-03 16:45:32 138

原创 汇编语言(王爽第三版)实验12编写0号中断的处理程序

assume cs:codecode segment start:mov ax,cs mov ds,ax mov si,offset do0 mov ax,0 mov es,ax mov di,200h mov cx,offset do0end-offset do0 ...

2018-05-03 16:40:21 576

原创 汇编语言(王爽 第三版)实验11 编写子程序

assume cs:code data segment db "Beginner's All-purpose Symbolic Instruction Code.",0 db 50 dup(0) data ends code segment begin:mov ax,data mov ds,ax ...

2018-05-03 16:39:50 1985

原创 汇编语言(王爽 第三版)实验10 编写子程序

一. 子程序:显示字符串 实验要求:在屏幕的8行3列,用绿色显示data段中的字符串。 名称:show_str 功能:在指定的位置,用指定的颜色,显示一个用0结束的字符串。 参数:(dh)=行号(0-24取值范围);(dl)=列号(0-79取值范围);(cl)=颜色(是一个二进制排列组合的值);ds:si指向字符串的首地址。assume ...

2018-05-03 16:38:37 2155 1

原创 汇编语言(王爽第三版)实验9根据材料编程

assume es:data,ss:stack,cs:datadata segment db 'welcome to masm!' db 02h,24h,71hdata endsstack segment db 10 dup(0) stack endscode segmentstart: ;初始化data数据段 mov ax,data...

2018-03-24 15:17:22 386

原创 汇编语言(王爽第三版)实验7寻址方式在结构化数据访问中的应用

assume ds:data,es:table,cs:codedata segment db '1975','1976','1977','1978','1979','1980','1981','1982','1983' db '1984','1985','1986','1987','1988','1989','1990','1991','1992' db '1...

2018-03-24 12:16:58 725 1

原创 多项式加法的实现(链表版)

/*作业内容:利用C++标准模板库的list实现多项式加法,可参考课本(P526-533)求以下两个多项式的和:F(x)=8x7+7x4+3x2+5 G(x)=9x6+2x5+5x4+x+2作业要求: 1. 要求采用类的设计思路; 2. 要求采用多文件的方式,包括类的头文件(.h文件), 类的实现文件(.cpp文件)和main函数文件(.cpp);*///-

2017-12-08 23:17:29 2531

原创 进度条的实现(读取文本文件)

/*05文本文件计算并求和编写一个程序读取一个文本文件(格式如附录),将每个变量的值取出来,计算并输出其总和。要求如下: ① 文本文件(test.txt)以参数形式输入,如 G:/java MyJava 05test.txt ② 要求显示计算进度,例如:"当前正在计算变量V2...2/10",其中的10表示共有10条记录,2表示当前计算到第2条

2017-12-05 19:58:19 2312 1

原创 链表的相关操作(3)

/* 给定两个数组A1和B1: 1)将A1和B1中的数据导入链表中,形成链表A2和B2,并打印各自链表元素; 2)将链表A2和B2中的元素各自排序(从大到小),形成链表A3和B3,并打印各自链表元素。 3)合并链表A3,B3,合并后的链表C的元素从大到小排列,并打印链表C。*//*11. 导入函数错误;扣2分; 有较小问题,扣1分;12. 排序函数错误;扣2分; 有较小

2017-11-22 02:13:58 846

转载 正则表达式30分钟入门教程

转自:https://deerchao.net/tutorials/regex/regex.htm首页 | 常用正则表达式 | 正则表达式测试工具正则表达式30分钟入门教程版本:v2.33 (2013-1-10) 作者:deerchao 转载请注明来源目录跳过目录本文目标如何使用本教程正则表达式到底是什么东西?入门测试正则表达式元字符

2017-11-20 18:09:13 172

原创 字符串统计

//04字符串统计//从键盘输入字符串(或者从硬盘中读入文本文件),要求: //(1)统计26个字母每个字母开头的单词数; //(2)统计单词中含“or”字符串的单词数; //(3)统计长度为3的单词数。import java.io.*;//导入io包public class Statistics{//定义一个统计(Statistics)类 static String strLine

2017-11-20 00:16:20 627

原创 链表的相关操作(2)

/* 给定两个数组A1和B1: 1)将A1和B1中的数据导入链表中,形成链表A2和B2,并打印各自链表元素; 2)将链表A2和B2中的元素各自排序(从大到小),形成链表A3和B3,并打印各自链表元素。 3)合并链表A3,B3,合并后的链表C的元素从大到小排列,并打印链表C。*///-----------------------LinkedList.h------------

2017-11-10 19:29:13 920

原创 链表的相关操作

/*(1)编写一个算法判断链表中的数据项是否按从大到小排序,该链表的第一个节点由first指向。 (2)对于给定的整数n,编写一个算法把节点插入到链表中第n个节点之后的位置, 该链表的第一个节点由first指向。 (3)编写一个算法来颠倒一个链表,该链表的第一个节点由first指向。 不要复制列表元素:而是重置链表和指针,使得first指针指向原来的最后一个节点,

2017-11-09 16:39:19 1148

原创 素数判断

public class PrimeNum { //定义一个PrimeNum类 public static boolean isprime(int prime) //定义一个判断是否是素数的方法 { for(int j=2;j*j<=prime;j++) if(prime%j==0) //判断是否整除j return

2017-11-09 00:29:36 319

原创 回文数判断

import java.util.Scanner; //导入Scanner类public class PalindromicNumber { //定义PalindromicNumber类 static int num; //定义一个静态整型变量num public static void main(String args[])//主方法 { Scanne

2017-11-08 19:46:51 266

原创 数字与英文单词的转换

import java.util.Scanner;//导入一个Scanner包public class Conversion { //---------------------------------------------定义变量------------------------------------------------------ static String x[]={"zer

2017-11-04 16:39:23 2911

原创 Linked List的相关操作

//--------------------------Linked_List----------------------------//类声明typedef int ElementType;class List{private: class Node { public: ElementType data; Node *next; Node(ElementType va

2017-10-28 19:27:26 239

转载 KMP算法

#include #include #include using namespace std; void getNext(const string &substr, vector &next) { next.clear(); next.resize(substr.size()); int j = -1; next[0] =

2017-10-28 12:01:52 215

转载 从头到尾彻底理解KMP

从头到尾彻底理解KMP1. 引言    本KMP原文最初写于2年多前的2011年12月,因当时初次接触KMP,思路混乱导致写也写得非常混乱,如此,留言也是“骂声”一片。所以一直想找机会重新写下KMP,但苦于一直以来对KMP的理解始终不够,故才迟迟没有修改本文。    然近期因在北京开了个算法班,专门讲解数据结构、面试、算法,才再次仔细回顾了这个KMP,在综合了一

2017-10-28 08:52:14 211

浙工大C++通关考模拟题代码

zjut.oj上的模拟题代码,极具参考价值

2017-07-26

空空如也

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

TA关注的人

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