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

同步<b>测</b>频法

  • 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

  • 汉诺塔!!! Simulate the movement of the Towers of Hanoi puzzle Bonus is possible for using animation

    汉诺塔!!! Simulate the movement of the Towers of Hanoi puzzle Bonus is possible for using animation eg. if n = 2 A→B A→C B→C if n = 3 A→C A→B C→B A→C B→A B→C A→C

    标签: the animation Simulate movement

    上传时间: 2017-02-11

    上传用户:waizhang

  • 将魔王的语言抽象为人类的语言:魔王语言由以下两种规则由人的语言逐步抽象上去的:α-〉β1β2β3…βm ;θδ1δ2…-〉θδnθδn-1…θδ1 设大写字母表示魔王的语言

    将魔王的语言抽象为人类的语言:魔王语言由以下两种规则由人的语言逐步抽象上去的:α-〉β1β2β3…βm ;θδ1δ2…-〉θδnθδn-1…θδ1 设大写字母表示魔王的语言,小写字母表示人的语言B-〉tAdA,A-〉sae,eg:B(ehnxgz)B解释为tsaedsaeezegexenehetsaedsae对应的话是:“天上一只鹅地上一只鹅鹅追鹅赶鹅下鹅蛋鹅恨鹅天上一只鹅地上一只鹅”。(t-天d-地s-上a-一只e-鹅z-追g-赶x-下n-蛋h-恨)

    标签: 语言 抽象 字母

    上传时间: 2013-12-19

    上传用户:aix008

  • 本代码为编码开关代码

    本代码为编码开关代码,编码开关也就是数字音响中的 360度旋转的数字音量以及显示器上用的(单键飞梭开 关)等类似鼠标滚轮的手动计数输入设备。 我使用的编码开关为5个引脚的,其中2个引脚为按下 转轮开关(也就相当于鼠标中键)。另外3个引脚用来 检测旋转方向以及旋转步数的检测端。引脚分别为a,b,c b接地a,c分别接到P2.0和P2.1口并分别接两个10K上拉 电阻,并且a,c需要分别对地接一个104的电容,否则 因为编码开关的触点抖动会引起轻微误动作。本程序不 使用定时器,不占用中断,不使用延时代码,并对每个 细分步数进行判断,避免一切误动作,性能超级稳定。 我使用的编码器是APLS的EC11B可以参照附件的时序图 编码器控制流水灯最能说明问题,下面是以一段流水 灯来演示。

    标签: 代码 编码开关

    上传时间: 2017-07-03

    上传用户:gaojiao1999

  • 【问题描述】 在一个N*N的点阵中

    【问题描述】 在一个N*N的点阵中,如N=4,你现在站在(1,1),出口在(4,4)。你可以通过上、下、左、右四种移动方法,在迷宫内行走,但是同一个位置不可以访问两次,亦不可以越界。表格最上面的一行加黑数字A[1..4]分别表示迷宫第I列中需要访问并仅可以访问的格子数。右边一行加下划线数字B[1..4]则表示迷宫第I行需要访问并仅可以访问的格子数。如图中带括号红色数字就是一条符合条件的路线。 给定N,A[1..N] B[1..N]。输出一条符合条件的路线,若无解,输出NO ANSWER。(使用U,D,L,R分别表示上、下、左、右。) 2 2 1 2 (4,4) 1 (2,3) (3,3) (4,3) 3 (1,2) (2,2) 2 (1,1) 1 【输入格式】 第一行是数m (n < 6 )。第二行有n个数,表示a[1]..a[n]。第三行有n个数,表示b[1]..b[n]。 【输出格式】 仅有一行。若有解则输出一条可行路线,否则输出“NO ANSWER”。

    标签: 点阵

    上传时间: 2014-06-21

    上传用户:llandlu

  • 离散实验 一个包的传递 用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

  • 本文用VHDL在CPLD器件上实现一种8 b数字频率计测频系统

    本文用VHDL在CPLD器件上实现一种8 b数字频率计测频系统,能够用十进制数码显示被测信号的频率,不仅能够测量正弦波、方波和三角波等信号的频率,而且还能对其他多种物理量进行测量。具有体积小、可靠性高、功耗低的特点。

    标签: VHDL CPLD 器件 数字频率计

    上传时间: 2013-12-18

    上传用户:sy_jiadeyi