NOIP2013初赛普及组C++题目及答案
第十九届2013全国青少年信息学奥林匹克联赛初赛试题C++及解析
第十九届全国青少年信息学奥林匹克联赛初赛提高组C++语言试题竞赛时间:2013年10月13日14:30~16:30选手注意:●试题纸共有12页,答题纸共有2页,满分100分。
请在答题纸上作答,写在试题纸上的一律无效。
●不得使用任何电子设备(如计算器、手机、电子词典等)或查阅任何书籍资料。
一、单项选择题(共15题,每题1.5分,共计22.5分;每题有且仅有一个正确选项)1.一个32位整型变量占用()个字节。
A.4B.8C.32D.1282.二进制数11.01在十进制下是()。
A.3.25B.4.125C.6.25D.11.1253.下面的故事与()算法有着异曲同工之妙。
从前有座山,山里有座庙,庙里有个老和尚在给小和尚讲故事:?从前有座山,山里有座庙,庙里有个老和尚在给小和尚讲故事:‘从前有座山,山里有座庙,庙里有个老和尚给小和尚讲故事....’?A.枚举B.递归C.贪心D.分治4.1948年,()将热力学中的熵引入信息通信领域,标志着信息论研究的开端。
A.冯·诺伊曼(John von Neumann)B.图灵(Alan Turing)C.欧拉(Leonhard Euler)D.克劳德·香农(Claude Shannon)5.已知一棵二叉树有2013个节点,则其中至多有()个节点有2个子节点。
A.1006B.1007C.1023D.10246.在一个无向图中,如果任意两点之间都存在路径相连,则称其为连通图。
右图是一个有5个顶点、8条边的连通图。
若要使它不再是连通图,至少要删去其中的()条边。
A.2B.3C.4D.57.斐波那契数列的定义如下:F1=1,F2=1,Fn=Fn–1+Fn–2(n≥3)。
如果用下面的函数计算斐波那契数列的第n项,则其时间复杂度为()。
int F(int n){if(n<=2)return 1;elsereturn F(n-1)+F(n-2);}A.O(1)B.O(n)C.O(n2)D.O(F n)8.二叉查找树具有如下性质:每个节点的值都大于其左子树上所有节点的值、小于其右子树上所有节点的值。
第十九届2013全国青少年信息学奥林匹克联赛初赛试题C++及解析
第十九届全国青少年信息学奥林匹克联赛初赛提高组C++语言试题竞赛时间:2013年10月13日14:30~16:30选手注意:●试题纸共有12页,答题纸共有2页,满分100分。
请在答题纸上作答,写在试题纸上的一律无效。
●不得使用任何电子设备(如计算器、手机、电子词典等)或查阅任何书籍资料。
一、单项选择题(共15题,每题1.5分,共计22.5分;每题有且仅有一个正确选项)1.一个32位整型变量占用()个字节。
A.4B.8C.32D.1282.二进制数11.01在十进制下是()。
A.3.25B.4.125C.6.25D.11.1253.下面的故事与()算法有着异曲同工之妙。
从前有座山,山里有座庙,庙里有个老和尚在给小和尚讲故事:?从前有座山,山里有座庙,庙里有个老和尚在给小和尚讲故事:‘从前有座山,山里有座庙,庙里有个老和尚给小和尚讲故事....’?A.枚举B.递归C.贪心D.分治4.1948年,()将热力学中的熵引入信息通信领域,标志着信息论研究的开端。
A.冯·诺伊曼(John von Neumann)B.图灵(Alan Turing)C.欧拉(Leonhard Euler)D.克劳德·香农(Claude Shannon)5.已知一棵二叉树有2013个节点,则其中至多有()个节点有2个子节点。
A.1006B.1007C.1023D.10246.在一个无向图中,如果任意两点之间都存在路径相连,则称其为连通图。
右图是一个有5个顶点、8条边的连通图。
若要使它不再是连通图,至少要删去其中的()条边。
A.2B.3C.4D.57.斐波那契数列的定义如下:F1=1,F2=1,Fn=Fn–1+Fn–2(n≥3)。
如果用下面的函数计算斐波那契数列的第n项,则其时间复杂度为()。
int F(int n){if(n<=2)return 1;elsereturn F(n-1)+F(n-2);}A.O(1)B.O(n)C.O(n2)D.O(F n)8.二叉查找树具有如下性质:每个节点的值都大于其左子树上所有节点的值、小于其右子树上所有节点的值。
noip初赛普及组c试题及答案
9.)。
第十届全国青少年信息学奥林匹克联赛初赛试题A. 文件管理器B. 内存C. 高速缓存D. 硬盘E. U 盘 下列说法中错误的是( A. CPU 的基本功能就是执行指令。
B. CPU 访问内存的速度快于访问高速缓存的速度。
C. CPU 的主频是指CPU 在1秒内完成的指令周期数。
D. 在一台计算机内部,一个内存地址编码对应唯一的一个内存单元。
E. 数据总线的宽度决定了一次传递数据量的大小,是影响计算机性能的因素之彩色显示器所显示的五彩斑斓的色彩,是由红色、蓝色和(A. 紫B. 白C. 黑D. 绿E. 橙 用静电吸附墨粉后转移到纸张上,是哪种输出设备的工作方式( A. 针式打印机 B. 喷墨打印机 C. 激光打印机 D. 笔式绘图仪 E. 喷墨绘图 仪普及组 C 语言小时完成 )•• 全部试题答案均要求写在答卷纸上,写在试卷纸上一律无效••1. 2. 3. 4. 5. 6..选择一个正确答案代码( A/B/C/D/E ),填入每题的括号内 ( 每题1.5分, 共30分) 美籍匈牙利数学家冯•诺依曼对计算机科学发展所做出的贡献是( A. 提出理想计算机的数学模型,成为计算机科学的理论基础。
是世界上第一个编写计算机程序的人。
提出存储程序工作原理, 并设计出第一台具有存储程序功能的计算机 采用集成电路作为计算机的主要功能部件。
指出计算机性能将以每两年翻一番的速度向前发展。
)。
B. C. D. E.下列哪个不是CPU (中央处理单元)(A. Intel ItaniumB. DDR SDRAMC. AMD Athlon64D. AMD OpteronE. IBM Power 5 下列网络上常用的名字缩写对应的中文解释错误的是( WWW (World Wide Web ) :万维网。
URL (Uniform Resource Locator ):统一资源定位器。
HTTP(Hypertext Transfer Protocol ):超文本传输协议。
第十九届2013全国信息学奥林匹克联赛初赛试题c及解析
第十九届全国xx信息学奥林匹克联赛初赛提高组C++语言试题竞赛时间:2013年10月13日14:30~16:30选手注意:●试题纸共有12页,答题纸共有2页,满分100分。
请在答题纸上作答,写在试题纸上的一律无效。
●不得使用任何电子设备(如计算器、手机、电子词典等)或查阅任何书籍资料。
一、单项选择题(共15题,每题1.5分,共计22.5分;每题有且仅有一个正确选项)1.一个32位整型变量占用()个字节。
A.4B.8C.32D.1282.二进制数11.01在十进制下是()。
A.3.25B.4.125C.6.25D.11.1253.下面的故事与()算法有着异曲同工之妙。
从前有座山,山里有座庙,xx有个xx在给小xx讲故事:?从前有座山,山里有座庙,xx有个xx在给小xx讲故事:‘从前有座山,山里有座庙,xx有个xx给小xx讲故事....’?A.枚举B.递归C.贪心D.分治4.1948年,()将热力学中的熵引入信息通信领域,标志着信息论研究的开端。
A.xx·诺伊曼(John von Neumann)B.图灵(Alan Turing)C.xx(Leonhard Euler)D.克劳德·香农(Claude Shannon)5.已知一棵二叉树有2013个节点,则其中至多有()个节点有2个子节点。
A.1006B.1007C.1023D.10246.在一个无向图中,如果任意两点之间都存在路径相连,则称其为连通图。
右图是一个有5个顶点、8条边的连通图。
若要使它不再是连通图,至少要删去其中的()条边。
A.2B.3C.4D.57.斐波xx数列的定义如下:F1=1,F2=1,Fn=Fn–1+Fn–2(n≥3)。
如果用下面的函数计算斐波xx数列的第n项,则其时间复杂度为()。
int F(int n){if(n<=2)return 1;elsereturn F(n-1)+F(n-2);}A.O(1)B.O(n)C.O(n2)D.O(Fn)8.二叉查找树具有如下性质:每个节点的值都大于其左子树上所有节点的值、小于其右子树上所有节点的值。
noip普及组初赛试题及答案
noip普及组初赛试题及答案一、选择题(每题5分,共50分)1. 在计算机系统中,CPU的中文意思是什么?A. 中央处理器B. 存储器C. 输入输出设备D. 操作系统答案:A2. 下列关于二进制数的描述,错误的是?A. 二进制数只有0和1两个数字B. 二进制数的每一位代表2的幂次C. 二进制数的运算规则与十进制数相同D. 二进制数可以表示计算机中的数据答案:C3. 在编程语言中,用于控制程序流程的语句是?A. 赋值语句B. 条件语句C. 循环语句D. 所有选项答案:D4. 下列哪种数据结构不属于线性数据结构?A. 数组B. 链表C. 树D. 图答案:D5. 在计算机程序中,用于存储临时数据的存储区域是?A. 硬盘B. 内存C. 缓存D. 寄存器答案:B6. 以下哪个算法的时间复杂度是O(n^2)?A. 快速排序B. 归并排序C. 插入排序D. 线性查找答案:C7. 在数据库中,用于存储数据的表之间的关系称为?A. 索引B. 视图C. 外键D. 触发器答案:C8. 下列关于递归函数的描述,正确的是?A. 递归函数不能包含循环B. 递归函数必须有终止条件C. 递归函数可以无限递归D. 递归函数可以没有递归调用答案:B9. 在操作系统中,用于管理内存的机制是?A. 文件系统B. 进程调度C. 内存管理D. 网络通信答案:C10. 在网络通信中,TCP协议的主要作用是?A. 传输文件B. 建立连接C. 错误检测D. 路由选择答案:B二、填空题(每题5分,共30分)1. 在计算机中,一个字节由____位二进制数组成。
答案:82. 一个完整的算法应该包含输入、____和输出三个基本部分。
答案:处理3. 在编程中,____是一种常用的数据结构,用于存储具有相同数据类型的元素集合。
答案:数组4. 在面向对象编程中,封装、继承和____是三个基本特征。
答案:多态5. 在关系型数据库中,____是一种特殊的表,用于定义表之间的关系。
2013年全国大学生英语竞赛初赛真题试卷(C类)及答案
2013 National English Contest for College Students(Level C - Preliminary)(总分:150分答题时间:120分钟)Part I Listening Comprehension (30 marks)Section A (5 marks)In this section, you will hear five short conversations. Each conversation will be read only once. At the end of each conversation, there will be a twenty-second pause. During the pause, read the question and the three choices marked A, B and C, and decide which is the best answer. Then mark the corresponding letter on the answer sheet with a single line through the center.1.Why didn’t the man go to see Macbeth last week?A.He didn’t manage to get a ticket.B.He had to attend a conference.C.He had a better production to watch.2.What does “Fill Me In” refer to in this conversation?A. A type of upgraded mobile phone.B. A well-selling magazine.C. A writer’s new book series.3.Why doesn’t the woman like the bag?A.She doesn’t like the pattern.B.It’s not easy to carry.C.It’s too big for her.4.What makes a bad CV according to the man?A.Fake information.B. Terrible writing.C. Undesirable length.5.How will Cathy continue her Spanish learning?A.She’s going to make a friend in Spain.B.She’ll communicate with a Spanish friend in Spain.C.She’ll practice speaking Spanish with an English friend.Section B (10 marks)In this section, you will hear two long conversation. Each conversation will be read only once. At the end of each conversation, there will be a one-minute pause. During the pause, read the question and the three choices marked A, B and C, and decide which is the best answer. Then mark the corresponding letter on the answer sheet with a single line through the center.Conversation One6.What traffic accident are the speakers talking about?A. A kid was knocked down by a car.B.Two cars crashed into a shop.C. A car ran into a wrong place.7.Why did the accident happen according the woman?A.There were many shops around.B.The crossing is in a wrong place.C.There was no crossing here.8.Which of the following is the suggestion they made?A.More traffic lights should be installed.B. A speed camera should be mounted.C.More policemen should patrol that area.9.Where, as the woman mentioned, has got improved traffic?A.Her own neighborhood.B.Her big brother’s neighborhood.C.Her parents’ neighborhood.10.How was the man punished for his traffic offence?A.He was fined 100 pounds with extra penalty points.B.He had to pay 150 pounds and got 6 penalty points.C.He finally paid 600 pounds without any penalty points.Conversation Two11.Why is the expert opposed to the view that memory aids make your memory worse?A.There is no evidence showing that memory aids are invalid.B.Human beings’ brain functions mainly through memory aids in an effective way.C.Memory aids encourage an organized approach which helps the brain function effectively.12.What is interview’s attitude towards the idea that visual image help the memoryA.It is hard to believe.B.It is nothing strange.C.It is obviously nonsense.13.Who developed the system of memory aids centuries ago?A.Inhabitants on an isolated island.B.The Ancient Greeks.C. A great psychologists.14.How does mapping out notes affect the brain?A.It is helpful in reflecting the way people link information in the brain.B.It prevents people from arranging things logically.C.It makes people’s brain function the opposite way.15.What tends to affect people’s ability to think cle arly?A.Upbringing and innate differences.B.Worry and anxiety.C.Their aptitudes.Section C (5 marks)In this section, you will hear five short news items. After each item, which will be read only once, there will be a pause. During the pause, read the question and the three choices marked A, B and C, and decide which is the best answer. Then mark the corresponding letter on the answer sheetwith a single line through the center.16.How can social media influence the presidential election in the USA according to the latestresearch?A.It can help voters to choose their president.B.It can help to ensure the fairness of the elections.C.It can help to increase the number of voters.17.What honorary title has Yaya Toure been granted?A.The African Player of the Year.B.212 Star of the Confederation of African Football.C.The Ivory Coast star.18.Why did Reshma Saujani set up the organization “Girls Who Code”?A.To raise women’s status in the field of science.B.To improve girls’ aptitude and performance in STEM.C.To arouse girls’ interest in science and technology.19.Which tablet computer’s hardware inside is more powerful?A.The CNET Kum.B. The Google Nexus 7.C. The Apple iPad mini.20.What does the company announce that it can do for the United States?A.It can reduce the amount of plastic waste.B.It can help to recycle the plastic waste.C.It can increase the amount of exports.Section D (10 marks)In this section, you will hear a short passage. There are 10 missing words or phrases. Fill in the blanks with the exact words or phrases you hear. The passage will be read twice. Remember to write the answers on the answer sheet.If you (21) ____ smooth skin that glows with youth, the chances are that at some point you will have heard the exhortation to drink lots of water in order to (22) ____ those evil toxins and keep your skin healthy.The exact amount people suggest varies. US – based advice (23) ____ eight glasses a day, while in hotter climates people are advised to drink to more to (24) ____ higher rates of sweating. But regardless of the exact volume of water suggested, the principle behind the advice remains the same --- taking extra water on board will keep your skin hydrated. In other words, water acts like a moisturizer, but from the inside out.This is such a common idea you might be surprised at the (25) ____ to back up. You might expect there to be countless studies where people are (26) ____ two groups, one assigned to sip water all day, the other to drink a normal amount. Then the smoothness of the skin could be (27) ____ a month or so later to establish whether sipping more lead to smoother skin.In fact such studies are rare, partly because water can’t be patented, so it is hard to find anyone to fund such research when there will be no new (28) ____ or cosmetic to sell that could repay the costs. A review by the dermatologist Ronni Wolf at the Kaplan Medical Center in Israel found just one study looking at the effect of long-term water intake on the skin. But the results were (29) ____. After four weeks, the group who drank mineral water showed a decrease in skindensity, which some believe suggests the skin is retaining more moisture, while those who drank tap water showed an increase in skin density. But regardless of the type of water they drank, it made no difference to their (30) ____ or to the smoothness of their skin.Part II Vocabulary and Structure (15 marks)There are 15 incomplete sentences in this section. For each blank there are four choices marked A, B, C and D. Choose the one that best completes the sentence. Then mark the corresponding letter on the answer sheet with a single line through the center.31. The new star said to the journalists that she ____ the opportunity to show that she could play a serious film role.A. greetedB. rejoicedC. welcomedD. cheered32. We haven’t really ____ a solution to the problem yet, which makes the boss really frustrated.A. built upB. fallen back onC. brought overD. come up with33. Personally, I am ____ banning cigarette smoking completely, especially in public areas.A. in touch withB. apart fromC. in favor ofD. regardless of34. Until a firm agreement has been reached, I am not ____ to accepting the offer.A. accustomedB. dedicatedC. committedD. entitled35. The government is making every effort to ____ an economic crisis, but it seems nothing could help.A. eliminateB. avertC. impedeD. swerve36. ____ a serious crime, what exactly should you do?A. Unless you witnessB. If you were to witnessC. If only you witnessD. since you witness37. During examinations candidates are always supposed to stay in seats, keep their eyes on the work, ____ to anyone.A. and not speakB. but could not speakC. rather than speakD. instead of speaking38. Realizing that he hadn’t got enough money and ____ to borrow any from his parents, he decided to sell his house.A. wanted notB. not to wantC. wanting notD. not wanting39. There’s no point waiting here any longer. We ____ go and have something to eat.A. can hardlyB. are bound toC. might as wellD. will have to40. While many people may refer to up-to-minute news, it is unlikely that television and the Internet ____ the newspapers completely.A. will replaceB. replaceC. are replacingD. have replaced41. She married a very nice young architect from Belfast, ____ she met on a bus during her journey to Northern Ireland.A. whoB. whenC. whichD. where42. It is a kind of illness that can result in total blindness if ____A. to leave untreatedB. is left untreatedC. leaving untreatedD. left untreated43. ----I’m so disappointed with my son! He just wouldn’t practice the piano!----Take it easy. You can lead ____ to water, but you can’t make it drink.A. a duckB. a horseC. a cowD. a dog44. ----Good morning, Madam! I’d like some informat ion about the course.----Certainly. ____A.I’m afraid I don’t know more than you either.B.Is there anything I can do for you?C.What exactly would you like to know?D.How much information did you know?45. ---- How do you feel about countries that don’t try t o reduce global warming?---- ____, those countries care more about money than saving the planet.A.As far as I’m concernedB. It’s none of our businessC. We’re not to blameD. Things are under controlPart III Cloze (10 marks)Read the following passage and fill in each blank with one word. Choose the correct word in one of the following three ways: according to the context, by using the correct form of the given word, or by using the given letters of the word. Remember to write the answers on the answer sheet.According to recent surveys, 72% of all Americans believe that the United States government is (46) hi____ information about UFOs. Almost 68% of people think that the government has secret knowledge of extraterrestrial life. It is not (47) ____ (surprise) that the government has come under more and more (48) pr____ to declassify its UFO records and make them public. A variety of different groups have been involved in these efforts.One group to become involved is called CFI, the Coalition for Freedom of Information, John Podesta, who was White House Chief of Staff during Bill Clinton’s (49) ____(president), is one of the many high-powered people active in this group. CFI’s aim is not to prove the (50) ____(exist) of extraterrestrial life, but to make it easier for scientists in general to study unexplained aerial phenomena. Podesta and his group has asked the Pentagon to declassify its UFO records and therefore provide scientists (51) ____ data that will help in the study of UFOs.CFI has requested the release of information on several UFO cases, starting with the Kecksburg, Pennsylvania, incident. This incident took (52) ____ in 1965 when a largeacorn-shaped object, the size of a small car, crashed in Pennsylvania. Some analysts say it could have been the spacecraft Kosmos 96 that had been launched towards Venus by the Soviet Union, but failed to escape Earth’s (53) g____. Others say the object did not look anything like spacecraft built on Earth in 1965.(54) Add____, the people of Kecksburg want to know what happened. On that (55) af____, hundreds of eyewitnesses watched a fiery streak of light descend from the sky towards Earth. Officials explained that nothing was found or recovered and that maybe the fireball in the sky was a meteor. But many witnesses say they saw a number of military personnel from the Army and the Air Force search the woods, and later that evening, saw a large military tractor-trailer coming from the area carrying a large object under a tarp.Part IV Reading Comprehension (40 marks)Read the following passage. Each passage is followed by several questions. Respond to the questions using information from the passage. Remember to write the answers on the answer sheet.Section A (10 marks)Questions 56-60 are based on the following passage.The average automatic teller machine (ATM) is not very smart. It will give money to anyone who has the right card and punches four or five keys in the right order. Some analysts estimate that as many as 30% of ATM transaction worldwide are cases of theft. To increase security at cash machines, some banks have tried to make their ATMs a little smarter. A small camera on the machine looks directly into the eye of every customer. It scans one iris and compares the tiny patterns of ridges, dots, and other features to a code in its computer. If there is a match, the ATM will start counting out cash. If not, a message is automatically sent to the nearest police station.Iris-scanning is one fast-growing form of biometric identification --- determining who someone is by examining features the body. One of the earliest biometric techniques was fingerprinting. The line on fingerprints are unique to each person, so not even identical twins have the same fingerprints. Fingerprinting has become famous as a way of finding out who committed a crime, but it very often fails. A careful criminal can swear gloves, avoid touching thing, or even alter his fingerprints by burning, cutting, or scraping them. In the search for a more reliable system, security experts have focused on the eye.Like a fingerprint, every iris is, for all practical purposes, unique. Each person’s right iris is even different from his or her left one. A low-cost digital camera, like the kind installed at ATM machines, can easily detect hundreds of different features in the iris. The chance of two irises having the same features is close to zero. Tests have shown that iris-scanners are very hard to fool. They can tell the difference between a real iris and a false one. They can see right through colored contact lenses, eyeglasses, and even mirrored sunglasses. Although many criminal are willing to burn or cut their fingers in pursuit of the perfect crime, few would be willing or able to alter their irises.To make iris-scanning work, a computerized database has to match certain iris features with certain people. This means that each A TM customer has to allow a bank to photograph his or her iris and keep that highly personal information in a computer. Some people have worried, however, that an increased use of iris-scanning will lead to a dangerous loss of privacy. By mountingiris-scan cameras in public places, governments could track a private citizen all day long without the person’s knowledge. This would be a great advantage to the p olice, but it could also give corrupt officials a new way to control their opponents. The military’s development of tiny robots suggests that government iris-scanners could even invade private homes!Questions 56-60Complete the summary with words from the passage, changing the form where necessary, with only one word for each blank.ATM transactions are often cases of theft, where an unauthorized user takes (56) ____. To decrease insecurity, some banks have installed iris-scanning machines at ATMs. These small cameras scan the user’s iris, recording its features and (57) ____ them to a digital file. Every person has a (58) ____ iris, making iris identification highly reliable. Earlier efforts at biometric identification often relied on fingerprints. However, fingerprints can easily be (59) ____ through cutting, burning or scrapping. Iris scanners are so effective that they can even see through contact lenses and mirrored sunglasses. Use of iris scanners would provide great advantages to the police. However, others worry about a loss of (60) ____.Section B (10 marks)Questions 61-65 are based on the following passage.Seed catalogues feature hundreds of flowering species. For the persons just beginning garden this can be bewildering, and below are the details of some popular choices, nearly all of which should be sown in the spring. With the exception of busy lizzies, which need a little care, they are all very easy to grow from seed.DahliasThese are sturdy plants bearing showy flowers in a wide range of rather gaudy colors. Sow in a frame in April and plant the seedlings out when frosts are over. Dahlias flower throughout the summer and into the autumn. When autumn frosts begin to make them look unhappy, you should dig up the tuberous roots and save them. A frost-free loft, shed or garage is the ideal place. The following spring you plant the tubers instead of sowing seed again.LupinsLupins are hardy perennials. This means that the plants will stay in your garden and carry on flowering year after year. Seed sown in April will usually give you some spikes of colors in the first summer, and year by year the plants get bigger and the flowering stems get taller and grander. Selective breeding has led to the introduction of some fine, bicolored varieties in some dazzling shades. The short-lived flowers make a real misunderstanding spectacle.Busy lizziesLike dahlias, busy lizzies need to be started offunder glass, as they cannot stand frost, and pantingout is best done in May. Outdoor flowering ends inSeptember, so beat the frosts and bring your favoritespecimens indoors to give your home some sintercolor! Indoors they will carry on floweringindefinitely, though you may like to plant them out again when spring returns. Like pansies (below) they do very well in sun or shade, but the soil must be moist. Most varieties grow to be a height of only 20 cm or so.PotentillasPotentillas are hardy shrubs. In other words, the woody branches spring from ground level—there is no central trunk. Seed is probably best sown in autumn, in which case you should keep the plants in a sheltered spot until April offers favorable conditions for planting out. Once flowering begins in early summer the best varieties (such as Melton Fire) will stay in bloomalmost ceaselessly for years on end while at the same time spreading out to provide ground cover or a low hedge.PansiesPansies have a good long flowering season year after year, and some varieties can be sown in spring to give truly splendid results the first autumn. Unlike dahlias and lupins, which can easily grow a meter tall, pansies grow no higher than 10 or 20 cm. Their soil, position and moisture requirements are just like those of busy lizzies but pansies differ in being hardy. Give them a try!Questions 61-63Decide whether the following statements are true (T) or false (F) according to the passage.61. Both dahlias and lupins, which are sown in April, need protecting from frost.62. Brought indoors in autumn, dahlias, busy lizzies and potentillas will carry on flowering almost non-stop.63. Among all the flowers busy lizzies are not very easy to grow from seed.Section C (10 marks)Questions 66-70 are based on the following passage.When looking for love, people may go to some extreme lengths. They might go on blind dates set up by family and friends. They might write personal ads to place in newspapers. Or they might use a computer to help them in their search for a soul mate by joining an online dating services. Some people have even tried to find their perfect match through game shows on television. Many of these TV dating shows, including The Bachelor and Who Wants to Marry a Millionaire? have proved to be ratings blockbusters, with millions of viewers watching each week to find out which of the contestants will find true love.Of all these game shows, perhaps the one with the most unexpected ending was Mr. Right, which was shown in England in 2002. On the show, a bachelor, thirty-five-year-old Lance Gerrard-Wright, dated fifteen women to find the one who was his ideal partner. The host of the show was Ulrika Johnson, an English celerity originally from Sweden. For seven weeks on the show, Gerrard-Wright took turns going on dates with each of the women, taking them to expensive restaurants and exotic locations. He even met the women’s families and introduced them to his own. Then at the end of each episode, he would choose between one and three of the contestants with whom he had felt the least compatible, and say goodbye to them.At one point during the series, one contestant volunteered to leave because she said she didn’t find him attractive. After two dates she said she had had enough, and she couldn’t see it working. “He wasn’t my cup of tea.” In another episod e the woman he was on a date with burst into tears when he called her by another contestant’s name. “You called me by another girl’s name. I can’t believe you did that. I really liked you,” she sobbed.But in the final episode, the woman he eventually cho se decided she didn’t want to marry him after all. “I think you’ve chosen me because you have to choose someone,” she said. Maybe this was because she already knew he had fallen in love---with the show’s host!After leaving the show, Gerrard-Wright and Johnson were seen dining together and attending parties around London more and more often. Finally, on May 1, 2003, Gerrard-Wright proposed to Johnson on the steps of St. Paul’s Cathedral. And she accepted his proposal right away, although it was a conditional acceptance. Johnson has two children from previous relationships—aneight-year-old son, Cameron, and a two-year-old daughter, Bo. She had to make sure that they agreed to the marriage. Luckily, they did. Gerrard-Wright said, “In the end the show did wor k for me. I grabbed an opportunity to get a girlfriend and I did. Ulrika’s gorgeous.”Questions 66-68Complete the following sentences with information given in the passage in a maximum of 2 words for each blank.66. Lance Gerrard-Wright went to ____ to go on the show Mr. Right in order to find his perfect match.67. On the show, Lance had the opportunity to date many gorgeous women among whom there might be one that he was almost ____.68. Ulrika accepted Lance’s proposal ____ that her children agreed to their marriage as well. Questions 69-70Choose the best answer according to the passage.69. Which of the following did NOT happen on the show?A. Lance went on dates with several women.B. The candidates went to some very good restaurants.C. Ulrika consulted her parents before she made her decision.D. The women met Lance’s family.70. What happened after seven weeks of doing the show?A. All of the women found their beloved.B. Lance started to date with the show’s host.C. One of the women on the show couldn’t help crying.D. Ulrika asked Lance to marry her.Section D (10 marks)Questions 71-75 are based on the following passage.Alaska is disappearing slowly but surely. Since the 1950s, it is estimated that as much as 15 percent of Alaska’s are a has disappeared. But how can a whole state be disappearing?One reason for Alaska’s gradual disappearance is the melting its glaciers. According to one geologist at the US Geological Survey, about 98 percent of Alaska’s glaciers are either unmoving or diminishing. This diminishing seems mainly due to the increase in global temperatures. Since the 1960s, the average year-round temperature has increased by 5℉. Furthermore, the average winter temperature has increased by 8℉. Presently, an estimated 24 cubic miles of ice is disappearing from Alaskan glaciers every year. It may be even more in the near future, as some scientists predict that the average world temperature could go up 2.5 to 10℉by the year 2010.Another problem contributing to Alaska’s gradual di sappearance is its permafrost. (74) Much of the land in Alaska was permanently frozen, or frozen for most of the year, thus maintaining its integrity. Now, the thawing permafrost is causing a number of problems on land. Roads and utility poles are collapsing. Also, the hard permafrost which originally prevented beaches from eroding during violent storms is now melting. Affected villages are forced to relocate. For villages on small low islands, one terrible storm could wipe out the entire community.The melting permafrost and increasing temperature are also having a negative impact on the forests of Alaska. As the permafrost under the forests melts, insects that normally don’t turn upuntil the warmer seasons are appearing sooner. The spruce-bark beetle, for example, is increasing in numbers as a result of global warming. It usually takes about two years for these beetles to grow and reproduce in a very cold weather. However, due to the increase in temperatures, spruce-bark beetles are damaging as many trees in one year as they previously damaged in two. At this rate, Alaska’s forest won’t survive the turn of the century.Some scientists believe that human activity is linked to a global increase in weather temperature. Whether the rising temperature are caused by human activity or natural changes, the fact remains that Alaska is warming. Some others argue that global warming may be a normal trend on the Earth’s temperature chart. (75) One theory argues that we are near the end of aso-called “Little Ice Age”, a nd the return of the glaciers is natural result of this cycle. Whether natural or produced by humans, there is little hope for the immediate future of glaciers as we know them. Horribly, this could be a preview of what will happen to the rest of the world in the next century.Questions 71-73Answer the following questions briefly according to the passage.71. What are disappearing in Alaska actually?72. How much ice is melting each year according to the survey?73. Why do insects damage more trees than before?Questions 74-75Translate the underlined sentences in the passage into Chinese.74. Much of the land in Alaska was permanently frozen, or frozen for most of the year, thus maintaining its integrity75. One theory argues that we are near the end of a so-called “Little Ice Age”, and the return of the glaciers is natural result of this cycle. Whether natural or produced by humans, there is little hope for the immediate future of glaciers as we know them.Part V Translation (10 marks)Translate the following sentences into English, using the hints given in brackets. Remember to write the answers on the answer sheet.76. 宴会时间就要到了,但她仍纠结于是否应该去。
信息学奥林匹克联赛初赛试题(C 普及组) 推理题
※在平面内任取n个整点(横纵坐标都是整数),其中一定存在两个点,它们连线的中点也是整点,那么n至少是?#建立直角坐标系来解决这个问题设所取得n个点的坐标为(X1,Y1),(X2,Y2),……,(Xn,Yn)1)当有三个点时显然,三个点可以保证存在两个点使其中点的横坐标为整数(这是因为任意三个数肯定存在同奇或同偶两个数)但是不能保证这两个点中点的纵坐标也是偶数比如取(奇,偶),(奇,奇),(偶,奇)这三个点就是一个反例2)当有四个点时接着用上面的方法进行分析,可知,如下情况是一个反例(其中“奇”代表奇数;“偶”代表“偶数”)(奇,奇),(奇,偶),(偶,奇),(偶,偶)3)当有五个点时当有五个点时,至少存在三个点,其横坐标同奇或同偶,而这三个点中,至少存在两个点是同奇或同偶的,那么可以判定,这两个点的横纵坐标的奇偶性完全一样,因此这两个点的中点是个整点综上所述,平面上任取五个整点,可以保证其中存在两个点,其中点为整点#想象横纵交错的网格纸,就像棋盘那样的,每个横纵线交点就是一个整点。
如下图向左转|向右转任意三个点如果共线,即处在水平,竖直,或者对角线上,则其中定存在两个点满足连线中点是整点。
点共如果n=2,取两个连续的整点,那么连线中点不是整点。
如果n=3,取水平两个连续的点,垂直也两个连续的点,组成三角形。
那么连线中点不是整点。
如果n=4,取四个整点组成一个正方形,则连线中点不是整点。
而取5个点的话,必然有两个点的连线中点是整点。
※在NOI期间,主办单位为了欢迎来自全国各地的选手,举行了盛大的晚宴。
在第十八桌,有五名大陆选手和五名港澳选手共同进膳。
为了增进交流,他们决定相隔就做,即每个大陆选手左右相邻都是港澳选手、每个港澳选手左右相邻的都是大陆选手。
那么,这一桌共有多少种不同的坐做方案?(注意:如果在两个方案中,每个选手左右相邻的选手均相同,则视为同一个方案。
)#这是个排列着组合问题啊。
就是我没明白5个大陆人算是一种人还是分别不同的人、港澳的也是如果分别为不同的人。
NOIP2013初赛普及组C++题目及答案
第十九届全国青少年信息学奥林匹克联赛初赛普及组C++语言试题竞赛时间:2013 年10 月13 日14:30~16:30选手注意:试题纸共有9 页,答题纸共有2 页,总分值100 分。
请在答题纸上作答,写在试题纸上的一律无效。
不得使用任何电子设备〔如计算器、、电子词典等〕或查阅任何书籍资料。
一、单项选择题〔共20 题,每题 1.5 分,共计30 分;每题有且仅有一个正确选项〕1. 一个32 位整型变量占用〔〕个字节。
A. 4B. 8C. 32D. 1282. 二进制数11.01 在十进制下是〔〕。
A. 3.25B. 4.125C. 6.25D. 11.1253. 下面的故事与〔〕算法有着异曲同工之妙。
从前有座山,山里有座庙,庙里有个老和尚在给小和尚讲故事:从前有座山,山里有座庙,庙里有个老和尚在给小和尚讲故事:‘从前有座山,山里有座庙,庙里有个老和尚给小和尚讲故事....’A. 枚举B. 递归C. 贪心D. 分治4. 逻辑表达式〔〕的值与变量A 的真假无关。
A. (A∨B)∧﹃AB. (A∨B)∧﹃BC. (A ∧B) ∨(﹃A ∧B)D. (A ∨B)∧﹃A ∧B5. 将〔2, 6, 10, 17〕分别存储到某个地址区间为0~10 的哈希表中,如果哈希函数h(x) =〔〕,将不会产生冲突,其中a mod b 表示a 除以b 的余数。
A. x mod 11B. x2 mod 11C. 2x mod 11D. |√2| mod 11 ,其中√X表示√X下取整6. 在十六进制表示法中,字母 A 相当于十进制中的〔〕。
A. 9B. 10C. 15D. 167. 以下图中所使用的数据结构是〔〕。
A. 哈希表B. 栈C. 队列D. 二叉树8. 在Windows 资源管理器中,用鼠标右键单击一个文件时,会出现一个名为“复制”的操作选项,它的意思是〔〕。
A. 用剪切板中的文件替换该文件B. 在该文件所在文件夹中,将该文件克隆一份C. 将该文件复制到剪切板,并保留原文件D. 将该文件复制到剪切板,并删除原文件9. 已知一棵二叉树有10 个节点,则其中至多有〔〕个节点有 2 个子节点。
NOI新编初赛普及组C++题目及答案
第十四届全国青少年信息学奥林匹克联赛初赛试题 2 0 0 8(普及组C++语言二小时完成)• • 全部试题答案均要求写在答卷纸上,写在试卷纸上一律无效•• 一、单项选择题(共20题,每题1.5 分,共计30 分。
每题有且仅有一个正确答案.)。
1.微型计算机中,控制器的基本功能是() 。
A. 控制机器各个部件协调工作B.实现算术运算和逻辑运算C. 获取外部信息 D .存放程序和数据2. 设A=true ,B=false ,C=true ,D=false ,以下逻辑运算表达式值为真的是()。
A. (A A B) V (C A D V A)B.(( A A B) V C) A DC.(B V C V D) A D A AD.A A (D V C) A B3. 在下列关于图灵奖的说法中,不正确的是()。
A. 图灵奖是美国计算机协会于1966年设立的,专门奖励那些对计算机事业作出重要贡献的个人B. 图灵奖有“计算机界诺贝尔奖”之称C. 迄今为止,还没有华裔计算机科学家获此殊荣D. 图灵奖的名称取自计算机科学的先驱、英国科学家阿兰•图灵4.计算机在工作过程中,若突然停电,()中的信息不会丢失。
5.完全二叉树共有2*N-1 个结点,则它的叶节点数是()。
NN-16. 在以下各项中,()不是操作系统软件。
WindowsVistaD.Sybase7 .设栈S的初始状态为空,元素a, b, c, d, e, f依次入栈S,出栈的序列为b, d, f , e, c, a,则栈S的容量至少应该是()。
A.6B.5C.4D.38. 与十进制数28.5625 相等的四进制数是()。
131.22 C9. 设字符串S=” Olympic ”,S的非空子串的数目是()。
A.28B.29C.16D.1710. Web2.0是近年来互联网的热门概念之一,其核心思想是互动与分享。
下列网站中,()是典型的Web2.0应用。
11. 递归过程或函数调用时,处理参数和返回地址,通常使用一种称为()的数据结构。
NOIP2013普及组初赛模拟试题1(含答案)
NOIP 2013初赛模拟题一一、选择题:(本题共20题,每题1.5分,共计30分)1、在计算机内部用来传送、存贮、加工处理的数据或指令都是以()形式进行的。
A、二进制码B、八进制码C、十进制码D、智能拼音码2、计算机的软件系统通常分为()A、硬件系统和软件系统B、高级软件和一般软件C、系统软件和应用软件D、军用软件和民用软件3、关于软盘读写孔,正确的说法是()。
A.从该孔读信息B.从该孔写信息C.当该孔处于开状态时,不能删除盘中文件。
D.该孔没有作用4、一棵二叉树的中序遍历为DGBAECHF,后序遍历为GDBEHFCA,则前序遍历是()A、ABCDFGHEB、ABDGCEFHC、ACBGDHEFD、ACEFHBGD5、下列叙述中错误的是()。
A、微机应避免置于强磁场之中B、微机使用时间不宜过长,而应隔几个小时关机一次C、微机应避免频繁关开,以延长其使用寿命D、微机应经常使用,不宜长期闲置不用6、计算机网络最主要的优点是()。
A、运算速度快B、共享资源C、精度高D、存储容量大7、下列4个不同进制表示的数中,最大的一个数是()A、(220.1)10B、(11011011.1)2C、(334.1)8D、(DC.1) 168、为了区分汉字与ASCII码,计算机中汉字编码的最高位为()A、1B、0C、-1D、29、下列不正确的文件名是()。
A. command。
ComB. command_comC. command,comD. command:com10、一般来说,TCP/IP的IP提供的服务是( )A.运输层服务B.会话层服务C.表示层服务D.网络层服务11、通信时,模拟信号也可以用数字信道来传输,能实现模拟信号与数字信号之间转换功能的是()A、D/AB、A/DC、ModemD、Codec12、一个栈的输入顺序为1、2、3、4、5,下列序列中可能是栈的输出序列是()。
A、54312B、24135C、21543D、1253413、不属于Internet的功能是()A、聊天B、远程教育C、查询资料D、传送能量14、下列描述计算机病毒的特性中,()不是正确的。
小朋友的数字(noip2013普及组第三题)参考答案
for(i=1;i<n;i++)
{
sum=sum+shuzi[i];
if(sum>tezheng[i-1])
tezheng[i]=sum;
else
tezheng[i]=tezheng[i-1];
printf("%d\n",max);
}
else
{
max=max%p;
printf("%d\n",max);
}
getch();
}
{
int n,p,shuzi[1000],tezheng[1000],fenshu[1000],sum,i,max;
scanf("%d %d",&n,&p);
for(i=0;i<n;i++)
scanf("%d",&shuzi[i]);
tezheng[0]=shuzi[0];
小朋友的数字(noip2013普及组第三题)(number.cpp/c/pas)
描述
有 n 个小朋友排成一列。每个小朋友手上都有一个数字,这个数字可正可负。规定每个小朋友的特征值等于排在他前面(包括他本人)的小朋友中连续若干个(最少有一个)小朋友手上的数字之和的最大值。 作为这些小朋友的老师,你需要给每个小朋友一个分数,分数是这样规定的:第一个小朋友的分数是他的特征值,其它小朋友的分数为排在他前面的所有小朋友中(不包括他本人),小朋友分数加上其特征值的最大值。
}
for(i=0;i<n;i++)
noip初赛普及组c试题及答案
n o i p初赛普及组c试题及答案文件管理序列号:[K8UY-K9IO69-O6M243-OL889-F88688]第十届全国青少年信息学奥林匹克联赛初赛试题(普及组C语言二小时完成)●●全部试题答案均要求写在答卷纸上,写在试卷纸上一律无效●●一.选择一个正确答案代码(A/B/C/D/E),填入每题的括号内(每题1.5分,共30分)1.美籍匈牙利数学家冯·诺依曼对计算机科学发展所做出的贡献是()。
A.提出理想计算机的数学模型,成为计算机科学的理论基础。
B.是世界上第一个编写计算机程序的人。
C.提出存储程序工作原理,并设计出第一台具有存储程序功能的计算机EDVAC。
D.采用集成电路作为计算机的主要功能部件。
E.指出计算机性能将以每两年翻一番的速度向前发展。
2.下列哪个不是CPU(中央处理单元)()。
A.IntelItaniumB.DDRSDRAMC.AMDAthlon64D.AMDOpteronE.IBMPower53.下列网络上常用的名字缩写对应的中文解释错误的是()。
A.WWW(WorldWideWeb):万维网。
B.URL(UniformResourceLocator):统一资源定位器。
C.HTTP(HypertextTransferProtocol):超文本传输协议。
D.FTP(FileTransferProtocol):快速传输协议。
E.TCP(TransferControlProtocol):传输控制协议。
4.下面哪个部件对于个人桌面电脑的正常运行不是必需的()。
A.CPUB.图形卡(显卡)C.光驱D.主板E.内存5.下列哪个软件属于操作系统软件()。
A.MicrosoftWordB.金山词霸C.FoxmailD.WinRARE.RedHatLinux6.下列哪个不是计算机的存储设备()。
A.文件管理器B.内存C.高速缓存D.硬盘E.U盘7.下列说法中错误的是()。
A.CPU的基本功能就是执行指令。
第十九届2013全国青少年信息学奥林匹克联赛初赛试题C++及解析
第十九届全国青少年信息学奥林匹克联赛初赛提高组C++语言试题竞赛时间:2013年10月13日14:30~16:30选手注意:●试题纸共有12页,答题纸共有2页,满分100分。
请在答题纸上作答,写在试题纸上的一律无效。
●不得使用任何电子设备(如计算器、手机、电子词典等)或查阅任何书籍资料。
一、单项选择题(共15题,每题1.5分,共计22.5分;每题有且仅有一个正确选项)1.一个32位整型变量占用(a)个字节。
A.4B.8C.32D.1282.二进制数11.01在十进制下是(d)。
A.3.25B.4.125C.6.25D.11.1253.下面的故事与(a)算法有着异曲同工之妙。
从前有座山,山里有座庙,庙里有个老和尚在给小和尚讲故事:?从前有座山,山里有座庙,庙里有个老和尚在给小和尚讲故事:‘从前有座山,山里有座庙,庙里有个老和尚给小和尚讲故事....’?A.枚举B.递归C.贪心D.分治4.1948年,(d)将热力学中的熵引入信息通信领域,标志着信息论研究的开端。
A.冯·诺伊曼(John von Neumann)B.图灵(Alan Turing)C.欧拉(Leonhard Euler)D.克劳德·香农(Claude Shannon)5.已知一棵二叉树有2013个节点,则其中至多有(c)个节点有2个子节点。
A.1006B.1007C.1023D.10246.在一个无向图中,如果任意两点之间都存在路径相连,则称其为连通图。
右图是一个有5个顶点、8条边的连通图。
若要使它不再是连通图,至少要删去其中的(a)条边。
A.2B.3C.4D.57.斐波那契数列的定义如下:F1=1,F2=1,Fn=Fn–1+Fn–2(n≥3)。
如果用下面的函数计算斐波那契数列的第n项,则其时间复杂度为(d)。
int F(int n){if(n<=2)return 1;elsereturn F(n-1)+F(n-2);}A.O(1)B.O(n)C.O(n2)D.O(F n)8.二叉查找树具有如下性质:每个节点的值都大于其左子树上所有节点的值、小于其右子树上所有节点的值。
noip普及组初赛试题及答案
noip普及组初赛试题及答案一、选择题(每题5分,共50分)1. 在计算机系统中,CPU的中文意思是什么?A. 中央处理器B. 存储器C. 输入输出设备D. 操作系统答案:A2. 下列关于二进制数的描述,错误的是?A. 二进制数只有0和1两个数字B. 二进制数的每一位代表2的幂次C. 二进制数的运算规则与十进制数相同D. 二进制数可以表示计算机中的数据答案:C3. 在编程语言中,用于控制程序流程的语句是?A. 赋值语句B. 条件语句C. 循环语句D. 所有选项答案:D4. 下列哪种数据结构不属于线性数据结构?A. 数组B. 链表C. 树D. 图答案:D5. 在计算机程序中,用于存储临时数据的存储区域是?A. 硬盘B. 内存C. 缓存D. 寄存器答案:B6. 以下哪个算法的时间复杂度是O(n^2)?A. 快速排序B. 归并排序C. 插入排序D. 线性查找答案:C7. 在数据库中,用于存储数据的表之间的关系称为?A. 索引B. 视图C. 外键D. 触发器答案:C8. 下列关于递归函数的描述,正确的是?A. 递归函数不能包含循环B. 递归函数必须有终止条件C. 递归函数可以无限递归D. 递归函数可以没有递归调用答案:B9. 在操作系统中,用于管理内存的机制是?A. 文件系统B. 进程调度C. 内存管理D. 网络通信答案:C10. 在网络通信中,TCP协议的主要作用是?A. 传输文件B. 建立连接C. 错误检测D. 路由选择答案:B二、填空题(每题5分,共30分)1. 在计算机中,一个字节由____位二进制数组成。
答案:82. 一个完整的算法应该包含输入、____和输出三个基本部分。
答案:处理3. 在编程中,____是一种常用的数据结构,用于存储具有相同数据类型的元素集合。
答案:数组4. 在面向对象编程中,封装、继承和____是三个基本特征。
答案:多态5. 在关系型数据库中,____是一种特殊的表,用于定义表之间的关系。
第13届全国青少年信息学奥林匹克联赛初赛试题_普P_附答案
第十三届全国青少年信息学奥林匹克联赛初赛试题(普及组 Pascal 语言二小时完成)一、 单项选择题(共20题,每题1.5分,共计30分。
每题有且仅有一个正确答案。
)1.在以下各项中,()不是CPU的组成部分。
A.控制器B.运算器C.寄存器D.主板2.在关系数据库中,存放在数据库中的数据的逻辑结构以()为主。
A.二叉树B.多叉树C.哈希表D.二维表3.在下列各项中,只有()不是计算机存储容量的常用单位。
A.Byte B.KB C.UB D.TB4.ASCII码的含义是()。
A.二→十进制转换码 B.美国信息交换标准代码C.数字的二进制编码D.计算机可处理字符的唯一编码5.一个完整的计算机系统应包括()。
A.系统硬件和系统软件B.硬件系统和软件系统C.主机和外部设备D.主机、键盘、显示器和辅助存储器6.IT的含义是()。
A.通信技术B.信息技术C.网络技术D.信息学7.LAN的含义是()。
A.因特网B.局域网C.广域网D.城域网8.冗余数据是指可以由其它数据导出的数据。
例如,数据库中已存放了学生的数学、语文和英语的三科成绩,如果还存放三科成绩的总分,则总分就可以看作冗余数据。
冗余数据往往会造成数据的不一致。
例如,上面4个数据如果都是输入的,由于操作错误使总分不等于三科成绩之和,就会产生矛盾。
下面关于冗余数据的说法中,正确的是()。
A.应该在数据库中消除一切冗余数据B.用高级语言编写的数据处理系统,通常比用关系数据库编写的系统更容易消除冗余数据C.为了提高查询效率,在数据库中可以保留一些冗余数据,但更新时要做相容性检验D.做相容性检验会降低效率,可以不理睬数据库中的冗余数据9.在下列各软件,不属于NOIP竞赛(复赛)推荐使用的语言环境有()。
A.gcc B.g++ C.Turbo C D.Free Pascal10.以下断电后仍能保存数据的有()。
A.硬盘B.高速缓存C.显存D.RAM11.在下列关于计算机语言的说法中,正确的有()。
NOIP2013第十九届普及组初赛题目C++和答案-
第十九届全国青少年信息学奥林匹克联赛初赛普及组C++语言试题竞赛时间:2013 年10 月13 日14:30~16:30选手注意:●试题纸共有9 页,答题纸共有2 页,满分100 分。
请在答题纸上作答,写在试题纸上的一律无效。
●不得使用任何电子设备(如计算器、手机、电子词典等)或查阅任何书籍资料。
一、单项选择题(共20 题,每题1.5 分,共计30 分;每题有且仅有一个正确选项)1.一个32 位整型变量占用()个字节。
D. 128A. 4B. 8C. 322.二进制数11.01 在十进制下是()。
A. 3.25B. 4.125C. 6.25D. 11.1253.下面的故事与()算法有着异曲同工之妙。
从前有座山,山里有座庙,庙里有个老和尚在给小和尚讲故事:‚从前有座山,山里有座庙,庙里有个老和尚在给小和尚讲故事:‘从前有座山,山里有座庙,庙里有个老和尚给小和尚讲故事....’‛A.枚举B. 递归C. 贪心D. 分治4.逻辑表达式()的值与变量A 的真假无关。
A.(A ˅ B) ˄ ¬AB. (A ˅ B) ˄ ¬BC. (A ˄ B) ˅ (¬A ˄ B)D. (A ˅ B) ˄ ¬A ˄ B5.将(2, 6, 10, 17)分别存储到某个地址区间为0~10 的哈希表中,如果哈希函数h(x) =(),将不会产生冲突,其中a mod b 表示a 除以b 的余数。
A.x mod 11B. x2 mod 11C. 2x mod 11D. ,其中下取整6.在十六进制表示法中,字母A 相当于十进制中的()。
A.9B. 10C. 15D. 167.下图中所使用的数据结构是()。
压入A 压入 B 弹出B 压入CA.哈希表B. 栈C. 队列D. 二叉树8.在Windows 资源管理器中,用鼠标右键单击一个文件时,会出现一个名为“复制”的操作选项,它的意思是()。
A. 用剪切板中的文件替换该文件B.在该文件所在文件夹中,将该文件克隆一份C.将该文件复制到剪切板,并保留原文件D.将该文件复制到剪切板,并删除原文件9.已知一棵二叉树有10 个节点,则其中至多有()个节点有2 个子节点。
c03-NOIP2013初赛答案解析
一、单选题(15*1.5)1、A,一个字节有8个bit,32位整型变量占用4个字节,故选A。
2、A,二进制11.01转为十进制,(11.01)2 = 1*2+1+0*0.5+1*0.25 = (3.25)10 。
3、B,老和尚给小和尚讲的故事里边有故事本身,递归是函数内部调用函数本身,故选B,递归。
4、D,香农信息论鼻祖。
5、A,一定是满二叉树时拥有2个字节点的节点数最多,最下一层会有2013-1023=990个节点,于是倒数第二层会有990/2=495个节点有2个字节点,从第1层到倒数第三层共有1023-2^9=511个节点,且这些节点都是用2个子节点的节点,所以共有495+511=1006个,选A。
6、B,要使图不联通,只要其中某一个节点不连通即可,所有顶点度最少是3,所以最少需要删除3条边,选B。
7、D,此题最开始一眼扫到的时候脑子进水,跟学生将选B,O(n),实际上不是,计算F1需要1次,计算F2需要一次,计算Fn需要计算F(n-1)的次数加上F(n-2)的次数,所以其实就是计算Fn次,于是答案选择D,至于这个Fn到底是多大,数学上可以计算,它等于O(((1+sqrt(5))/2)^n).8、B,这个必须是B,没有什么好说的,中序遍历保证左边都是小于根的,右边都是大于根的,所以可以保证是一个有序序列。
9、D,A项6和17对11取余都是6发生冲突,B项10的平方和17的平方对11取余都是1发生冲突,C项6的两倍和17的两倍对11取余都是1发生冲突,D 项分别为1,2,3,4,不冲突。
10、D,IPV6地址是128位的。
谢谢网友指正!11、C,二分为6个和6个的顶点,此时边最多,有36条边。
12、B,我的学生几乎全选A去了,因为之前讲题只介绍过ASCII码,但是看到统一二字也应该想到Uni...前缀啊。
13、D,64位非零浮点数强制转换成32位浮点数,两个数会有大小上的细微差别,但不会发生符号变化,因为有专门的符号位。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
第十九届全国青少年信息学奥林匹克联赛初赛普与组语言试题竞赛时间:2013 年10 月13 日14:30~16:30选手注意:试题纸共有9 页,答题纸共有2 页,满分100 分。
请在答题纸上作答,写在试题纸上的一律无效。
不得使用任何电子设备(如计算器、手机、电子词典等)或查阅任何书籍资料。
一、单项选择题(共20 题,每题1.5 分,共计30 分;每题有且仅有一个正确选项)1. 一个32 位整型变量占用()个字节。
A. 4B. 8C. 32D. 1282. 二进制数11.01 在十进制下是()。
A. 3.25B. 4.125C. 6.25D. 11.1253. 下面的故事与()算法有着异曲同工之妙。
从前有座山,山里有座庙,庙里有个老和尚在给小和尚讲故事:从前有座山,山里有座庙,庙里有个老和尚在给小和尚讲故事:‘从前有座山,山里有座庙,庙里有个老和尚给小和尚讲故事....’A. 枚举B. 递归C. 贪心D. 分治4. 逻辑表达式()的值与变量A 的真假无关。
A. (A ∨B) ∧﹃AB. (A ∨B) ∧﹃BC. (A ∧B) ∨(﹃A ∧B)D. (A ∨B) ∧﹃A ∧B5. 将(2, 6, 10, 17)分别存储到某个地址区间为0~10 的哈希表中,如果哈希函数h(x) = (),将不会产生冲突,其中a b 表示a 除以b 的余数。
A. x 11B. x2 11C. 2x 11D. |√2| 11 ,其中√X表示√X下取整6. 在十六进制表示法中,字母A 相当于十进制中的()。
A. 9B. 10C. 15D. 167. 下图中所使用的数据结构是()。
A. 哈希表B. 栈C. 队列D. 二叉树8. 在资源管理器中,用鼠标右键单击一个文件时,会出现一个名为“复制”的操作选项,它的意思是()。
A. 用剪切板中的文件替换该文件B. 在该文件所在文件夹中,将该文件克隆一份C. 将该文件复制到剪切板,并保留原文件D. 将该文件复制到剪切板,并删除原文件9. 已知一棵二叉树有10 个节点,则其中至多有()个节点有2 个子节点。
A. 4B. 5C. 6D. 710. 在一个无向图中,如果任意两点之间都存在路径相连,则称其为连通图。
下图是一个有4 个顶点、6 条边的连通图。
若要使它不再是连通图,至少要删去其中的()条边。
A. 1B. 2C. 3D. 411. 二叉树的()第一个访问的节点是根节点。
A. 先序遍历B. 中序遍历C. 后序遍历D. 以上都是12. 以A0 作为起点,对下面的无向图进行深度优先遍历时,遍历顺序不可能是()。
A. A0, A1 , A2, A3B. A0, A1, A3, A2C. A0, A2, A1, A3D. A0, A3, A1, A213. 4 协议使用32 位地址,随着其不断被分配,地址资源日趋枯竭。
因此,它正逐渐被使用()位地址的6 协议所取代。
A. 40B. 48C. 64D. 12814. ()的平均时间复杂度为O(n n),其中n 是待排序的元素个数。
A. 快速排序B. 插入排序C. 冒泡排序D. 基数排序15. 下面是根据欧几里得算法编写的函数,它所计算的是 a 和 b 的()。
( a, b){(b 0)a;(b, a % b);}A. 最大公共质因子B. 最小公共质因子C. 最大公约数D. 最小公倍数16. 通常在搜索引擎中,对某个关键词加上双引号表示()。
A. 排除关键词,不显示任何包含该关键词的结果B. 将关键词分解,在搜索结果中必须包含其中的一部分C. 精确搜索,只显示包含整个关键词的结果D. 站内搜索,只显示关键词所指向网站的内容17. 中国的国家顶级域名是()。
A. B. C. D.18. 把64 位非零浮点数强制转换成32 位浮点数后,不可能()。
A. 大于原数B. 小于原数C. 等于原数D. 与原数符号相反19. 下列程序中,正确计算1, 2, ⋯, 100 这100 个自然数之和(初始值为0)的是()。
20. 复赛全国统一评测时使用的系统软件是()。
A. B. C. D.二、问题求解(共2 题,每题5 分,共计10 分;每题全部答对得 5 分,没有部分分)1. 7 个同学围坐一圈,要选2个不相邻的作为代表,有种不同的选法。
2. 某系统自称使用了一种防窃听的方式验证用户密码。
密码是n 个数s1, s2, ⋯, ,均为0或1。
该系统每次随机生成n 个数a1, a2, ⋯, ,均为0或1,请用户回答(s1a1 + s2a2 + ⋯+ ) 除以2 的余数。
如果多次的回答总是正确,即认为掌握密码。
该系统认为,即使问答的过程被泄露,也无助于破解密码——因为用户并没有直接发送密码。
然而,事与愿违。
例如,当n = 4 时,有人窃听了以下5 次问答:就破解出了密码s1 = ,s2 = ,s3 = ,s4 = 。
三、阅读程序写结果(共4 题,每题8 分,共计32 分)1.<>;(){a, b;>>a>>b;<<a<<"+"<<b<<"="<<<<;}输入:3 5输出:2.<>;(){a, b, u, i, ;>>a>>b>>u; = 0;(i = a; i <= b; ) ((i % u) 0);<<<<; 0;}输入:1 100 15输出:3.<>;(){= 100;n, f, i, , , , a[];>>n>>f;(i = 1; i <= n; )>>a[i]; = 1;= n;{= ( + ) / 2;(f <= a[])= ;= + 1;} ( < );<<<<;0;}输入:12 172 4 6 9 11 15 17 18 19 20 21 25输出:4.<>;(){= 100;[], [], n, ;>>n;( i = 0; i < n; ){>>[i]; [i] = 1;( j = 0; j < i; ){(([j] < [i]) ([j] >= [i]))[i] = [j]+1;}}= 0;( i = 0; i < n; ){([i] > ) = [i];}<<<<;}输入:62 53 11 12 4输出:四、完善程序(共2 题,每题14 分,共计28 分)1. (序列重排)全局数组变量a 定义如下:= 100;a[], n;它记录着一个长度为n 的序列a[1], a[2], ⋯, a[n]。
现在需要一个函数,以整数p (1 ≤p ≤n) 为参数,实现如下功能:将序列a 的前p个数与后n –p 个数对调,且不改变这p 个数(或n –p 个数)之间的相对位置。
例如,长度为5 的序列1, 2, 3, 4, 5,当p = 2 时重排结果为3, 4, 5, 1, 2 。
有一种朴素的算法可以实现这一需求,其时间复杂度为O( n)、空间复杂度为 O(n):1( p){i, j, b[];(i = 1; i <= p; )b[ (1) ] = a[i]; (3 分)(i = p + 1; i <= n; )b[i - p] = (2) ; (3 分)(i = 1; i <= (3) ; ) (2 分)a[i] = b[i];}我们也可以用时间换空间,使用时间复杂度为O(n2)、空间复杂度为O(1) 的算法:2( p){i, j, ;(i = p + 1; i <= n; ){= a[i];(j = i; j >= (4) ; ) (3 分)a[j] = a[j - 1];(5) = ; (3 分)}}2. (二叉查找树)二叉查找树具有如下性质:每个节点的值都大于其左子树上所有节点的值、小于其右子树上所有节点的值。
试判断一棵树是否为二叉查找树。
输入的第一行包含一个整数n,表示这棵树有n 个顶点,编号分别为1, 2, ⋯, n,其中编号为1 的为根结点。
之后的第i 行有三个数, , ,分别表示该节点关键字的值、左子节点的编号、右子节点的编号;如果不存在左子节点或右子节点,则用0 代替。
输出 1 表示这棵树是二叉查找树,输出0 则表示不是。
<> = 100;= 1000000;{, , ;} a[];( , , ){;( 0)1;= a[];(( > ) ( (1) ) ((a[], , ) 1) (( (2) , (3) , (4) ) 1)) 1;0;}(){i, n; >>n;(i = 1; i <= n; )>>a[i]>>a[i]>>a[i];<<( (5) , , )<<;0;}第十九届全国青少年信息学奥林匹克联赛初赛普与组参考答案一、单项选择题(共20 题,每题1.5分,共计30分)1 2 3 4 5 6 7 8 9 10A ABCD B B C A C11 12 13 14 15 16 17 18 19 20A A D A C C A D A B二、问题求解(共2 题,每题5 分,共计10 分;每题全部答对得5 分,没有部分分)1. 142. s1 = 0,s2 = 1,s3 = 1,s4 = 1三、阅读程序写结果(共4 题,每题8 分,共计32 分)1. 3+5=82. 63. 74. 4四、完善程序(共计28 分,以下各程序填空可能还有一些等价的写法,由各省赛区组织本省专家审定与上机验证,可以不上报科学委员会复核)1. (1) n –p + i(2) a[i](3) n(4) i –p + 1(5) a[i–p]2. (1) <(2) a[](3)(4)(5) 1。