网友您好, 请在下方输入框内输入要搜索的题目:
●试题四
阅读下列函数说明和C代码,将应填入(n)处的字句写在答题纸的对应栏内。
【说明】
函数QuickSort是在一维数组A[n]上进行快速排序的递归算法。
【函数】
void QuickSort(int A[],int s,int t)
{int i=s,j=t+1,temp;
int x=A[s];
do{
do i++;while (1) ;
do j--;while(A[j]>x);
if(i<j){temp=A[i]; (2) ; (3) ;}
}while(i<j);
A[a]=A[j];A[j]=x;
if(s<i-1) (4) ;
if(j+1<t) (5) ;
}
●试题四
【答案】(1)A[i]<x(2)A[i]=A[j](3)A[j]=temp(4)QuickSort(A,s,j-1)
(5)QuickSort(A,j+1,t);
【解析】快速排序的思想是:任取待排序序列中的某个元素作为基准(一般取第一个元素),通过一趟排序,将待排元素分为左右两个子序列,左子序列元素的排序码均小于或等于基准元素的排序码,右子序列的排序码则大于基准元素的排序码,然后分别对两个子序列继续进行排序,直至整个序列有序。快速排序是对冒泡排序的一种改进方法,算法中元素的比较和交换是从两端向中间进行的,排序码较大的元素一次就能够交换到后面单元,排序码较小的记录一次就能够交换到前面单元,记录每次移动的距离较远,因而总的比较和移动次数较少。
“两个务必”的内容是务必保持谦虚谨慎、不骄不躁的作风,务必保持求真务实的作风。
此题为判断题(对,错)。
参考答案:错误
V.Word Form (10 points, 1 point for each item)
将括号中的各词变为适当的形式填入空白。答案写在答题纸上。
56.I would play football with you if I_20 years younger. (be)
56.I would play football with you if I were 20 years younger. (be)虚拟语气
阅读下列函数说明和C代码,将应填入(n)处的字句写在对应栏内。
【说明】
函数QuickSort是在一维数组A[n]上进行快速排序的递归算法。
【函数】
void QuickSort( int A[ ],int s,int t)
{ int i=s,j=t+1,temp;
int x=A[s];
do{
do i ++ ;while (1);
do j -- ;while(A[j]>x);
if(i<j){temp=A[i];(2);(3);}
}while(i<j);
A[a] =A[j];A[j] =x;
if(s<i-1) (4);
if(j+1<t) (5);
}
(1)A[i]x (2)A[i]=A[j] 3)A[j]=temp (4)QuickSort(A,s,j-1) (5)QuickSort(A,j+1,t); 解析:快速排序的思想是:任取待排序序列中的某个元素作为基准(一般取第一个元素),通过一趟排序,将待排元素分为左右两个子序列,左子序列元素的排序码均小于或等于基准元素的排序码,右子序列的排序码则大于基准元素的排序码,然后分别对两个子序列继续进行排序,直至整个序列有序。快速排序是对冒泡排序的一种改进方法,算法中元素的比较和交换是从两端向中间进行的,排序码较大的元素一次就能够交换到后面单元,排序码较小的记录一次就能够交换到前面单元,记录每次移动的距离较远,因而总的比较和移动次数较少。
请将每一个空的正确答案写在答题卡【1】~【20】序号的横线上,答在试卷上不得分。
1.计算并填写下表
(1)
【1】B类【解析】题目中给定的lP地址191.23.181.13的第一字节范围属于128~191之间,可以判断该IP地址属于B类地址;或者将IP 地址写成二进制形式为:10111111.0 0010111.10110101.00001101,第一字节以“10”开头,也可以判断出该lP地址属于B类地址。
【2】191.23.128.0 【解析】由题目知,该lP地址的子网掩码为255.255.192.0,写成二进制表示法为11111111.11111111.11000000.00 00000,子网掩码的前18位为“1”,说明前18位为网络号,后14位为主机号。用子网掩码与lP地址做“与”运算,得到网络地址为 10111111.00010111.10000000.00000000,写成十进制即191.23.128.0 或191.23.128.0/18。
【3】191.23.191.255 【解析】把lP地址的主机号全部置“1”即可得到直接广播地址,即10111111.00 010111.10111111.11111111,写成十进制,即 191.23.191.255。
【4】 0.0.53.13 【解析】将网络号地址全部置“0”,便可得到该lP的主机号,即00000000.00000000.00110101.00001101,写成十进制即0.0.53.13。
【5】191.23.191.254 【解析】由于主机号全置“1”时为广播地址,是不可用的IP 地址。所以最后一个lP地址为主机号的广播地址减去l,即 191.23.191.254.
高级英语阅读(二)期末考试A卷 姓名:专业:学号: 学习中心:$答案务必写在最后一页答案卷上, 否则不得分!一、客观题(答案务必写在答题纸上, 60分,每题3分)I 判断对错: 对的写“T”, 错的写“F”Read lesson 4 Text B , Do True or False Questions(阅读教材第4课课文B ,判断对错):Washington Irvings Sunnyside in Tarrytown, New YorkAccompanying a plan of Sunnyside (unprinted here), a former residence of Washington Irving in New York, is the following text. We have left out its title, which indicates clearly its purpose, in the hope that the reader will reconstruct it after reading the text.Sunnyside is one of the few surviving and best-documented examples of American romanticism in architecture and landscape design. Andrew Jackson Downing featured Sunnyside in his Treatise on the Theory and Practice of Landscape Gardening (1841) as an example of the progressive improvement in Rural Architecture. which, he explained, strives to be in perfect keeping with surrounding nature by its varied and picturesque outline. Architectural beauty, he taught, must be considered conjointly with the beauty of the landscape,Walking the 24-acre grounds is a pleasure in every season. Swans glide on the pond Irving called the little Mediterranean, and a stone flume delights the ear with the sound of rushing water. A path leads up a small rise and from there down into the glen, and up to the house. Behind the house, another path winds along the Hudson for views of the river at its widest point, the Tappan Zee.The modest stone cottage which was later to become Sunnyside was originally a tenant farmers house built in the late-seventeenth century on the Philipsburg Manor. During the eighteenth century, the cottage was owned by a branch of the Van Tassel family, the name Irving later immortalized in The Legend of Sleepy Hollow.Irving purchased the cottage in 1835 and directed the remodeling, adding Dutch-stepped gables, ancient weathervanes, and developing Gothic and Romanesque architectural features for other parts of the house. He was so pleased with his home that in 1836 he wrote to his brother, Peter: I am living most cozily and delightfully in this dear, bright little home, which I have fitted up to my own humor. Everything goes on cheerily in my little household and I would not exchange the cottage for any chateau in Christendom.Todays visitor to Sunnyside sees Irvings home much as it appeared during the final years of his life. The authors booklined study contains his writing deska gift from his publisher, G.P. Putnam and many personal possessions. The dining room, in which Irving and his dinner guests often gathered to enjoy the beautiful sunsets over the Hudson River, adjoins the parlor. Here Irving played his flute, while his nieces, Sarah and Catherine, accompanied him on the rosewood piano. The piano and other original furnishings still grace the room. The small picture gallery off the parlor contains some original illustrations for Irvings work. The kitchen was quite advanced for its day, having a hot water boiler and running water fed from the pond through a gravity-blow system. The iron cookstove was also a modern convenience, replacing the open hearth in the 1850s.The second floor of the house contains several bedrooms, each of which has its own personal character. The guest bedroom is furnished with a French-style bed and painted cottage pieces. The ingenious arches in this and other rooms were designed by Irving. His bedroom, where he died in 1859, contains the authors tester Sheraton bed, along with his walking stick and a number of his garments and personal effects. The small, bright room between the bedrooms might have been used by Irvings nephew and biographer, Pierre Munro Irving, who cared for his uncle during the last months of his life. The room was used originally to store books and papers. The bedroom used by Irvings nieces contains an Irving-family field bed with hand-made bobbin lace hangings, a chest of drawers, sewing stands, and an ornamental stove. The guest room contains a cast iron bed probably made in one of the foundries along the Hudson.Write True (T) or False (F)for the following questions.1. Sunnyside is the former residence of Washington Irving in Washington D.C2. .Sunny side is a typical representative of Romanticism of American city architecture.3. According to Andrew Jackson Downing , architectural beauty must be in harmony with the beauty of the surrounding landscape.4. During the 18th century ,the cottage was owned by Van Tassel who was mentioned by Irving in his book “the Legend of the Hollow” .5. Irving didnt make any change to the cottage after he purchased it.6. Todays Sunnyside has changed a lot compared with its appearance in Irvings time.7. Sunnyside was built near the Hudson River.8. The study , the dining room , the parlor and the kitchen are all on the first floor of Irvings house.9. All the bedrooms on the second floor are almost furn
请将每一个空的正确答案写在答题卡【 】~【 】序号的横线上。答在试卷上不得分。
某二叉树有5个度为2的结点以及3个度为1的结点,则该二叉树中共有【 】个结点。
14 解析:在二叉树中,度为0的结点数是度为2的结点数加1,故二叉树中结点数的总和为度为0的结点数、度为1的结点数及度为2的结点数三者相加,得出结果为14个结点。
国际邮件书写格,收件人的姓名、地址应当写在邮件封面中间靠右偏下的位置,与邮件的长度方向平行书写。收件人名址书写顺序是()。
A.第一行写收件人姓名
B.第二行写所在单位名称
C.第三行写街道名和门牌号码
D.最后一行写寄达地名和国名
检疫证明耳标号太多写不下可以全部填写在附件,并在首页直接写见附件。( )
此题为判断题(对,错)。
请将答案填写在题干后面的括号内,
此题为判断题(对,错)。
国际邮件书写格,收件人的姓名、地址应当写在邮件封面中间靠右偏下的位置,与邮件的长度方向平行书写。收件人名址书写顺序是()。
A第一行写收件人姓名
B第二行写所在单位名称
C第三行写街道名和门牌号码
D最后一行写寄达地名和国名
A,B,C,D
略
更多 “福建师范大学2022年8月课程考试《高级英语阅读(二)》作业考核” 相关考题
- 本行为收款行,他行为付款行,这类凭证又称为代付票据.
- ( 难度:中等)关于hive的说法正确的是A.增加map和reduce数量可以提高计算速度,因此数量越多越好B.为了提高速度可以开启小文件本地化执行C.压缩可以减小文件体积,因此压缩率越大的算法越好D.每个查询被Hive转化为多个阶段,有些阶段关联性不大,则可以并行化执行,减少执行时间
- 信息化战争涉及的内容包括:A. 信息是核心资源B. 信息化军队C. 信息化、智能化武器装备D. 多维信息化战场E. 信息化战争性质
- 支票的大小写金额可以更改,但更改人必须签章以明确责任。
- 关于成就需要的说法,错误的是( )。 A.成就需要是指个体追求优越感的驱动力 B.成就需要高的人倾向选择适度的风险 C.成就需要高的人具有较强的责任心和进取意识 D.一般来说,成就需要高的人工作绩效较低
- ( )是精神分析学派的开创者。A.荣格B.弗洛伊德C.阿德勒D.埃里克森
- 2020年以中国为主要贸易伙伴的国家,已经超过百分之多少
- 把自己自身的感觉强加于对方是哪种自我防御机制( )。A.合理化B.升华作用C.投射D.转移
- 根据弗罗姆的期望理论,员工对一旦完成任务就可以获得报酬的信念称为( )。 A。效价 B。期望 C.工具 D.动机
- 出票人在支票上的签章,必须与预留银行印鉴相符。