虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

2<b>08</b>

  • AVR单片机数码管秒表显示

    #include<iom16v.h> #include<macros.h> #define uint unsigned int #define uchar unsigned char uint a,b,c,d=0; void delay(c) { for for(a=0;a<c;a++) for(b=0;b<12;b++); }; uchar tab[]={ 0xc0,0xf9,0xa4,0xb0,0x99,0x92,0x82,0xf8,0x80,0x90,

    标签: AVR 单片机 数码管

    上传时间: 2013-10-21

    上传用户:13788529953

  • 源代码用动态规划算法计算序列关系个数 用关系"<"和"="将3个数a

    源代码\用动态规划算法计算序列关系个数 用关系"<"和"="将3个数a,b,c依次序排列时,有13种不同的序列关系: a=b=c,a=b<c,a<b=v,a<b<c,a<c<b a=c<b,b<a=c,b<a<c,b<c<a,b=c<a c<a=b,c<a<b,c<b<a 若要将n个数依序列,设计一个动态规划算法,计算出有多少种不同的序列关系, 要求算法只占用O(n),只耗时O(n*n).

    标签: lt 源代码 动态规划 序列

    上传时间: 2013-12-26

    上传用户:siguazgb

  • The government of a small but important country has decided that the alphabet needs to be streamline

    The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition

    标签: government streamline important alphabet

    上传时间: 2015-06-09

    上传用户:weixiao99

  • We have a group of N items (represented by integers from 1 to N), and we know that there is some tot

    We have a group of N items (represented by integers from 1 to N), and we know that there is some total order defined for these items. You may assume that no two elements will be equal (for all a, b: a<b or b<a). However, it is expensive to compare two items. Your task is to make a number of comparisons, and then output the sorted order. The cost of determining if a < b is given by the bth integer of element a of costs (space delimited), which is the same as the ath integer of element b. Naturally, you will be judged on the total cost of the comparisons you make before outputting the sorted order. If your order is incorrect, you will receive a 0. Otherwise, your score will be opt/cost, where opt is the best cost anyone has achieved and cost is the total cost of the comparisons you make (so your score for a test case will be between 0 and 1). Your score for the problem will simply be the sum of your scores for the individual test cases.

    标签: represented integers group items

    上传时间: 2016-01-17

    上传用户:jeffery

  • The XML Toolbox converts MATLAB data types (such as double, char, struct, complex, sparse, logical)

    The XML Toolbox converts MATLAB data types (such as double, char, struct, complex, sparse, logical) of any level of nesting to XML format and vice versa. For example, >> project.name = MyProject >> project.id = 1234 >> project.param.a = 3.1415 >> project.param.b = 42 becomes with str=xml_format(project, off ) "<project> <name>MyProject</name> <id>1234</id> <param> <a>3.1415</a> <b>42</b> </param> </project>" On the other hand, if an XML string XStr is given, this can be converted easily to a MATLAB data type or structure V with the command V=xml_parse(XStr).

    标签: converts Toolbox complex logical

    上传时间: 2016-02-12

    上传用户:a673761058

  • 离散实验 一个包的传递 用warshall

     实验源代码 //Warshall.cpp #include<stdio.h> void warshall(int k,int n) { int i , j, t; int temp[20][20]; for(int a=0;a<k;a++) { printf("请输入矩阵第%d 行元素:",a); for(int b=0;b<n;b++) { scanf ("%d",&temp[a][b]); } } for(i=0;i<k;i++){ for( j=0;j<k;j++){ if(temp[ j][i]==1) { for(t=0;t<n;t++) { temp[ j][t]=temp[i][t]||temp[ j][t]; } } } } printf("可传递闭包关系矩阵是:\n"); for(i=0;i<k;i++) { for( j=0;j<n;j++) { printf("%d", temp[i][ j]); } printf("\n"); } } void main() { printf("利用 Warshall 算法求二元关系的可传递闭包\n"); void warshall(int,int); int k , n; printf("请输入矩阵的行数 i: "); scanf("%d",&k); 四川大学实验报告 printf("请输入矩阵的列数 j: "); scanf("%d",&n); warshall(k,n); } 

    标签: warshall 离散 实验

    上传时间: 2016-06-27

    上传用户:梁雪文以

  • 道理特分解法

    #include "iostream" using namespace std; class Matrix { private: double** A; //矩阵A double *b; //向量b public: int size; Matrix(int ); ~Matrix(); friend double* Dooli(Matrix& ); void Input(); void Disp(); }; Matrix::Matrix(int x) { size=x; //为向量b分配空间并初始化为0 b=new double [x]; for(int j=0;j<x;j++) b[j]=0; //为向量A分配空间并初始化为0 A=new double* [x]; for(int i=0;i<x;i++) A[i]=new double [x]; for(int m=0;m<x;m++) for(int n=0;n<x;n++) A[m][n]=0; } Matrix::~Matrix() { cout<<"正在析构中~~~~"<<endl; delete b; for(int i=0;i<size;i++) delete A[i]; delete A; } void Matrix::Disp() { for(int i=0;i<size;i++) { for(int j=0;j<size;j++) cout<<A[i][j]<<" "; cout<<endl; } } void Matrix::Input() { cout<<"请输入A:"<<endl; for(int i=0;i<size;i++) for(int j=0;j<size;j++){ cout<<"第"<<i+1<<"行"<<"第"<<j+1<<"列:"<<endl; cin>>A[i][j]; } cout<<"请输入b:"<<endl; for(int j=0;j<size;j++){ cout<<"第"<<j+1<<"个:"<<endl; cin>>b[j]; } } double* Dooli(Matrix& A) { double *Xn=new double [A.size]; Matrix L(A.size),U(A.size); //分别求得U,L的第一行与第一列 for(int i=0;i<A.size;i++) U.A[0][i]=A.A[0][i]; for(int j=1;j<A.size;j++) L.A[j][0]=A.A[j][0]/U.A[0][0]; //分别求得U,L的第r行,第r列 double temp1=0,temp2=0; for(int r=1;r<A.size;r++){ //U for(int i=r;i<A.size;i++){ for(int k=0;k<r-1;k++) temp1=temp1+L.A[r][k]*U.A[k][i]; U.A[r][i]=A.A[r][i]-temp1; } //L for(int i=r+1;i<A.size;i++){ for(int k=0;k<r-1;k++) temp2=temp2+L.A[i][k]*U.A[k][r]; L.A[i][r]=(A.A[i][r]-temp2)/U.A[r][r]; } } cout<<"计算U得:"<<endl; U.Disp(); cout<<"计算L的:"<<endl; L.Disp(); double *Y=new double [A.size]; Y[0]=A.b[0]; for(int i=1;i<A.size;i++ ){ double temp3=0; for(int k=0;k<i-1;k++) temp3=temp3+L.A[i][k]*Y[k]; Y[i]=A.b[i]-temp3; } Xn[A.size-1]=Y[A.size-1]/U.A[A.size-1][A.size-1]; for(int i=A.size-1;i>=0;i--){ double temp4=0; for(int k=i+1;k<A.size;k++) temp4=temp4+U.A[i][k]*Xn[k]; Xn[i]=(Y[i]-temp4)/U.A[i][i]; } return Xn; } int main() { Matrix B(4); B.Input(); double *X; X=Dooli(B); cout<<"~~~~解得:"<<endl; for(int i=0;i<B.size;i++) cout<<"X["<<i<<"]:"<<X[i]<<" "; cout<<endl<<"呵呵呵呵呵"; return 0; } 

    标签: 道理特分解法

    上传时间: 2018-05-20

    上传用户:Aa123456789

  • VIP专区-电子产品老化相关标准资料

    资源包含以下内容:1.GBT2423.07-1995 电工电子产品环境试验第2部分 试验方法试验ec和导则倾跌与翻倒(主要用于设备型样品).pdf2.GBT2423.08-1995 电工电子产品环境试验第2部分 试验方法试验ed自由跌落.pdf3.GBT2423.09-2001 电工电子产品环境试验第2部分 试验方法试验cb设备用恒定湿热.pdf4.GBT2423.10-1995 电工电子产品环境试验第2部分 试验方法试验fc和导则振动(正弦).pdf5.GBT2423.11-1997 电工电子产品环境试验第2部分 试验方法试验fd宽频带随机振动--一般要求 .pdf6.GBT2423.12-1997 电工电子产品环境试验第2部分 试验方法试验fda宽频带随机振动--高再现性.pdf7.GBT2423.13-1997 电工电子产品环境试验第2部分 试验方法试验fdb宽频带随机振动中再现性.pdf8.GBT2423.14-1997 电工电子产品环境试验第2部分 试验方法试验fdc宽频带随机振动低再现性.pdf9.GBT2423.15-1995 电工电子产品环境试验第2部分 试验方法试验ga和导则稳态加速度.pdf10.GBT2423.16-1999 电工电子产品环境试验第2部分 试验方法试验j和导则长霉.pdf11.GBT2423.17-1993 电工电子产品基本环境试验规程试验ka 盐雾试验方法.pdf12.GBT2423.18-2000 电工电子产品环境试验第二部分 试验--试验kb 盐雾,交变(氯化钠溶液).pdf13.GBT2423.19-1981 电工电子产品基本环境试验规程试验kc 接触点和连接件的二氧化硫试验方法.pdf14.GBT2423.20-1981 电工电子产品基本环境试验规程试验kd 接触点和连接件的硫化氢试验方法.pdf15.GBT2423.21-1991 电工电子产品基本环境试验规程试验m 低气压试验方法.pdf16.GBT2423.22-2002 电工电子产品环境试验第2部分试验方法试验n 温度变化.pdf17.GBT2423.23-1995 电工电子产品环境试验试验q 密封.pdf18.GBT2423.24-1995 电工电子产品环境试验第二部分 试验方法试验sa 模拟地面上的太阳辐射.pdf19.GBT2423.25-1992 电工电子产品基本环境试验规程试验zam 低温低气压综合试验.pdf20.GBT2423.26-1992 电工电子产品基本环境试验规程试验zbm 高温低气压综合试验.pdf21.GBT2423.27-1981 电工电子产品基本环境试验规程试验zamd 低温低气压湿热连续综合试验方法.pdf22.GBT2423.28-1982 电工电子产品基本环境试验规程试验t 锡焊试验方法.pdf23.GBT2423.29-1999 电工电子产品环境试验第2部分试验方法试验u 引出端及整体安装件强度.pdf24.GBT2423.30-1999 电工电子产品环境试验第2部分试验方法试验xa 和导则在清洗剂中浸渍.pdf25.GBT2423.31-1985 电工电子产品基本环境试验规程倾斜和摇摆试验方法.pdf26.GBT2423.32-1985 电工电子产品基本环境试验规程润湿称量法可焊性试验方法.pdf27.GBT2423.33-1989 电工电子产品基本环境试验规程试验kca 高浓度二氧化硫试验方法.pdf28.GBT2423.34-1986 电工电子产品基本环境试验规程试验zad 温度湿度组合循环试验方法.pdf29.GBT2423.35-1986 电工电子产品基本环境试验规程试验zafc 散热和非散热试验样品的低温振动(正弦)综合试验方法.pdf30.GBT2423.36-1986 电工电子产品基本环境试验规程试验zbfc 散热和非散热样品的高温振动(正弦)综合试验方法.pdf31.GBT2423.37-1989 电工电子产品基本环境试验规程试验l砂尘试验方法.pdf32.GBT2423.38-1990 电工电子产品基本环境试验规程试验r 水试验方法.pdf33.GBT2423.39-1990 电工电子产品基本环境试验规程试验ee 弹跳试验方法.pdf34.GBT2423.40-1997 电工电子产品环境试验第2部分试验方法试验cx 未饱和高压蒸汽恒定湿热.pdf35.GBT2423.41-1994 电工电子产品基本环境试验规程风压试验方法.pdf36.GBT2423.42-1995 工电子产品环境试验低温低气压振动(正弦)综合试验方法.pdf37.GBT2423.43-1995 电工电子产品环境试验第二部分 试验方法元件、设备和其他产品在冲击,碰撞,振动,和稳态加速度,等动力学试验中的安装要求和导则.pdf38.GBT2423.44-1995 电工电子产品环境试验第二部分 试验方法试验eg 撞击弹簧锤.pdf39.GBT2423.45-1997 电工电子产品环境试验第2部分:试验方法试验zabdm:气候顺序.pdf40.GBT2423.46-1997 电工电子产品环境试验第2部分:试验方法试验ef:撞击摆锤.pdf41.GBT2423.47-1997 电工电子产品环境试验第2部分 试验方法试验fg 声振.pdf42.GBT2423.48-1997 电工电子产品环境试验第2部分 试验方法试验ff 振动--时间历程法.pdf43.GBT2423.49-1997 电工电子产品环境试验第2部分 试验方法试验fe 振动--正弦拍频法.pdf44.GBT2423.50-1999 电工电子产品环境试验第2部分 试验方法试验cy 恒定湿热主要用于元件的加速试验.pdf45.GBT2423.51-2000 电工电子产品环境试验第2部分 试验方法试验ke 流动混合气体腐蚀试验.pdf46.电子产品老化相关标准资料

    标签: 网站

    上传时间: 2013-04-15

    上传用户:eeworm

  • 天狼星 51单片机教程

    01引论篇.rar 02_51单片机简介.rar 03.C51基础.rar 04.搭建开发环境.rar 05.软件调试.rar 06.流水灯1.rar 07.流水灯2.rar 08蜂鸣器和继电器.rar 09.步进电机驱动.rar 10.数码管静态显示和动态显示.rar 11.8乘8LED点阵驱动.rar 12.独立按键检测.rar 13.矩阵键盘扫描检测.rar 14.外部中断的原理和应用.rar …………

    标签: LabVIEW part 01 高级编程

    上传时间: 2013-04-15

    上传用户:eeworm

  • 1.24位真彩色->256色灰度图。 2.预处理:中值滤波。 3.二值化:用一个初始阈值T对图像A进行二值化得到二值化图像B。 初始阈值T的确定方法是:选择阈值T=Gmax-(Gmax-G

    1.24位真彩色->256色灰度图。 2.预处理:中值滤波。 3.二值化:用一个初始阈值T对图像A进行二值化得到二值化图像B。 初始阈值T的确定方法是:选择阈值T=Gmax-(Gmax-Gmin)/3,Gmax和Gmin分别是最高、最低灰度值。 该阈值对不同牌照有一定的适应性,能够保证背景基本被置为0,以突出牌照区域。 4.削弱背景干扰。对图像B做简单的相邻像素灰度值相减,得到新的图像G,即Gi,j=|Pi,j-Pi,j-1|i=0,1,…,439 j=0,1,…,639Gi,0=Pi,0,左边缘直接赋值,不会影响整体效果。 5.用自定义模板进行中值滤波 区域灰度基本被赋值为0。考虑到文字是由许多短竖线组成,而背景噪声有一大部分是孤立噪声,用模板(1,1,1,1,1)T对G进行中值滤波,能够得到除掉了大部分干扰的图像C。 6.牌照搜索:利用水平投影法检测车牌水平位置,利用垂直投影法检测车牌垂直位置。 7.区域裁剪,截取车牌图像。

    标签: Gmax-G 1.24 Gmax 阈值

    上传时间: 2014-01-08

    上传用户:songrui