文件名称:adjust
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:5.76kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
有一个自适应单链表。这个链表只能从最前端开始顺序单向查找待查元素;每次查找到一个元素后把它提升到链表的最前端,维持其他元素的相对关系不变。现在用该链表存储并查找正整数:给出一些待查的正整数,如果找到则输出查找过程中访问过的元素数目, 如果找不到,则输出-1.
输入第一行包含两个整数 n, m,即链表中元素的个数和查找的次数。第二行包含 n 个正整数,从链表前端开始依次序给出链表中的元素。这些元素保证两两不相等。以下 m 行每行包含一个正整数 c,表示一个待查元素。 -Have an adaptive single linked list. This list can only start from the front one-way in order to find a complete set of elements each element to find a list after it raised to the forefront, to maintain the relative relationship between the other elements remain unchanged. Now stored with the list and look for positive integers: given some unknown positive integer, if the search process to find the output number of elements visited, if not found, output-1.
Input The first line contains two integers n, m, that is, the number of elements in the list and find the number of times. The second line contains n positive integers, starting from the front of the list given by the order of the elements of the list. These elements ensure the pairwise equal. The following m lines each line contains a positive integer c, represents an unknown element.
输入第一行包含两个整数 n, m,即链表中元素的个数和查找的次数。第二行包含 n 个正整数,从链表前端开始依次序给出链表中的元素。这些元素保证两两不相等。以下 m 行每行包含一个正整数 c,表示一个待查元素。 -Have an adaptive single linked list. This list can only start from the front one-way in order to find a complete set of elements each element to find a list after it raised to the forefront, to maintain the relative relationship between the other elements remain unchanged. Now stored with the list and look for positive integers: given some unknown positive integer, if the search process to find the output number of elements visited, if not found, output-1.
Input The first line contains two integers n, m, that is, the number of elements in the list and find the number of times. The second line contains n positive integers, starting from the front of the list given by the order of the elements of the list. These elements ensure the pairwise equal. The following m lines each line contains a positive integer c, represents an unknown element.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
adjust/adjust.cpp
adjust/adjust.h
adjust/readme.txt
adjust/release/adjust.exe
adjust/release
adjust
adjust/adjust.h
adjust/readme.txt
adjust/release/adjust.exe
adjust/release
adjust
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.