●试题四
阅读下列函数说明和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】~【20】序号的横线上,答在试卷上不得分。
1.计算并填写下表
高级英语阅读(二)期末考试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的结点,则该二叉树中共有【 】个结点。
国际邮件书写格,收件人的姓名、地址应当写在邮件封面中间靠右偏下的位置,与邮件的长度方向平行书写。收件人名址书写顺序是()。
A.第一行写收件人姓名
B.第二行写所在单位名称
C.第三行写街道名和门牌号码
D.最后一行写寄达地名和国名
检疫证明耳标号太多写不下可以全部填写在附件,并在首页直接写见附件。( )
此题为判断题(对,错)。
请将答案填写在题干后面的括号内,
此题为判断题(对,错)。
国际邮件书写格,收件人的姓名、地址应当写在邮件封面中间靠右偏下的位置,与邮件的长度方向平行书写。收件人名址书写顺序是()。
A第一行写收件人姓名
B第二行写所在单位名称
C第三行写街道名和门牌号码
D最后一行写寄达地名和国名