高斯列主元消去法,计算方法实现,已编译通过。使用例子 3x1+2x2+2x3+3x4=2.5 5x1+2x2+3x3+4x4=2.5 2x1+2x2+x3+2x4=2 3x1+x2+3x3+2x4=1.5 输入N=4,A={3 2 2 3 5 2 3 4 2 2 1 2 3 1 3 2},B={2.5 2.5 2 1.5}
标签: 高斯
上传时间: 2015-12-23
上传用户:yan2267246
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
古典密码中,主要的思想为移位算法及置换算法。 1.移位密码 密钥K为整数,且取值空间为0到25;加密函数:x = x + k (mod 26);解密函数:x = x - k (mod 26)。当K=3时,为凯撒密码。 2.仿射密码 密钥对由a、b组成,整数a满足 gcd(a, 26) = 1,整数b的取值空间为0到25;加密函数:x = ax + b(mod 26);解密函数:x = a*y - a*b (mod 26)。当a=1,b=3时,为凯撒密码。 3.维吉尼亚密码 首先确定密钥长度(本例中密钥只采取个位数字,所以取决于输入密钥的长度),然后输入满足这个长度的向量;加密:取明文第一个字母并将之移k1位,这里k1=1,第二个字母移k2位,k2=2,一旦到了密钥末尾,又从头开始。 4.换位密码 首先确定密钥长度,输入长度为5的0到4的整数序列,将明文分成每5个字母一组,每组字母按照密钥进行换位。
标签: 密码
上传时间: 2016-02-09
上传用户:jqy_china
图的深度遍历,输出结果为(红色为键盘输入的数据,权值都置为1): 输入顶点数和弧数:8 9 输入8个顶点. 输入顶点0:a 输入顶点1:b 输入顶点2:c 输入顶点3:d 输入顶点4:e 输入顶点5:f 输入顶点6:g 输入顶点7:h 输入9条弧. 输入弧0:a b 1 输入弧1:b d 1 输入弧2:b e 1 输入弧3:d h 1 输入弧4:e h 1 输入弧5:a c 1 输入弧6:c f 1 输入弧7:c g 1 输入弧8:f g 1 深度优先遍历: a b d h e c f g 程序结束.
标签:
上传时间: 2016-04-04
上传用户:lht618
学生选修课程管理系统的设计与实现 目 录 一、需求分析 2 1.1系统简要分析 2 1.2 应用需求分析 2 二、概要设计 4 2.1业务流分析 4 2.2数据流分析 4 2.3程序数据流程分析及流程设计 4 2.4数据字典 7 2.5系统数据模型设计 8 2.5.1 E-R图 8 2.5.2数据库建表 9 三、详细设计 11 3.1登陆模块的设计与功能实现:界面设计如下: 11 3.2系统管理 11 3.2.1系统管理菜单 11 3.2.2用户管理窗口 12 3.3管理员操作 12 3.4学生信息界面设计与功能实现 13 3.5课程信息界面设计与功能的设计 17 3.6选课界面设计与功能实现 18 四、调试分析和小结 20 五、参考文献 23
上传时间: 2016-08-08
上传用户:edisonfather
One dimensional wavelet transform s input data from file dataIn.txt h[] : -1 0 1 2 g[] : 1 1 0 3 c[] : 1 4 2 5 4 6 7 8
标签: dimensional transform wavelet dataIn
上传时间: 2016-08-24
上传用户:gaojiao1999
3. 约瑟夫环问题。设编号为1,2,…,n(n>0)个人按顺时针方向围坐一圈。开始时任意给出一个报数上限值m,从第一个人开始顺时针方向自1起顺序报数,报到m时停止报数,报m的人出列,从他在顺时针方向上的下一个人起重新自1起顺序报数;报到m的人出列;如此下去,直到所有人全部出列为止。用带头结点的单循环链表作数据元素的存储结构。 数据输入: 第一行为人数n。 第二行为报数值m。 数据输出: 依次输出出列人员的编号。 示例: 输入文件input3.txt: 4 3 4 1 3 2 输出:(标准输出) 3 2 4 1
上传时间: 2014-01-31
上传用户:zm7516678
网上购物电子商务系统论文 目 录 第一章 引言. ...1。 1.1 项目背景.... 1。 1.2 研究意义.... 1。 1.3 建设目标.... 2。 1.4 论文内容.... 2。 第二章 系统解决方案. 2。 2.1 相关技术.... ..2。 2.1.1 Web Service简介……………………………………………………………………2 2.1.2 ASP.NET 简介…………………………………………………………………… ..2 2.1.3 SQL Server 2000 简介…………………………………………………………….. 3 2.1.4 ADO.NET 简介…………………………………………………………………… 3. 2.2 体系结构.... 3。 2.3 技术开发方案.... 5。 2.4 系统技术平台………………………………………………………………5 第三章 系统设计说明. 6。 3.1 消费客户使用案例
上传时间: 2013-12-05
上传用户:GHF
题目:实现一个能进行稀疏矩阵基本运算的运算器。 以“带行逻辑链接信息”的三元组顺序表示稀疏矩阵,实现两个矩阵相加,相乘的运算。稀疏矩阵的输入形式采用三元组表示,而运算结果的矩阵以阵列形式列出。 1、 生成如下两个稀疏矩阵的三元组a和b: 1 0 3 0 3 0 0 0 0 1 0 0 0 4 0 0 0 0 1 0 0 0 1 0 0 0 1 1 0 0 0 2 2、输出a+b的三元组 3、输出a*b的三元组
上传时间: 2013-12-19
上传用户:ljmwh2000
用S51单片机控制驱动芯片L298程序(C语言) 有六个端口,输入端口分别为P1.0,P1.1,P1.2,P1.3,P1.4,P1.5. 六个输出端口分别为P0.0,P0.1,P0.2,P0.3,P2.4,P2.5. 其中P0.0,P0.2,P2.5输出高低电平.P0.1,P0.3,P2.4输出PWM脉冲信号. 程序要求 只要P1.0-P1.5中任一个为"1",则P0.0,P0.2输出高电平 当P1.2或P1.3为"1",P0.1,P0.3输出占空比相同的PWM信号
上传时间: 2013-12-18
上传用户: