自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(31)
  • 收藏
  • 关注

原创 高斯消元法

高斯消元法C语言实现。代码已经通过洛谷高斯消元模板题AC验证了

2022-12-17 10:57:35 523 1

原创 [信息论]LZW编解码的实现(基于C++&Matlab实现)

HEU信息论程序设计作业之信息论

2022-09-19 10:37:47 1381 1

原创 [信息论]信道容量迭代算法程序设计(基于C++&Matlab实现)

HEU信息论程序设计作业

2022-09-19 10:24:04 2227

原创 声呐直线阵正交混频实验(HEU信息与信号处理创新实践项目一)

HEU水声工程学院信息与信号处理创新实践任务一

2022-09-18 18:22:49 666

原创 HEU大三数字电路综合实验--简易数字频率计

HEU水声学院大三上数电综合实验

2022-09-10 16:04:00 2535 1

原创 ARM汇编实现全排列

C Codes#include<bits/stdc++.h>using namespace std;int a[10];int b[10];void dfs(int k){ if (k>5){ for (int i=1; i<=5; i++) cout<<a[i]<<' '; cout<<'\n'; } else{ for (int i=1; i<=5; i++){ if (!b[i]){ b[

2021-12-14 15:11:24 578

原创 2021电赛A题:信号失真度测量装置

元件清单TIVA C Series:TM4C123G LaunchPadNokia 5110 LCDLM358电阻、电容和杜邦线若干系统总方案设计首先,先将信号发生器输出的信号通过直流偏置电路抬高到 0V 以上,然后再经过截止频率为 10.67kHz 的一阶 RC 低通滤波器,消除信号中的高频噪声,以防在 FFT 分析中出现混叠。然后,将处理过的信号通过TM4C123GH6PMI 的片内 ADC,通过定时器溢出周期的配置以实现 10240Hz 的采样率抽样,得到 512 点采样序列。

2021-12-08 13:44:04 11235 3

原创 S3C2440A汇编实现流水灯

硬件4个LED灯对应GPB5GPB6GPB7GPB8GPIO低电平输出点亮软件延时死循环,调整寄存器r2的值GPBCON5,6,7,8管脚配置为输出模式(01),其他随意。GPBUP全部配置为1,不使用上拉功能GPBDAT每一位对应输出电平,此处0为点亮,配置方法如下:(1<<IO)xor(0x1ff)(1<<IO) xor (0x1ff)(1<<IO)xor(0x1ff)5<=IO<=85<=IO<=8

2021-12-01 22:20:23 1014 1

原创 HEU大三数字电路组合逻辑实验--自动售货机

