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

exactly

  • c语言算法排序

    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;     }

    标签: c语言 算法 排序

    上传时间: 2017-04-01

    上传用户:糖儿水嘻嘻

  • ComSoc+Guide+to+Next+Generation+Optical+Transport

    Many times I have been asked to explain “ briefl y ” how SDH, SONET, and the OTN “ exactly ” work. The questions came mainly from new colleagues, stu- dents, and users of these technologies, personally or via the usenet newsgroup comp.dcom.sdh - sonet. I could have referred them to the standards documents, but to provide a more consistent and clear answer I decided to write this pocket guide. The objective of this book is that it can be used both as an introduction as well as a reference guide to these technologies and their spe- cifi c standards documents.

    标签: Generation Transport Optical ComSoc Guide

    上传时间: 2020-05-26

    上传用户:shancjb

  • VoIP+and+Unified+Communications

    This book intends to prepare you to define Unified Communications (UC) for yourself and then get it to work for you. Each vendor pulls together from its available products a package of features related to voice, data, messaging, and image communications. That’s UC for one vendor, but it’s unlikely to match exactly the UC from another vendor. You need a detailed specification to know what you’ll see installed.

    标签: Communications Unified VoIP and

    上传时间: 2020-06-01

    上传用户:shancjb

  • Wireless Communication Technology

    This is a book on wireless communication. That usually means communica- tion by radio, though ultrasound and infrared light are also used occasion- ally. The term “wireless” has come to mean nonbroadcast communication, usually between individuals who very often use portable or mobile equip- ment. The term is rather vague, of course, and there are certainly borderline applications that are called wireless without falling exactly into the above definition.

    标签: Communication Technology Wireless

    上传时间: 2020-06-01

    上传用户:shancjb

  • Arduino Adventures Escape from Gemini Station

    Fun. We (your authors) wanted a word to describe our ultimate goal for this book, as well as a word we hope you (our reader) will use to describe it, and that’s the one we chose. There are others goals, of course, but in the end, when you’ve finished the book, we’re hoping you’ll have enjoyed the activities described in these pages. Many books use the Introduction to explain exactly what the book is about, what the reader will learn, what the reader needs (a skill or maybe an item or piece of software), and what the reader will be left with when that last page is completed. And this Introduction will do those things, but … hopefully it’ll make you excited to get started.

    标签: Adventures Arduino Station Escape Gemini from

    上传时间: 2020-06-09

    上传用户:shancjb

  • Code Craft: the practice of writing excellent code

    This book addresses programmer attitudes, but it’s not some kind of psychology textbook. We’ll investigate many topics, including: Source code presentation Defensive coding techniques How to debug programs effectively Good teamworking skills Managing your source code Take a quick glance through the table of contents to see exactly what’s covered. What is the rationale behind my selection of topics? I’ve been mentor- ing trainee programmers for many years, and these are the topics that have come up time and time again. I’ve also worked in the software factory for long enough to have seen the recurring problems—I address these too. If you can conquer all of these programming demons, you’ll progress from an apprentice coder to a real code craftsman.

    标签: excellent practice writing Craft Code code the of

    上传时间: 2021-11-09

    上传用户:danix800

  • The C++ Programming Language第四版

     Extensively rewritten to present the C++11 language, standard library, and key design techniques as an integrated whole, Stroustrup thoroughly addresses changes that make C++11 feel like a whole new language, offering definitive guidance for leveraging its improvements in performance, reliability, and clarity. C++ programmers around the world recognize Bjarne Stoustrup as the go-to expert for the absolutely authoritative and exceptionally useful information they need to write outstanding C++ programs. Now, as C++11 compilers arrive and development organizations migrate to the new standard, they know exactly where to turn once more: Stoustrup's C++ Programming Language, Fourth Edition.Bjarne Stroustrup是C++的设计师和最早的实现者,也是《C++程序设计语言》、《带标注的C++参考手册》和《C++语言的设计与演化》的作者。他从丹麦Aarhus大学和英国牛津大学毕业,现在是AT&T大规模程序设计研究部的负责人,AT&T特别成员,AT&T贝尔实验室特别成员,以及ACM特别成员。Stroustrup的研究兴趣包括分布式系统、操作系统、模拟、设计和程序设计。他也是Addison·Wesley的C++In-Depth系列书籍的编辑。

    标签: C++

    上传时间: 2022-02-01

    上传用户:jimmy950583

  • linux内核编程指南

    因此,您想编写一个内核模块。您知道C,您已经编写了一些可以作为进程运行的常规程序,现在您想知道真正的动作在哪里,一个通配指针可以擦掉文件系统,核心转储意味着重新启动。内核模块到底是什么?模块是可以根据需要加载和卸载的代码段。它们扩展了内核的功能,而无需重新引导系统。例如。模块驱动程序的一种类型是设备驱动程序,它允许内核访问没有模块的系统硬件,我们将不得不构建单片内核并将新功能直接添加到内核映像中,除了具有更大的内核之外,这还具有缺点每次我们想要新功能时都要求我们重建并重新启动内核的过程So, you want to write a kernel module. You know C, you, ve written a few normal programs to run as processes, and now you want to get to where the real action is, to where a single wild pointer can wipe out your file system and a core dump means a reboot.What exactly is a kernel module? Modules are pieces of code that can be loaded and unloaded into th upon demand. They extend the functionality of the kernel without the need to reboot the system. For example.one type of module is the device driver, which allows the kernel to access hardware connected to the syste without modules, we would have to build monolithic kernels and add new functionality directly into the em ernel image, Besides having larger kernels

    标签: linux

    上传时间: 2022-03-30

    上传用户:突破自我

  • 路斯特ServoOne手册

    German universities and scientists have repeatedly set the intermational standard in drive technology. Identification and active compensation of natural frequencies in oscillatory mechanics, status controls with monitoring structures incorporating acceleration sensors, adaptive compensation of measurement system deficiencies, self-adjusting detent torque compensation… everything invented with only a single aim in mind: to continue improv-ing the motion control, dynamics, precision and processing speed of your machines. For the industrial applicabability of this technology scientific publications in proceedings and laboratory test rigs are not enough. These features consequenty need to be converted into cost-efficient and easily manageable products. That 's exactly what we have done.So in future, if you should need more than today ' smarket can offer you, now everything isgoing to be alright. With our new high-performance ServoOne drive series you will experi-ence 

    标签: servoone

    上传时间: 2022-06-23

    上传用户:kingwide