/*快速排序采用分治算法,将所需要排序的内容从文件读入放入数组a[p:r],按以下三个步骤进行排序 以a[p]为基准元素将数组分为三段,将大于基准元素的放到后面的单元,小的放到前面的单元, 再用递归对a[p:q-1],a[q+1:r]进行排序,最后合并 时间复杂度:最坏时间复杂度:O(n2) 平均时间复杂度:O(nlogn) */
上传时间: 2016-06-29
上传用户:chenbhdt
快速排序算法是基于分治策略的另一个排序算法。其基本思想是,对于输入的字数组a[p:r],按以下3个步骤进行排序: (1)分解:以a[p]为基准元素将a[p:r]划分成3段a[p:q-1],a[q]和a[q+1:r],使得a[p:q-1]中任何元素小于等于a[q],a[q+1:r],中的任何元素大于等于a[q]。下标q在划分过程中确定 (2)递归求解:通过递归调用快速排序算法,分别对a[p:q-1]和a[q+1:r]进行排序 (3)合并:在a[p:q-1]和a[q+1:r]已经排好序的情况下,不需要执行任何运算,a[p:r]就已排好序 平均算法复杂度O(nlogn)
上传时间: 2016-07-09
上传用户:wuyuying
Analysis and Simulation of UHF RFID System Jin Li, Cheng Tao Modern Telecommunication Institute, Beijing Jiaotong University, Beijing 100044, P. R. China Abstract This article presents the analysis and simulation of UHF RFID system
标签: Telecommunication Simulation Institute Analysis
上传时间: 2013-12-21
上传用户:从此走出阴霾
1.Describe a Θ(n lg n)-time algorithm that, given a set S of n integers and another integer x, determines whether or not there exist two elements in S whose sum is exactly x. (Implement exercise 2.3-7.) #include<stdio.h> #include<stdlib.h> void merge(int arr[],int low,int mid,int high){ int i,k; int *tmp=(int*)malloc((high-low+1)*sizeof(int)); int left_low=low; int left_high=mid; int right_low=mid+1; int right_high=high; for(k=0;left_low<=left_high&&right_low<=right_high;k++) { if(arr[left_low]<=arr[right_low]){ tmp[k]=arr[left_low++]; } else{ tmp[k]=arr[right_low++]; } } if(left_low<=left_high){ for(i=left_low;i<=left_high;i++){ tmp[k++]=arr[i]; } } if(right_low<=right_high){ for(i=right_low;i<=right_high;i++) tmp[k++]=arr[i]; } for(i=0;i<high-low+1;i++) arr[low+i]=tmp[i]; } void merge_sort(int a[],int p,int r){ int q; if(p<r){ q=(p+r)/2; merge_sort(a,p,q); merge_sort(a,q+1,r); merge(a,p,q,r); } } int main(){ int a[8]={3,5,8,6,4,1,1}; int i,j; int x=10; merge_sort(a,0,6); printf("after Merging-Sort:\n"); for(i=0;i<7;i++){ printf("%d",a[i]); } printf("\n"); i=0;j=6; do{ if(a[i]+a[j]==x){ printf("exist"); break; } if(a[i]+a[j]>x) j--; if(a[i]+a[j]<x) i++; }while(i<=j); if(i>j) printf("not exist"); system("pause"); return 0; }
上传时间: 2017-04-01
上传用户:糖儿水嘻嘻
常用芯片DIP SOT SOIC QFP电阻电容二极管等3D模型库 3D视图封装库 STEP后缀三维视图(154个):050-9.STEP0805R.STEP1001-1.STEP1001-2.STEP1001-3.STEP1001-4.STEP1001-5.STEP1001-6.STEP1001-7.STEP1001-8.STEP103_1KV.STEP10X5JT.STEP1206R.STEP13PX2.STEP15PX2.STEP20P插针.STEP25V1000UF.STEP3296W.STEP35V2200UF.STEP3mmLED.STEP3mmLEDH.STEP3X3可调电阻.STEP400V0.1UF.STEP455.STEP630V0.1UF.STEP7805.STEP8P4R.STEPAXIAL-0.2-0.125W.STEPAXIAL-0.4-0.25W.STEPaxial-0.6-2W.STEPB-3528.STEPC-0805.STEPC06x18.STEPCAP-6032.STEPCH3.96 X2.STEPCH3.96-3P.STEPD-PAK.STEPDB25.STEPDC-30.STEPDIP14.STEPDIP16.STEPDIP6.STEPDIP8.STEPDO-214AA.STEPDO-214AB.STEPDO-214AC.STEPDO-41.STEPDO-41Z.STEPFMQ.STEPGNR14D.STEPH9700.STEPILI4981.STEPIN4007.STEPIN5408.STEPJP051-6P6C_02.STEPJQC-3F.STEPJS-1132-10.STEPJS-1132-11.STEPJS-1132-12.STEPJS-1132-13.STEPJS-1132-14.STEPJS-1132-15.STEPJS-1132-2.STEPJS-1132-3.STEPJS-1132-4.STEPJS-1132-5.STEPJS-1132-6.STEPJS-1132-7.STEPJS-1132-8.STEPJS-1132-9.STEPJS-1132R-2.STEPJS-1132R-3.STEPJS-1132R-4.STEPJS-1132R-5.STEPJS-1132R-6.STEPJS-1132R-7.STEPJS-1132R-8.STEPJZC-33F.STEPKBP210.STEPKE2108.STEPKF2510 X8.STEPKF301.STEPKF301x3.STEPKSD-9700.STEPLED5_BLUE.STEPLED5_GRE.STEPLED5_RED.STEPLED5_YEL.STEPLFCSP_WQ.STEPLQFP100.STEPLQFP48.STEPMC-146.STEPmolex-22-27-2021.STEPmolex-22-27-2031.STEPmolex-22-27-2041.STEPmolex-22-27-2051.STEPmolex-22-27-2061.STEPmolex-22-27-2071.STEPmolex-22-27-2081.STEPMSOP10.STEPMSOP8.STEPPA0630NOXOX-HA1.STEPPIN10.STEPPIN24.STEPPIN24A.STEPR 0805.STEPR0402.STEPR0603.STEPR0805.STEPR1206.STEPRA-15.STEPRA-20.STEPRS808.STEPSIP-3-3.96 22-27-2031.STEPSL-B.STEPSL-D.STEPSL-E.STEPSL-G.STEPSL-H.STEPSOD-123.STEPSOD-323.STEPSOD-523.STEPSOD-723.STEPSOD-80.STEPSOIC-8.STEPSOP-4.STEPSOP14.STEPSOP16.STEPSOP18.STEPSOT-89.STEPSOT223.STEPSOT23-3.STEPSOT23-5.STEPSSOP28.STEPTAJ-A.STEPTAJ-B.STEPTAJ-C.STEPTAJ-D.STEPTAJ-E.STEPTAJ-R.STEPTHB6064H.STEPTO-126.STEPTO-126X.STEPTO-220.STEPTO-247.STEPTO-252-3L.STEPTOSHIBA_11-4C1.STEPTSSOP-8.STEPTSSOP14-BOTTON.STEPTSSOP14.STEPTSSOP28.STEPUSB-A.STEPUSB-B.STEPWT.STEP
标签: 芯片 dip sot soic qfp 电阻 电容 二极管 封装
上传时间: 2021-11-21
上传用户:XuVshu
STM32H750VBT6核心板 ALTIUM设计硬件原理图+PCB文件,包括完整的原理图和PCB文件,可以做为你的设计参考,PCB 2层板设计,大小85MM*56MM, 带SD,DCMI,QSPI,外扩flash,以太网,RS485,CAN总线, 主要器件信号列表如下:Library Component Count : 29Name Description----------------------------------------------------------------------------------------------------AMS1117 三端稳压芯片BAT54C 表贴肖特基二极管C 无极性贴片电容CRYSTAL_32K CrystalCap CapacitorFPC0.5-24P 贴片FU 贴片保险丝HR911105Header 2 Header, 2-PinLLAN8720 ETH PHYLED Typical RED, GREEN, YELLOW, AMBER GaAs LEDMAX3485PNP PNP三极管Pin HDR2X20 R 贴片电阻Res ResisterSN65HVD230D STM32H750VBT6 Socket SocketTCAP 钽电容TEST-POINT 测试点TSW 轻触开关USB type C W25Qxx 外置FlashXC6206-3.3 SOT-23,XC6206P332MR,MAX8V,100mAXTAL-4P 4脚无源晶振XTAL_3225 Crystal OscillatormicroSD
上传时间: 2021-11-24
上传用户:aben
STM32F429_F746_F767核心板+开发底板AD+PADS格式(原理图库+PCB封装库):核心板原理图库:Library Component Count : 28Name Description----------------------------------------------------------------------------------------------------2X28PIN_DIP3.0MM 40P-FPC-0.5BAT54CCJA1117B-3.3CRYSTAL_25MHZ_3225 C_0.1UF_0402 C_0.1UF_0603 C_10P_0402 C_10UF_0603 C_2.2UF_0402C_22P_0402 GZ1005D601TF IS42S16400J KEY_3X6 LED_BLUE_0603 LED_RED_0603 NC R_0R_0402 R_10K_0402R_1K_0402 R_2.2K_0402R_33R_0402STM32F767IGT6 USB_MICRO_DIP W25Q128FVSGXH2.54-5P XTAL_32.768KHZ核心板PCB库:Component Count : 18Component Name-----------------------------------------------2X28X2.54MM3.0MM_4.540P-FPC-0.532153225C_0603C_1206LED_0603LQFP176MICRO_USB_5SSC0402SOT-23SOT-89-3LSR0402SW3$2F$6-SMDTSOP-54W25Q128XH2.54-5P_NS开发板封装库:Component Count : 52Component Name-----------------------------------------------1_DIP1X2PIN_SMD2X6P_SMD2X19X2.54MM2X28X2.54MM3.0MM20PIN_2.54_DIP_BOT20PIN-JTAG06031206C3225AVX_B_3528-21BATERYBEEP-9.5X5.5C_0603C_1206CON_2PINDB9DC-005DIODE_SOPDO-214EC_47UF_6.5X6.5EC_220UF_6.5X6.5EMW1062GDCD4532HDR1X3HDR1X4LED_0603LED_RGB_5MMMAX485MAX3232MIC_6X2.2PJ-3001SQFN24QFN24AQFN32R_0603R-3X3R5MMRJ45RT7272SOP8SOP16SOT-23SOT-353SW6.2$2F$6.2-DIPASW13_6TF_CARDTO-252-2LUSB-AF90USB-MINIXTAL_SMD
上传时间: 2021-12-08
上传用户:
STM32L475开发板PDF原理图+AD集成3D封装库+主要器件技术手册,集成封装库型号列表如下:Library Component Count : 44Name Description----------------------------------------------------------------------------------------------------ANT-2.4G ANT,2.4G,PCB天线ATK-TEST-1*4-2.54mm 测试点ATK_MODULE 单排母,1*6,2.54mmBEEP 3.3V有源蜂鸣器BUTTON_DIP3 拨动开关SS-12F44C-0402-SMD C-0603-SMD C-CAP-SMD-220uF/10V C-CEP-220uF/16V D-1N4148 Header-1*3-2.54mm 单排针-2.54mmHeader-2*10-2.54mm 双排针-2.54mmHeader-2*2-2.54mm 双排针-2.54mmHeader-2*3-2.54mm 双排针-2.54mmHeader-2*4-2.54mm 双排座-2.54mmIR-LED 1206红外发射管(侧)IR-LF0038GKLL-1 红外接收管SMDJ-MICRO-USB-5S Micro USB 5.9有柱脚长1.25加长针L-0420-4.7uH 电感,4.7uH,3ALCD-TFT-H13TS38A LCD,TFT,1.3'240*240,禹龙LED-0603-RED 发光二极管-红色LED-RGB-1615-0603 RGB,共阳,1615,0603MIC-6022 MICMotor-SMD 电机,SMDPhone-3-M 耳机座,三节R-0402-SMD 贴片电阻R-0805-SMD 贴片电阻RT9193-3.3S-KEY-SMD-324225 KEY,SMD,324225S8050-SMD SD-MICRO-TF SD,MICRO,TFU-AHT10 Sensor,温湿度传感器U-AP3216C Sensor.光照/距离U-AP6181 WIFI Module,SDIOU-ES8388 AUDIO,2-ch DAC,2-ch ADCU-ICM-20608 三轴陀螺仪/三轴加速度计,U-L9110S 电机驱动,800mAU-RT9013-3.3 LDO,500mAU-STM32F103C8T6 U-STM32L475VET6 MCU,LQFP100,512K FLASH,128K RAMU-W25Q128 SPI FLASH,16MY-12M-SMD 晶振 - 12M贴片Y-3215-32.768K XTAL,3215,32.768KY-3215-8M XTAL,3215,8MHz
上传时间: 2021-12-15
上传用户:
STM32F407单片机开发板PDF原理图+AD集成封装库+主要器件技术手册资料:AD集成封装库列表:Library Component Count : 54Name Description----------------------------------------------------------------------------------------------------24C256 AMS1117ATK-HC05 ATK-HC05BAT BEEP BUTTONC CAPCH340G USB2UARTDDB9 DHT11 数字温湿度传感器HEAD2HEAD2*22 HR911105 HS0038Header 16 Header, 16-PinHeader 2 Header, 2-PinHeader 2X2 Header, 2-Pin, Dual rowHeader 3X2 Header, 3-Pin, Dual rowHeader 4 Header, 4-PinHeader 9X2 Header, 9-Pin, Dual rowIS62WV51216 JTAG KEY_M L LAN8720 ETH PHYLED2 Typical RED, GREEN, YELLOW, AMBER GaAs LEDLSENS LIGHT SENSL_SOP MAX3232 MAX3485 MIC MOS-P IRLML6401/SI2301MP2359 DC DC Step Down ICMPU6050 9轴运动处理传感器NPN 8050/BCW846/BCW847NRF24L01 PHONE_M PNP 8550/BCW68POW R SMBJ TVSSN65HVD230D STM32F407ZET6 STM32F407ZET6TEST-POINT 测试点TFT_LCD TPAD ALIENTEK TPADUSB5USB_A_90 USB-A-90W25X16
上传时间: 2021-12-15
上传用户:ttalli
STM32F407开发板ALTIUM设计原理图+AD集成封装库文件,Altium Designer 设计的工程文件,包括原理图和未布局布线的PCB文件,可作为你产品设计的参考。集成库器件型号列表如下:Library Component Count : 46Name Description----------------------------------------------------------------------------------------------------1N4106 12V/0.5W稳压管1N4148 高速开关二极管24Cxx 外置EEPROM5向按键 8050-SMD 高频放大-NPN型AMS1117 三端稳压芯片BEEP 蜂鸣器C 无极性贴片电容C-CAP 直插电解电容CR-3V 微型电池DB9 9针串口DP83848IVDS18B20 数字温度计FU 5x20 5*20保险丝HS0038 Header 10X2 10*2P接插件Header 13X2 13*2P接插件Header 18X2 18*2P接插件Header 2 2P接插件Header 2X2 2*2P接插件Header 3X2 3*2P接插件Header 4 4P接插件Header 4X2 4*2P接插件Header 6 6P接插件Header 9X2 9*2P接插件IS62WV51216 JATG L 小功率贴片电感LED-5MM 5mm插件LEDMAX232 MAX232MAX485 MP2359 P-DC 低压电源接口R 贴片电阻RJ45 SDCARD-M TF卡槽SS14 肖特基二极管SSW-2P 2路波动开关STM32F407ZGT6TFTLCD TJA1050 USB OTGUSB-5P 微型USB母座W25Qxx 外置FlashXTALXTAL-2 2脚晶振
上传时间: 2021-12-17
上传用户:zhaiyawei