实验平台DE1-SOC 实验套件(Cyclone V)功能描述支持投入1元或五元(PIN_AD10与PINAC9表示)选择完要投入的面额时,可以使用按键控制投入的量(PIN_AA14)通过模式选择键选择浏览模式或者购买模式(PIN_AD12)投入钱数不够时,数码管显示EEEE投入钱数够时,显示找零结果,并点亮LED0提示交易完成Codesmodule vending(clk,clk_500hz,item,inc,rst,mode,ok,yen1,yen5,seg1,seg2,seg

2021-11-30 12:43:53 924

原创 Keil MDK5下用ARM指令集汇编实现冒泡排序与选择排序

冒泡排序C语言代码实现#include<bits/stdc++.h>using namespace std;int main(){ int a[5]; int n=5; for (int i=0; i<n; i++) cin>>a[i]; for (int i=0; i<n-1; i++) for (int j=0; j<n-1-i; j++){ if (a[j]>a[j+1]) swap(a[j],a[j+1]);

2021-11-01 16:51:20 3974 1

原创 C++实现FFT频谱分析

原理找一本数字信号处理的书,把DFT的原理耐心看一遍就能明白所有前置知识的概念,比如什么是W(N,nk),为什么要把实数序列拓展到复数域上,不要看xxx博文的介绍。FFT就是DFT的一种快速实现算法,DFT复杂度O(n2n^2n2),FFT可以把复杂度降到O(nlognnlognnlogn)。FFT分为基2 时间抽取法与基2 频率抽取法,本文介绍的是时间抽取法。FFT的实现步骤主要分为三步将原序列扩展到复数域上,然后进行序数重排(元素的交换)归一化蝶形系数按照M级分解的顺序从左到右逐级进行蝶形运

2021-10-23 21:59:51 5587 5

原创 基于STM32的高精度超声波模块HC-SR04测距

准备材料超声波模块 HC−SR04HC-SR04HC−SR04STM32F103RCT6(Mini板)超声波模块原理分析引脚功能VCC接5VGND接开发板GNDTrig接外部PWM信号输入Echo输出整形过的方波信号性能指标精度:3mm3mm3mm测距范围:2cm2cm2cm至4m4m4m原理给TrigTrigTrig引脚输入一个10us10us10us以上的高电平信号,此时模块会发出超声波,并从EchoEchoEcho引脚输出5V5

2021-10-04 17:21:45 3413 2

原创 HEU大二数电组合逻辑电路设计实验

h1 {border-bottom: none}h2 {border-bottom: none}h3 {border-bottom: none}Contents1 实验目的2 实验仪器3 子任务3.1 四人表决器实验原理实验步骤具体实现问题解决3.2 多用户呼叫器实验原理实验步骤具体实现问题解决3.3 数值比较器实验原理实验步骤具体实现问题解决4 心得体会1 实验目的利用 VerilogVerilogVerilog 硬件描述语言

2021-07-03 11:40:25 4590 1

原创 HEU大二数电时序逻辑电路设计实验

Contents1 实验目的2 实验仪器3 子任务3.1 消抖电路实验原理实验步骤具体实现问题解决3.2 简易篮球比赛计分器实验原理实验步骤具体实现问题解决4 结论心得1 实验目的掌握时序逻辑电路的一般设计方法。掌握消抖电路的设计方法。通过 VerilogVerilogVerilog 语言实现一个简单篮球记分器。2 实验仪器FPGAFPGAFPGA 开发板 DE1−SoCDE1-SoCDE1−SoC,如图所示。3 子任务3.1 消抖电.

2021-07-02 23:20:24 3053 3

原创 A*与IDA*算法学习笔记

A*简介A*搜索算法(英文:A*search algorithm,A*读作 A-star),简称 A*算法,是一种在图形平面上,对于有多个节点的路径求出最低通过成本的算法。它属于图遍历(英文:Graph traversal)和最佳优先搜索算法(英文:Best-first search),亦是 BFS 的改进。定义起点 sss ,终点 ttt ,从起点(初始状态)开始的距离函数 g(x)g(x)g(x),到终点 (最终状态)的距离函数 h(x)h(x)h(x) , h′(x)h'(x)h′(x)

2021-01-25 22:21:12 530

转载 Codeforces1453B题解

Code#include<bits/stdc++.h>#define ll long longusing namespace std;ll abss(ll a){ if (a<0) return -a; return a;}ll maxx(ll a,ll b){ if (a>b) return a; return b;}int main(){ int n; ll a[200005]; ll x,y,ans; i.

2020-12-05 10:08:09 231

原创 24点游戏(啊啊啊其实是因为写1145141919论证器写自闭了)

简述写这个是因为最初的时候想模仿着写个1145141919论证器,但在放一堆括号优先级的时候写崩了,想不到好思路。然后去洛谷上刷了算24点(绿题)想找找思路(因为24点也有个插入括号优先级的操作),没想到题解竟然全是括号优先级全排列…真就直接硬打表呗。然后我的1145141919论证器就暂时退化成了24点计算器(笑)。200行左右,可做C语言大作业(笑)思路分析24点游戏大概就是给你四个数字,然后让你通过自定义加减乘除顺序和运算顺序来凑到24。我的方法总体是全排列(数字)套全排列(运算符)套全排列

2020-11-08 22:20:43 704 1

原创 Codeforces 1422C题解

题目C. Bargaintime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSometimes it is not easy to come to an agreement in a bargain. Right now Sasha and Vova can’t come to an agreement: Sasha names a price a

2020-10-05 21:53:59 402

原创 Codeforces1426D题解

问题描述D. Non-zero Segmentstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputKolya got an integer array a1,a2,…,an. The array can contain both positive and negative integers, but Kolya doesn’t like 0,

2020-09-30 17:05:13 322

原创 Codeforces1401D题解

题目描述D. Maximum Distributed Treetime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a tree that consists of n nodes. You should label each of its n−1 edges with an integer in such way tha

2020-08-23 11:30:26 367

原创 Codeforces 1398C

问题描述C. Good Subarraystime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an array a1,a2,…,an consisting of integers from 0 to 9. A subarray al,al+1,al+2,…,ar−1,ar is good if the sum of e

2020-08-15 01:30:09 285

原创 Codeforces1399D题解

题面D. Binary String To Subsequencestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a binary string s consisting of n zeros and ones.Your task is to divide the given string into the m

2020-08-06 11:10:19 321

转载 Codeforces 1388D题解

问题描述D. Captain Flint and Treasuretime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputCaptain Fint is involved in another treasure hunt, but have found only one strange problem. The problem may be conn

2020-07-31 11:34:48 388

翻译 Codeforces 1379A题解

A. Acacius and Stringtime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputAcacius is studying strings theory. Today he came with the following problem.You are given a string s of length n consisting of

2020-07-21 17:24:22 941 2

原创 ALDS1_4_D:搜索的应用---计算最优解(二分法的应用)

题面You are given n packages of wi kg from a belt conveyor in order (i=0,1,…n−1). You should load all packages onto k trucks which have the common maximum load P. Each truck can load consecutive packages (more than or equals to zero) from the belt conveyor

2020-07-20 18:00:50 473

翻译 Codeforces 1385D题解

题目描述D. a-Good Stringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a string s[1…n] consisting of lowercase Latin letters. It is guaranteed that n=2k for some integer k≥0.The string

2020-07-18 13:01:24 441

原创 希尔排序(shell sort)学习笔记

什么是希尔排序一种进阶版的插入排序,不稳定(因为多次插入了),适合大范围顺序不是太乱的数据排序(这点跟插入有点像)首先先引入插入排序:插入排序这是一种稳定的排序算法(因为每次排序时只是把其他元素进行平移,相等大小的元素们的相对位置并没有改变)。实现方法就像整理扑克牌一样,将第i张牌与前i-1张牌面额逐个比较,如果找到最前面的那个大于第i张牌面额的牌的位置p,则先将从p开始到i-1的所有牌的位置后移一格,然后将这第i张牌插入到p位置,从第一张牌开始整理,到第n张牌结束,如此重复操作,最终实现排序。

2020-07-15 19:03:50 177

原创 树莓派USB2.0免驱动摄像头Device or resource busy问题解决

上周在玩树莓派的时候,搞那个USB2.0的免驱摄像头,因为还没学opencv嘛,所以按照网上的方法弄了fswebcam和motion两种工具来测试摄像头,可能是操作失误吧,就搞出了下面这个错误`pi@raspberrypi:~ $ fswebcam --no-banner -r 640x480 p1.jpg--- Opening /dev/video0...Trying source module v4l2.../dev/video0 opened.No input was specified,

2020-07-13 23:18:33 2653 4

原创 大一C语言大作业--扫雷雷

写在前面这篇文章并没有什么特别的地方,可以说是很烂大街的一个选题了。写的目的呢只是想把大作业留个纪念(说不定n年后再看这段代码会觉得自己写了一坨屎233)说实话,其实当时选题的时候就有点偷懒了,学校给的那15个样例大作业我不怎么感兴趣(因为说白了就是过去oi里普及-的大模拟/高精度算法),本来自己想完善一下高中写的那个人机五子棋的,emmmm但算法思路一直想不出一个更好的(现在看来高中写的那个东西太shit了233),所以我再次选择了扫雷这个经典大作业作为我第一个用C++写的超过200行的程序。以下正

2020-07-13 14:35:33 12781 10

翻译 Codeforces1372B题解

题目:B. Omkar and Last Class of Mathtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn Omkar’s last class of math, he learned about the least common multiple, or LCM. LCM(a,b) is the smallest positiv

2020-07-13 01:54:27 284

翻译 Codeforces 1375C题解

Codeforces 1375C题解题目描述You are given an array a of length n, which initially is a permutation of numbers from 1 to n. In one operation, you can choose an index i (1≤i<n) such that ai<ai+1, and remove either ai or ai+1 from the array (after the remov

2020-07-09 18:58:36 733

空空如也

空空如也

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

TA关注的人

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