USACO 2019.1月铜组Bronze竞赛真题(中文)

合集下载

2019年全国大学生英语竞赛C类初赛决赛真题及答案汇总集原创60页word

2019年全国大学生英语竞赛C类初赛决赛真题及答案汇总集原创60页word

2019年全国大学生英语竞赛初赛试题2019 National English Contest for College Students(Preliminary)Part I Listening Comprehension(30 minutes,30 points)Section A Dialogues(10 points)Directions:In this section ,you will hear 10 short dialogues.At the end of each dialogue,a question will be asked about what was said.Both the dialogue and the question will be read only once.After each question there will be a pause.during the pause,you must read the four choices marked A,B,C and D,and decide which is the best answer.Then m ark the corresponding letter on the Answer Sheet with a single line through the center.1.A.A sales clerk.B.A police officer.C.A tailor.D.A nurse.2.A.By train.B.She walks.C.By car.D.By bus.3.A.Fish is the only dish left.B.Chicken is the only dish left.C.Vegetarian meals are not offered.D.There aren't any vegetarian meals left.4.A.He starts work next weekend.B.He'll be away.C.He'll be in the mountains.D.He's moving to Florida.5.A.In an elevator.B.At a dress store.C.On the seventh floor.D.At a department store.6.A.They felt it was disorganized.B.They were pleased with its Asian content.C.They felt it lacked Asian content.D.They felt it ignored recent events.7.A.He doesn't have enough time.B.He doesn't have a watch.C.The library doesn't have the articles he wants.D.He can't find the library.8.A.He wants the woman to dine out with them.B.He wants to work tomorrow.C.He wants the woman to finish dinner first.D.He wants to pay for the dinner.9.A.Twice a day.B.Twice a week.C.Once a week.D.Daily.10.A.At two o'clock.B.At four o'clock.C.At three thirty.D.At eight o'clock.Section B News Items(10 points)Directions:In this section,you will hear 10 pieces of short news from BBC or VOA.There will be a question following each piece of news.Write down the answer to each question in no more than 15 words.11._______________________________________12._______________________________________13._______________________________________14._______________________________________15._______________________________________16._______________________________________17._______________________________________18._______________________________________19._______________________________________20._______________________________________Section C Compound Dictation(10 points)Directions:In this section,you will hear a passage three times.When the passage is read for the first time,you should listen carefully for its general idea.Then listen to the passage again.When the passage is read for the second time,you are required to fill in the blanks numbered from 21 to 28 with the exact words you have just heard.For blanks numbered from 29 to 30,you are required to fill in the missing information.You can either use the exact words you have just heard or write down the main points in your own words.Finally,when the passage is read for the third time,you should check what you have written and rewrite the correct answers on the Answer Sheet.Although general Motors and General Electric are large multinational companies with operations around the globe,there are numerous smaller companies that engage in international trade.Because 95percent of the world's population and two-thirds of its (21)_____ power are located outside the United States,it is important for American (22)_____to be present in foreign markets.However,before we explain the different methods by which a company may (23)_____in international trade,we might first consider some important (24)_____that U.S.companies often fail to study before they sell products in a foreign country.These factors are (25)_____with differences in language,in values and attitudes,and in political (26)_____.When (27)_____Coca-Cola into the Chinese market in 1920,the company used a group of Chinese symbols that,when spoken,sounded like Coca-Cola.However,when read,these symbols meant,“a female horse fattened with wax”.Upon reentering the Chinese market in the 1970s,Coca-Cola used a series of Chinese (28)_____that translates into“happiness in the mouth”.(29)_________________________.Culture is the total pattern of human behavior that is practiced by a particular group of people.(30)_________________________.Part II V ocabulary and Structure(15 minutes,30 points)Section A Multiple Choice(20 points)Directions:Questions 31-50 constitute a complete passage.There are 20blanks in the passage.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 centre.31.Senior Metropolitan police officers tried to dismiss the Noting Hill race riots which raged for five nights over the August bank holiday in 1958 as the work of“ruffians ,both colored and white”hell-bent on hooliganism ,according to _____ official files.A.recent revealed B.newly releasedC.previous disclosing D.earlier exposing32.But police eyewitness reports in the secret papers_____ that they were overwhelmingly the work of a white working class mob out to get the“niggers”.A.contain B.convinceC.consist D.confirm33.The ferocity of the Noting Hill“racial riots”,as the press called them at the time,shocked Britain into_____ for the first time that it was not above the kind of racial conflict then being played out in the American deep south.A.realizing B.witnessingC.watching D.identifying34.The carnival,which will_____ the streets of west London _____more than 1.5 million people this weekend,was started in 1959 as a direct response to the riots.A.crowd;of B.pour;forC.fill;with D.emerge;in35.While senior officers tried to play down the racial aspects of the riots,the internal Metropolitan police files released this month at the public record office confirm that the disturbances were overwhelmingly _____ by 300 to 400 strong“Keep Britain White”mobs ,many of them Teddy boys armed with iron bars ,butcher's knives and weighted leather belts,who went“nigger-hunting”among the West Indian residents of Noting Hill and Noting Dale.A.erupted B.commencedC.triggered D.inaugurated36.The first night left five black men _____ on the pavements of Noting Hill.A.lying unconscious B.there diedC.feel faint D.serious hurt37.The battles raged over the bank holiday weekend as the black _____responded in kind with counterattacks by large groups of“men of color”similarly armed.A.column B.armyC.brigade D.community38.Thomas Williams was stopped by the police as he came out of Bluey's Club on Talbot Road,Noting Hill.He _____a piece of iron down his left trouser leg,a petrol bomb in his right pocket and a razor blade in his inside breast pocket:“I have to protect myself,”he told the arresting officer.A.found to have B.was found to haveC.found having D.was found having39.The _____ files,which were sealed under the 75-year rule but have been released early,show that senior officers tried to convince the then home secretary,“Rab”Butler,that there was not a racial element to the rioting.A.forbidden B.confidentialC.incredible D.strict40.In his official report,Detective Sergeant M.Walters of the Notting Hill police said the national press had been wrong to portray the“widespread series of street disturbances”as“racial”riots:“Whereas there certainly was some _____ feeling between white and colored residents in this area,it is abundantly clear much of the trouble was caused by ruffians,both colored and white,who seized on this opportunity to indulge in hooliganism .”A.ill B.sickC.painful D.hurt41.But the police witness statements and private statistics _____ .A.told differently B.interpreted in a different wayC.existed m any differences D.told a different story42.The Met com missioner was told that _____ the 108people who were charged with offences ranging from grievous bodily harm to affray and riot and possessing offensive weapons,72 were white and 36 were “colored”.A.for B.fromC.of D.in43.It is popularly believed that the riot began on the night of Saturday,August 20,when a 400-strong crowd of white men,_____“Teds”,attacked houses occupied by West Indians.A.they are all B.many of themC.some were D.most of them belong to44.Among the _____ was Majbritt Morrison ,a young white Swedish bride of a Jamaican.A.offenders B.riotersC.victims D.residents45.She was pelted with stones,glass and wood,and _____ in the back with an iron bar as she tried to get home.A.bruised B.struckC.patted D.scratched46.The internal police witness statements provide graphic evidence of the motives of the mobs—at one point crowds several thousand strong roamed the streets of Notting Hill,_____ homes and attacking any West Indian they could find.A.plunging into B.breaking intoC.seeking for D.searching for47.PC Richard Bedford said he had seen a mob of 300 to 400 white people in Bramley Road _____:“We will kill all black bastards.Why don't you send them home?”A.shouting B.to cryC.utter D.announced48.PC Ian McQueen on the same night said he was told:“Mind your own _____,cops.Keep out of it.We will settle these niggers our way.We'll murder the bastards.”A.matters B.affairC.things D.business49.The disturbances continued night after night until they finally petered out on September 5.At the Old Bailey Judge Salmon later handed down exemplary _____ of four years each on nine white youths who had gone“nigger hunting”.A.decisions B.statementsC.trials D.sentences50.While those dealt with by the courts were overwhelmingly white ,the large number of black people also arrested and the official _____ there had not been a racial motive ensured a legacy of black mistrust of the Metropolitan police that has never really been eradicated.A.persistence B.perseveranceC.insistence D.instanceSection B Error Correction(10points)Directions:The following passage contains 9 errors.In each case only one word is involved.You should proofread the passage on the Answer Sheet and correct it in the following way:EXAMPLEOne night,quite late,I was still awake in the room I am shared with 1. ammy husband.I was lying on my right side and can hear a child crying. 2. couldGetting up,I went ∧see if our son was all right. 3. toHe was sleeping soundly,breathing deeply and gently. 4. √The ZipperWhatever did we do before the invention of the zipper?In 1893 the world's first zipper was produced in Chicago.Although the inventor claimed that it was a reliable fasteningfor clothing,this was not the case.The Chicago zipper sprang 51.______open without warning,or jammed shut,and it swiftly lostpopularity.Twenty years ago a Swedish-born engineer called 52.______Sundback solved the problem.He attached tiny cups to thebacks of the interlocked teeth,and this meant that the teeth 53.______could be enmeshed more firmly and reliably.At first zippers were made of metal.They were heavy,andif they got stuck it was difficult to free.Then came nylon 54.______zippers which were lighter and easier to use,and had smallerteeth.The fashion industry liked the new zippers far betterbecause they didn’t distort the line of the garment or weighing 55.______down light fabrics.They were also easier for the machiniststo fit into the garment.Meanwhile a new fastening agent made its appearance atthe end of the twenty century: velcro. Velcro is another product 56.______made from nylon.Nylon is a very tough synthetic fibre firstdeveloped in the 1930s,and bearing a name to mind the wearer 57.______of the two places where it was developed:NY for New York andLON for London.Velcro is made with very small nylon hooks onone side of the fastening which caught tiny looped whiskers on the 58.______other side of the fastening.It is strong and durable.Velcro is used on clothing,luggages and footwear.It is quick 59.______and easy to fasten and unfasten,and has taken a large part ofthe zipper's share of the market.It is also used in ways a zippercannot be used—for instance as an easily changed fastening onplaster casts,and to hold furnishing fabrics in a position.60.______Part III Situational Dialogues(5 minutes,10 points)Directions:Complete the following dialogues by choosing the best answer.Then mark the corresponding letter on the Answer Sheet with a single line through the centre.61.Rob:Hey Jill,you're looking great.Jill:Thanks,Rob.____________Rob:Well,you did it.How?Jill:I jog every morning,and I go to aerobics every other day.A.I bought this dress yesterday.Really smart.B.You are looking fine too.C.I'm recovering my strength after the flu.D.My New Year's resolution was to get in shape.62.Bob:Hi Jane.How are you?Jane:____________I didn't sleep a wink last night.The people next door were making a lot of noise again till very late at night.A.I'm feeling a bit out of sorts this morning.B.Fine,thank you.And you?C.I slept like a log and didn't want to get out of bed.D.It seems a bit unusual,you know.63.Ann :Aah!He's gorgeous!Look at those big,golden paws.When did you get him?Roger:Yesterday.____________Ann :Oh,right.What kind is she?Roger:A Labrador.A.Susan's got a more beautiful one.B.What's up?C.It's a she actually.D.Isn't it right?64.Tina:Wow,look at all the things on sale.____________Andrew:Yes,look,this shirt is 50 %off.Tina:And look at these shoes.They are 30 %off the normal price.A.I'd like to buy a skirt.B.There are some real bargains.C.Are the prices reasonable?D.These shoes are the same as mine.65.Woman:Have you finished the packaging?Man :____________Woman:Good.Because the truck will be coming soon,this is a rush job.A.Don't hurry m or I'll break the glass.B.Almost.I just have to wrap the glass and put it into boxes.C.No,I haven't.Why didn't you help me with it?D.Yes,I have.What else can I do for you?66.Customs Officer :________________________Mrs.John son :No,nothing at all.Customs Officer :No perfume,alcohol or cigarettes?Mrs.John son :Well,I have 200 cigarettes;that's all.A.Do you have anything in the bag,ma'am?B.Do you have anything to declare,ma'am?C.Do you want to buy something,ma'am?D.Is there anything I can do for you,ma'am?67.Linda:Hello.I'd like to send this package,please.Clerk:____________________________________Linda:First class.How long will that take?Clerk:About three days.A.How would you like to send it?B.Which class are you in?C.Where do you want to send it to?D.Which class is it in?68.Assistant:Can I help you?Colin :Yes,it's about this sports shirt.I washed it the other day.The colour ran and it shrank.Assistant:Oh dear,I see.________________________Colin :I'm afraid not.Assistant:I'm sorry,but I'm not allowed to change anything without a receipt.A.Did you buy it here?B.Would you want to change it?C.Do you have the receipt?D.Could you tell me who sold it to you?69.James:Could I have my bill,please?Can I pay by credit card or eurocheque?Receptionist:____________James:I'll pay by credit card,then.Receptionist:That's fine.I hope you enjoyed your stay here.A.Here's your bill.B.Sorry,we don't take credit card.C.You can pay by eurocheque.D.Yes,we take both.70.Husband:When is our anniversary?Wife:________________________Husband:No,it's just that I bought these flowers for you and I was hoping today was the day.A.Hmm ...I can't remember either.Why?B.Hey,are these flowers for me?C.Who cares?Do you want to give me a surprise?D.Are you joking?Have you really forgotten again?Part IV Reading Comprehension(25 minutes,40 points)Section A Multiple Choice(10 points)Directions:There is one reading passage in this part.The passage is followed by 5 questions or unfinished statements.For each of them there are four choices marked A,B,C and D.You should decide on the best choice and mark the corresponding letter on the Answer Sheet with a single line through the centre.Questions 71 to 75 are based on the following passage:Taking a peep at what's going on in your headCARL Filer,18,a star salesman at a B&Q hardware store in the UK,was called up for promotion within one week of starting work.But,instead of being made supervisor,he was sacked—after his employers saw the results of his psychometric test.You might think that anyone who answers that he“strongly disagrees he is an over-achiever is asking for trouble,but Mr Filer already thought he had proved himself more than capable.This year,nearly half of UK firms—46 percent—will use psychometric tests to select trainees,compared with just 17 percent in 2000,according to a report for GTI,a publisher of graduate career guides.These tests,which rate candidates’ability and gauge their personality,have been used in the UK since the 1980s.But assorted studies have shown most people—graduates in particular—are wholly cynical about the idea of their personality being“measured.“People tend to see them as either too silly or too clever,says Clive Fletcher,professor of occupational psychology at University of London.“But all the evidence indicates the tests do have some value.The first personality test as we know it,was developed by the American army in 1917 to filter outweak recruits.But it was not until the 1980s that the tests became popular in Britain.With a rising number of graduates going for a decreasing number of jobs,organizations began to see psychometric testing as a cheap,reliable alternative to the expensive,time-consuming interview.But today the tests are becoming alarmingly sophisticated and are edging towards probing the “dark side:pathology and personality disorders.Increasingly,tests are being used to try to detect promising young graduates who may,later in life,fly off the rails(go crazy);or to stop psychopaths(having mental disorder)getting recruited.In the future,interviewees could even be given a mouth swab to reveal the genetic and biological markers of personality.“We are heading for the era of genetic screening,”warns Carolyn Jones,of the Institute for Employment Rights.“I think these tests are very flawed.And there are other problems with the tests.For starters,it is possible to fake it—even the test producers agree on this.But they have made it as hard as possible.For example,look at whether you agree or disagree with the following two statements:“New ideas come easily to me and“I find generating new concepts difficult.How long did it take you to realize they both could mean the same thing?The main argument,however,is that the tests are invalid and cannot quantify(put a numerical value on)something as changeable as personality.The golden rule is then,that a psychometric test should never be used as the sole basis of selection,but should always be followed by interviews.71.Most people's attitude towards the psychometric test is ______.A.contemptuous B.favorable C.tolerant D.confounded72.Which of the following is one of the reasons why psychometric testing wins an advantage over interviews?A.It doesn't cost any money.B.It requires no equipment.C.It is time-saving.D.It can be done within seconds.73.Which of the following statements is the author's idea?A.Psychometric tests are defective.B.Psychometric tests should not be the only way to recruit promising young graduates.C.Psychometric tests are invalid and cannot quantify something changeable as personality.D.Psychometric tests are golden rules.74.The test producers make the tests very complicated to ______.A.avoid cheating B.improve genetic screeningC.find out the best ideas D.generate new concepts75.Which of the following is not true according to the passage?A.The American army developed the first personality test to screen out weak recruits.B.In the future,interviewers could give a mouth swab to reveal interviewees’symptoms.C.There are possibilities for starters to cheat in the psychometric tests.D.Interviews still play an important role in evaluating interviewees.Section B Short Answer Questions(30 points)Directions:In this part there are 3 passages with 15 questions or incomplete statements.Read the passages carefully.Then answer the questions in the fewest possible words(not exceeding 10 words).Remember to rewrite the answers on the Answer Sheet.Questions 76 to 80 are based on the following passage:The 8 Steps of Social Invention1.Get ready to play.Like other types of creativity,social inventiveness flourishes when you begin thinking outside conventional boundaries.Charlie Girsch,a St.Paul,Minnesota-based creativity consultant,suggests that you start by playing with obviously absurd explanations for everyday events.“If traffic is slow,you'll be tem pted to say,‘Hmm.Must be an accident up ahead.’Instead,try saying,‘Must be a family of turtles crossing the highway’or‘I expect there's some kind of alien abduction going on.’You'll be amazed how soon you will be looking at familiar problems in new ways.”Girsch's book,Fanning the Creative Spirit(Creativity Central,2019)has scores of other exercises for limbering up the inventive part of your brain.2.Generate a zillion far-fetched ideas.Concerned about the homeless in your neighborhood?Imagine a Homeless Parliament,a Homeless Circus,homeless families forming an orchestra,a homeless museum ...and on and on.Generate like mad with no regard for feasibility in order,as social invention pioneer Nicholas Albery advises,to“overcome e worthy-but-dull ideas.”Eventually the two or three best ideas will begin to stand out.3.Take your wildest idea and bring it down to earth.How about that Homeless Circus?Could it turn into a forum for homeless people to display their creative talents?A performance series about homelessness?A neighborhood carnival with the homeless as guests of honor?Your flakiest idea may have a germ of brilliance that actually makes it more attractive,and thus more feasible(and fundable),than its worthy-but-dull cousins.4.Look for in venations that solve more than one problem.The Slow Food Movement,born in Italy,boosts local farmers and regional cuisine traditions and restaurateurs and the same time that it“feeds”our hunger for authentic tastes,healthy eating,and a more leisurely,saner style of life.5.Accentuate the positive.“A very common question that I get when I work with people in communities is‘Why doesn't anybody care about our problems?’”notes M chael Patterson,a social inventor and activist in Massachusetts.“What a worthless question.‘Why’?questions are for philosophers.Ask ‘How’?and‘What’?questions—they are a lot more practical.”For instance,Patterson asks,“What would you do if you knew you couldn't fail?”6.Give it a rest.Walk away from your favorite idea for a while,forget about it,let it sleep.With your conscious mind out of the way,your subconscious gets to fiddle with the concept for a while,and you just might have an unexpected insight or breakthrough.7.Practice“yes and”in stead of“yes but”.No matter how tempted you are to say“Yes,but this will be hard because,”or“Yes,but a million other people are doing this,”shift the conjunction to“and”and see what sort of positive refinement or change emerges.“Yes,and we could concentrate on immigrants.”“Yes,and we can make it open to all ages.”8.Get your idea into the world.This is the tough part.You might seek out the help of activists who will take a shine to your ideas.Or become an organizer yourself.Paul Glove,a New York social inventor,coun-sels:“If you have an idea you believe in,write a pamphlet with your phone number on it and post it inLaundromats and bookstores.If three people call you,have lunch with them and call yourselves an organization.If five people call,meet with them and issue a press release.”Presto,you're launched.76.To generate far-fetched ideas helps to ______.77.Michael Patterson wants us to come up with“How”?and“What”?instead of“Why”?questions because he considers they are more practical than ______.78.The purpose to practice“yes and”instead of“yes but”is to make yourself more ______.79.According to the article,when one has difficulty developing his favorite idea,he should ______.80.One should not only generate far-fetched ideas but also ______ because the latter step is the nearest to reality.Questions 81 to 85 are based on the following passage:Thin Slice of TV Has Big MarketIt is too early to write an obituary for bulky picture tubes,which will remain the most affordable TV sets for years to come.But,analysts and industry executives insist that thin screens already have started to become the dominant format for TV sets in the digital era.Sharp price cuts have brought plasma sets and other thin,flat televisions out of high-end electronic boutiques and into thousands of mass-market outlets such as Cosco,a wholesale buying club in the US,best known for offering members bulk items and big discounts.The least expensive plasma sets still cost a hefty US $3,000or more ,yet sales are growing so rapidly that many manufacturers are racing to boost production.That increase,combined with expanding production capacity and improved technology,could push the price of plasma sets down by one-third next year,according to analyst Richard Doherty of Envisioneering Group,a US research firm.But manufacturers are not just competing with each other;they are also trying to fend off challenges from competing thin-screen technologies,such as liquid crystal displays(LCD).The demand for thin screens is fuelled in part by the advent of DVDs and digital TV broadcasts,which offer more detailed pictures and more lifelike colors than conventional analog TV signals.To see the difference,consumers need a set that can pack more information onto the screen than their current TVs can.This sharpness is most vivid on screens that are 40inches diagonal or larger.At that size,however,traditional direct view and projection TVs are so bulky that many consumers have trouble finding a place for them at home.Hence the interest in thin screens—models slender and light enough to hang on a wall.The glass panels at the heart of plasma and LCD sets come mainly from about a dozen companies with factories in Japan,South Korea and,increasingly,China.About 800,000 plasma panels will be shipped this year around the world,analysts say.That is a tiny amount compared with the overall market for TVs,which was about 140 million sets last year.But,industry experts said 2019would be a“breakout year”or plasma because shipments should double.Helping drive the growth are new or expanded manufacturing facilities.For example,Japanese electronics giant NEC last year doubled the capacity of its Japanese factory—reaching 300,000to 400,000 plasma panels.And it plans to double it again in 2019,officials said.As competition has heated up during the last four years,prices have fallen more than 50 percent.According to“NPD Tec world”,the average price of a plasma display sold in the US dropped from US $12,700in January 2019 to US $6,100in October 2019.The best markets for plasma screens have been in Asia,and about half of the sets have gone to businesses instead of homes.LCD TVs carry a premium price—they can be 10 times as expensive as a comparable tube-driven television—that knocks them out of most buyers’budgets.But LCD panels are quickly taking over the market for computer monitors,and the tens of millions of panels being produced for that segment will help push down prices for LCD TVs,analysts predicted.Sharp Electronics,for one,is betting heavily on LCDs.Its chairman,Toshiaki Urushisako,has predicted that Sharp will switch completely from conventional tube sets to LCD TVs in Japan by 2019.Flat-panel refers to wafer-thin(3 inches or less)TVs,whereas flat-screen may actually describe traditional cathode-ray-tube sets(CRTs)whose glass front lacks the distorting curve that TVs have had for 50 years.Be aware of two things:One,flat-panel technology may not be high-definition TV;for eventual HDTV reception,some of these sets will require a separate HD tuner.Two,some flat-panel TVs are just the panel and lack speakers and sometimes a built-in tuner.Price range:US $700-2,000LCD vs plasmaIn general,LCD technology is used for smaller screens because of the enormous number of transistors needed to turn the glasslike liquid crystals into color images.The larger the display,the more transistors,the more chance of failed connections.A plasma screen is found in TV sets larger than 20 inches.Color is comparable to an LCD's.LCDs do not deteriorate over time,while a plasma display averages 30,000 hours(a traditional TV screen can go for 20,000),after which it fades over a period of years.Earlier problems with the quality of plasma's contrast have been addressed,and current screens are cleaner and better defined.Price range:US $600-2,800HDTVSimply put,high-definition TV is 10 times as sharp as traditional TV,and the sound is digital,like CD sound,not FM ,which is what traditional TV provides.HD technology achieves its visual clarity with more immage lines on the screen.Where analog TVs have 480 horizontal lines,HDTV has 720 or 1,080lines.Be aware :m any HDTV sets being sold now are in fact only HDTV monitors ,offering a crisp picture .To receive genuine high-definition television signals,owners must buy a separate HDTV receiver.Price range:US $1,000-6,000LOS ANGELEST IMES81.According to the article,TV sets with _____will still be the most popular in the coming years.82.The factors that stimulate the thin screens to be more and more popular include _____,_____,and_____.83.The rapidly expanding market for LCD panels and their large-scale production will help lower _____.。

USACO 2024年1月铜组试题

USACO 2024年1月铜组试题

USACO2024J ANUARY C ONTEST,B RONZE P ROBLEM 1.M AJORITY O PINION Farmer John 有一项重要的任务——弄清楚要为他的奶牛们购买什么类型的干草。

Farmer John的N头奶牛(2≤N≤105)编号为1到N,每头奶牛喜欢恰好一种类型的干草hi (1≤hi≤N)。

他希望他的所有奶牛都喜欢同一种干草。

为了实现这一目标,Farmer John 可以主持焦点小组访谈。

一次焦点小组访谈为让编号从i 到j的连续范围内的所有奶牛聚集在一起参加一次访谈。

如果有一种干草是小组中超过一半的奶牛喜欢的,则此次焦点小组访谈结束后,所有奶牛最终都会喜欢这种干草。

如果不存在这种类型的干草,那么奶牛们不会改变她们喜欢的干草类型。

例如,在由16头奶牛组成的焦点小组访谈中,需要有其中9头或更多的奶牛具有相同的干草喜好,才能使其余奶牛改变其喜好以与之一致。

Farmer John 想知道哪些类型的干草有可能变为同时受到所有奶牛的喜爱。

他一次只能主持一个焦点小组访谈,但为了使所有奶牛都喜欢同一类型的干草,他可以根据需要任意多次地主持焦点小组访谈。

输入格式:输入的第一行包含一个整数T,为独立的测试用例的数量(1≤T≤10)。

每一个测试用例的第一行包含N。

第二行包含N个整数,为奶牛们喜爱的干草类型hi。

输入保证所有测试用例的N之和不超过2⋅105。

输出格式:输出T行,对于每个测试用例输出一行。

如果可能使所有奶牛同时喜欢同一种干草,则以升序输出所有可能的此类干草的类型,否则输出−1。

在同一行内输出一列整数时,相邻的数用空格分隔,并确保行末没有多余空格。

输入样例:551 2 2 2 361 2 3 1 2 361 1 12 2 233 2 322 1输出样例:2-11 23-1在输入样例中,有 5 个测试用例。

在第一个测试用例中,仅可能使所有奶牛喜欢种类 2。

FJ 可以通过主持一次所有奶牛的焦点小组访谈达到这一目的。

USACO2021-2022 Schedule铜组试题

USACO2021-2022 Schedule铜组试题

USACO2021December Contest,Bronze Problem1.Lonely Photo题目描述Farmer John最近购入了N头新的奶牛(3≤N≤5×105),每头奶牛的品种是更赛牛(Guernsey)或荷斯坦牛(Holstein)之一。

奶牛目前排成一排,Farmer John想要为每个连续不少于三头奶牛的序列拍摄一张照片。

然而,他不想拍摄这样的照片,其中只有一头牛的品种是更赛牛,或者只有一头牛的品种是荷斯坦牛——他认为这头奇特的牛会感到孤立和不自然。

在为每个连续不少于三头奶牛的序列拍摄了一张照片后,他把所有「孤独的」照片,即其中只有一头更赛牛或荷斯坦奶牛的照片,都扔掉了。

给定奶牛的排列方式,请帮助Farmer John求出他会扔掉多少张孤独的照片。

如果两张照片以不同的奶牛开始或结束,则认为它们是不同的。

输入输入的第一行包含N。

输入的第二行包含一个长为N的字符串。

如果队伍中的第i头奶牛是更赛牛,则字符串的第i个字符为G。

否则,第i头奶牛是荷斯坦牛,该字符为H。

输出输出Farmer John会扔掉的孤独的照片数量。

样例输入样例输出提示这个例子中的每一个长为3的子串均恰好包含一头更赛牛或荷斯坦牛——所以这些子串表示孤独的照片,并会被Farmer John扔掉。

所有更长的子串(GHGH、HGHG和GHGHG)都可以被接受。

测试点性质:∙测试点2-4满足N≤50。

∙测试点5-10满足N≤5000。

∙为了增加一些挑战,测试点11没有额外限制。

注意这个测试点的答案可能无法用标准的32位整数型存储,你可能需要使用更大的整数类型(例如,C++中64位的"long long int"类型)。

|USACO2021December Contest,Bronze Problem2.Air Cownditioning 题目描述Farmer John的N头奶牛对他们牛棚的室温非常挑剔。

usaco中文译题

usaco中文译题

Greedy Gift Givers贪婪的礼物送礼者译by tim green对于一群要互送礼物的朋友,你要确定每个人送出的礼物比收到的多多少(and vice versa for those who view gift giving with cynicism)。

在这一个问题中,每个人都准备了一些钱来送礼物,而这些钱将会被平均分给那些将收到他的礼物的人。

然而,在任何一群朋友中,有些人将送出较多的礼物(可能是因为有较多的朋友),有些人有准备了较多的钱。

给出一群朋友,没有人的名字会长于14 字符,给出每个人将花在送礼上的钱,和将收到他的礼物的人的列表,请确定每个人收到的比送出的钱多的数目。

IMPORTANT NOTE测试系统是Linux 符合标准的Unix 的协定。

用'\n'作为行的结束。

这和Windows 系统用'\n' 和'\r'作为行的结束是不同的。

你的程序不要被这困住了。

PROGRAM NAME: gift1INPUT FORMATSAMPLE INPUT (file gift1.in)5davelauraowenvickamrdave200 3lauraowenvickowen500 1daveamr150 2vickowenlaura0 2amrvickvick0 0OUTPUT FORMAT输出NP 行每行是一个的名字加上空格再加上收到的比送出的钱多的数目。

对于每一个人,他名字的打印顺序应和他在输入的2到NP+1行中输入的顺序相同。

所有的送礼的钱都是整数。

每个人把相同数目的钱给每位要送礼的朋友,而且尽可能多给,不能给出的钱被送礼者自己保留。

SAMPLE OUTPUT (file gift1.out)dave 302laura 66owen -359vick 141amr -150Your Ride Is Here你要乘坐的飞碟在这里译by tim green一个众所周知的事实,在每一慧星后面是一个不明飞行物UFO。

USACO2021年1-2月铜组月赛题

USACO2021年1-2月铜组月赛题

USACO2021February Contest,Bronze Problem1.Year of the Cow题目描述Farmer John的奶牛们得知最近正在庆祝牛年的到来时十分兴奋。

牛年总是奶牛们的最爱。

我们知道,中国历法中每一年所对应的生肖遵循12年的周期:Ox,Tiger,Rabbit,Dragon, Snake,Horse,Goat,Monkey,Rooster,Dog,Pig,Rat(牛、虎、兔、龙、蛇、马、羊、猴、鸡、狗、猪、鼠),然后回到牛。

奶牛Bessie自豪地说她是在许多年前的一个牛年出生的。

她的朋友Elsie想要知道她与Bessie出生相差多少年,并且希望你能够通过查看农场上若干奶牛出生年份之间的关系来帮助她推算。

输入输入的第一行包含一个整数N N(1≤N≤1001≤N≤100)。

以下N N行每行包含一个8个单词的短语,指定了两头奶牛的出生年份之间的关系,格式为"Mildred born in previous Dragon year from Bessie"(Mildred在Bessie出生的前一个龙年出生),或"Mildred born in next Dragon year from Bessie"(Mildred在Bessie出生的后一个龙年出生)。

最后一个单词是农场上某一头奶牛的名字,为"Bessie"或一头已经在之前的输入中出现过的奶牛。

第一个单词是农场上某一头奶牛的名字,不为"Bessie"且未在之前的输入中出现过。

所有的奶牛名字不超过10个字符,且仅包含字符 a..z或A..Z。

第5个单词是上述十二生肖之一。

第4个单词是"previous"(之前)或"next"(之后)之一。

例如,如果短语为"Mildred born in previous Dragon year from Bessie",则Mildred的出生年份为最为接近且严格处于Bessie的出生年份之前(不等于)的龙年。

2019美国国家化学奥林匹克化学竞赛初赛试题含详细答案及点拨

2019美国国家化学奥林匹克化学竞赛初赛试题含详细答案及点拨

在化竞的学习过程中,掌握国初核心知识点、明确一条合理的学习路径至关重要。

化竞知识庞杂,不少学化竞的同学对于自己应该学什么,或先学什么后学什么摸不清头脑,甚至有些同学临近考前了,还在问这个知识点国初考不考,要不要学。

因为对国初核心知识点不够了解,并且没有一条清晰合理的学习路径,走了不少冤枉路。

温馨提醒:在开始学习国初知识之前,同学们需先研读全国高中学生化学(奥林匹克)竞赛基本要求(2008年4月版大纲),了解国初考试对知识点的要求。

以下为分模块需掌握的知识点:化学基本原理1.现代化学入门:宏观手段对物质的分类,原子的发现,测量,有效数字,化学计量,化学反应的质量关系2.原子结构:原子结构模型,原子轨道,电子排布,元素周期表,元素周期律3.成键&离子键:化学键,电负性,键的极性,离子,离子晶体结构4.共价键理论&分子结构:共价键,键能,Lewis结构,八隅体规则,价键理论,VSEPR理论,杂化轨道,分子轨道理论5.气体:气体的温度和压强,理想气体定律,Dalton分压定律,Henry定律6.液体和固体:分子间作用力,液态,金属和金属键,晶体结构初步7.溶液的性质:溶液的组成,溶解度,相似相溶,蒸气压,熔沸点,胶体8.化学热力学:焓,Hess定律,标准生成热,键能,熵,热力学第二定律,自发过程,自由能,自由能和平衡,Gibbs-Helmholtz方程及应用9.化学平衡:平衡条件,平衡常数,化学平衡的移动10.溶液中的平衡:酸碱平衡,沉淀溶解平衡,氧化还原平衡&电化学,配位平衡&配位结构初步11.化学动力学初步&核化学:反应速率,速率方程,反应机理,催化剂,放射性衰变,放射性的应用与防护,同位素,核裂变和核聚变有机化学1.有机结构基础:基本概念,成键和结构,有机酸碱理论2.烷烃、环烷烃、构象:烷烃、环烷烃、构象3.立体化学:对映异构、非对映异构、顺反异构、构象异构4.烷烃、自由基取代反应:自由基、自由基反应、烷烃的自由基反应5.卤代烃、亲核取代反应:卤代烃、碳正离子,SN1,SN26.消除反应:E1, E2, Substitution Vs Elimination7.醇、醚:醇、硫醇、醚、环氧8.烯、炔的加成反应:构对比;亲电、自由基、亲核加成9.烯、炔:氧化、还原、聚合反应10.醛、酮:羰基、亲核加成、α,β-不饱和醛酮的加成、氧化、还原、wittig反应11.羧酸、羧酸衍生物、胺:羧酸、羧酸衍生物、胺、卡宾12.缩合反应:烯醇、烷基化反应、与羰基反应13.共轭、芳香性:共轭体系、分子轨道理论、芳香性14.共振、芳环的取代反应:共振论、芳环亲电取代、芳环亲核取代15.周环反应:前线轨道、经典周环反应机理举例16.重排反应:经典重排反应机理举例17.有机波谱分析:IR、MS、NMR在有机产物和中间体结构表征中的综合应用。

USACO 2022年1月铜组试题

USACO 2022年1月铜组试题

USACO2022January Contest,Bronze Problem1.Herdle时间限制:1.000sec内存限制:128MB题目描述奶牛们发明了一种名为Herdle的新型解谜游戏,在牛界引起了轰动。

每天都会有一个新谜题发布供奶牛解决。

游戏采用3x3方阵的形式表示农场的一块田地,田地的每个方格都由特定品种的奶牛占据。

总共只有26种可能的品种,每一种由A到Z 中的不同大写字母标识。

玩家不会被告知田地中的奶牛品种排列方式——游戏目标是通过一系列猜测确定它们。

每次猜测,奶牛们输入一个3x3的大写字母方阵,表示该田地可以用奶牛填充的可能方式。

猜测的某些方格可能是正确的。

这些方格以绿色高亮显示,让奶牛们知道这些是正确的。

猜测的另一些方格可能填入了品种正确但位置错误的奶牛。

这些以黄色高亮显示。

黄色高亮显示的方格的数量可以帮助指示某个品种的奶牛数量。

例如,假设猜测方阵包含4头品种A的奶牛,而答案方阵包含2只品种A的奶牛,其中没有正确位置上的A(即,它们都不应该是绿色的)。

在这种情况下,猜测方阵中只有两个A应以黄色高亮显示。

更准确地说,如果猜测方阵中有x个特定品种的奶牛,并且答案方阵中有y<x头该品种奶牛(不包括位置正确而得到绿色高亮显示的奶牛),那么猜测方阵的x头奶牛中只有y头奶牛应该以黄色高亮显示。

给定正确答案的方阵和一个表示对该答案的猜测的方阵,请计算绿色和黄色高亮显示的方格的数量。

输入输入的前3行给定了正确答案的方阵。

以下3行表示对该答案的猜测。

输出输出两行。

输出的第一行包含应当以绿色高亮显示的方格的数量。

输出的第二行包含应当以黄色高亮显示的方格的数量。

样例输入样例输出USACO2022January Contest,Bronze Problem2.Non-Transitive Dice时间限制:1.000sec内存限制:128MB题目描述为了消磨牛棚里的时光,奶牛们喜欢玩简单的骰子游戏。

USACO 2019 US Open银组Silver竞赛真题(中文)

USACO 2019 US Open银组Silver竞赛真题(中文)

USACO2019US O PEN C ONTEST,S ILVERP ROBLEM1.L EFT O UTFarmer John正在尝试给他的牛群拍照。

根据以往的经验,他知道这一工作往往结果不怎么样。

这一次,Farmer John购买了一台昂贵的无人机,想要拍一张航拍照。

为了使照片尽可能好看,他想让他的奶牛们在拍照时都朝向同一个方向。

奶牛们现在在一块有围栏的草地上排列成$N\times N$($2\leq N\leq1000$)的方阵,例如:RLRRRLLLR这里,字符'R'表示一头朝右的奶牛,字符'L'表示一头朝左的奶牛。

由于奶牛们都挤在一起,Farmer John没办法走到某一头奶牛面前让她调转方向。

他能做的只有对着某一行或某一列的奶牛喊叫让她们调转方向,使得被叫到的这一行或列内的所有L变为R,R变为L。

Farmer John可以对任意多的行或列发号施令,也可以对同一行或列多次发令。

就如同Farmer John想象的,他发现他不可能让他的奶牛们都朝向同一个方向。

他最多能做的是让所有奶牛中除了一头之外都朝向相同的方向。

请找出这样的一头奶牛。

输入格式(文件名:leftout.in):输入的第一行包含$N$。

以下$N$行描述了奶牛方阵的第$1\ldots N$行,每行包含一个长度为$N$的字符串。

输出格式(文件名:leftout.out):输出一头奶牛的行列坐标,满足这头奶牛被调转方向的话,Farmer John就可以使他的所有奶牛都朝向同一个方向。

如果不存在这样的奶牛,输出-1。

如果存在多头这样的奶牛,输出其中行坐标最小的,如果多头这样的奶牛具有相同的行坐标,输出其中列坐标最小的。

输入样例:3RLRRRLLLR输出样例:11在这个例子中,位于第1行第1列(左上角)的奶牛是那头令人讨厌的奶牛,因为Farmer John 可以喊叫第2行和第3列来让所有奶牛都面向左侧,只有这一头奶牛面向右侧。

USACO 2018.12月铜组Bronze竞赛真题(中文)

USACO 2018.12月铜组Bronze竞赛真题(中文)

USACO2018D ECEMBER C ONTEST,B RONZEP ROBLEM1.M IXING M ILK农业,尤其是生产牛奶,是一个竞争激烈的行业。

Farmer John发现如果他不在牛奶生产工艺上有所创新,他的乳制品生意可能就会受到重创!幸运的是,Farmer John想出了一个好主意。

他的三头获奖的乳牛,Bessie、Elsie和Mildred,各自产奶的口味有些许不同,他打算混合这三种牛奶调制出完美的口味。

为了混合这三种不同的牛奶,他拿来三个桶,其中分别装有三头奶牛所产的奶。

这些桶可能有不同的容积,也可能并没有完全装满。

然后他将桶1的牛奶倒入桶2,然后将桶2中的牛奶倒入桶3,然后将桶3中的牛奶倒入桶1,然后再将桶1的牛奶倒入桶2,如此周期性地操作,共计进行100次(所以第100次操作会是桶1倒入桶2)。

当Farmer John将桶$a$中的牛奶倒入桶$b$时,他会倒出尽可能多的牛奶,直到桶$a$被倒空或是桶$b$被倒满。

请告诉Farmer John当他倒了100次之后每个桶里将会有多少牛奶。

输入格式(文件名:mixmilk.in):输入文件的第一行包含两个空格分隔的整数:第一个桶的容积$c_1$,以及第一个桶里的牛奶量$m_1$。

$c_1$和$m_1$均为正,并且不超过$10^9$。

第二和第三行类似地包含第二和第三个桶的容积和牛奶量。

输出格式(文件名:mixmilk.out):输出三行,给出倒了100次之后每个桶里的牛奶量。

输入样例:103114125输出样例:102在这个例子中,每倒一次之后每个桶里的牛奶量如下:初始状态:3451.桶1->2:0752.桶2->3:00123.桶3->1:10024.桶1->2:01025.桶2->3:0012(之后最后三个状态循环出现……)供题:Brian DeanUSACO2018D ECEMBER C ONTEST,B RONZEP ROBLEM2.T HE B UCKET L ISTFarmer John正在考虑改变他给奶牛挤奶的时候分配牛奶桶的方式。

USACO试题精选(第一辑)

USACO试题精选(第一辑)

USACO试题精选第一辑第1题利润(Profits, USACO 2011 Jan) (3)第2题购买饲料二(Buying Feed II, USACO 2010 Jan) (4)第3题奶牛杂技(Cow Acrobats, USACO 2006 Nov) (5)第4题抓苹果(Apple Catching, USACO 2004 Nov) (6)第5题抢购干草(Hay For Sale, USACO 2008 Dec) (7)第6题建造栅栏(Building A Fence, USACO 2008 Oct) (8)第7题建造道路(Building Roads, USACO 2007 Dec) (9)第8题青铜莲花池(Bronze Lilypad Pond, USACO 2007 Feb) (10)第9题滑雪课程(Ski Lessons, USACO 2009 Open) (11)第10题奶牛飞盘队(Cow Frisbee Team, USACO 2009 Mar) (12)第11题奶牛博览会(Cow Exhibition, USACO 2003 Fall) (13)第12题最近回文(Cheapest Palindrome, USACO 2007 Open) (14)第13题安慰奶牛(Cheering up the Cows, USACO 2008 Nov) (15)第14题玉米迷宫(Corn Maze, USACO 2011 Open) (16)第15题奶牛集会(MooFest, USACO 2004 Open) (17)第16题奶牛文字(Cowlphabet, USACO 2011 Feb) (18)第17题奶牛跨栏(Cow Hurdles, USACO 2007 Nov) (19)第18题工作安排(Work Scheduling, USACO 2009 Open) (20)第19题手机网络(Cell Phone Network, USACO 2008 Jan) (21)第20题提交作业(Turning in Homework, USACO 2004 Open) (22)第21题滑雪缆车(Ski Lift, USACO 2006 Mar) (23)第22题派发巧克力(Chocolate Giving, USACO 2010 Feb) (24)第23题赞助学费(Financial Aid, USACO 2004 Mar) (25)第24题白银莲花池(Silver Lilypad Pond, USACO 2007 Feb) (26)第25题地震(Earthquake, USACO 2001 Open) (27)第26题股票市场(Stock Market, USACO 2009 Feb) (28)第27题奶牛赛车(Cow Cycling, USACO Feb 2002) (29)第28题奶牛观光(Sightseeing Cows, USACO 2007 Dec) (30)第29题道路重建(Rebuilding Roads, USACO Feb 2002) (31)第30题奶牛接力(Cow Relays, USACO 2007 Nov) (32)第31题猜数游戏(Haybale Guessing, USACO 2008 Jan) (33)第32题混乱奶牛(Mixed Up Cows, USACO 2008 Nov) (34)第33题修剪草坪(Mowing the Lawn, USACO 2011 Open) (35)第34题道路翻新(Revamping Trails, USACO 2009 Feb) (36)第35题安排牧场(Corn Fields, USACO 2006 Nov) (37)第36题叠积木(Cube Stacking, USACO 2004 Open) (38)第37题奶牛抗议(Generic Cow Protests, USACO 2011 Feb) (39)第38题洞穴奶牛第一话(Cave Cow 1, USACO 2004 Open) (40)第39题打扫食槽(Cleaning Up, USACO 2009 Mar) (41)第40题购买饲料(Buying Feed, USACO 2010 Nov) (42)第41题土地并购(Land Acquisition, USACO 2008 Mar) (43)第42题干草塔(Tower of Hay, USACO 2009 Open) (44)第43题明星奶牛(Popular Cows, USACO 2003 Fall) (45)第44题电子游戏(Video Game Troubles, USACO 2009 Dec) (46)第45题产奶比赛(Milk Team Select, USACO 2006 Mar) (47)第46题黄金莲花池(Lilypad Pond, USACO 2007 Feb) (48)第47题逢低吸纳(BUY LOW, BUY LOWER, USACO Feb 2002) (49)第48题焊接(Soldering, USACO 2011 Open) (50)第49题旅馆(Hotel, USACO 2008 Feb) (51)第50题道路和航线(Roads and Planes, USACO 2011 Jan) (52)这一辑从USACO月赛中选择了质量很高的50题,是用来训练算法设计和实现的极好素材,如果初学者希望掌握比较扎实的基本功,我建议将这一辑的题目好好研究一下。

USACO 2019 US Open铂金组Platinum竞赛真题(中文)

USACO 2019 US Open铂金组Platinum竞赛真题(中文)
保证始终存在一种符合条件的方式可以使用一个或两个长方形来告知 Farmer John。这个问 题的运行内存限制为 512MB,超过一般问题所给的 256MB 内存限制。
C++的程序请使用下面的模板:
#include "grader.h"
void addRoad(int a, int b){ // Fill in code here
USACO 2019 US OPEN CONTEST, PLATINUM PROBLEM 3. VALLEYS
Bessie 喜欢观光,而今天她正在寻找景色优美的山谷。
她感兴趣的是一个$N \times N$的方阵,其中每个格子都有一个高度。所有在此正方形方阵 之外的格子的高度可以被看作是无限大。
山谷指的是一块连续、不含洞的一块区域,并且每个相邻的包围该区域的格子都高于这块区域 中的所有格子。
你对上述函数的实现中可以调用下面给出的函数。假设$\texttt{notifyFJ}$会被调用$Q$次。
int getN():获得$N$的值。 int getQ():获得$Q$的值。 void setFarmLocation(int ID, int X, int Y):决定 Farmer John 应当将农场
ooo o.o ooo
这是另一个非有洞区域(中间的格子与右下角的格子沿点相邻):
ooo o.o oo.
输入格式(文件名:valleys.in):
输入的第一行包含$N$,其中$1 \le N \le 750$。 以下$N$行每行包含$N$个整数,为方阵每个格子的高度。所有高度$h$满足$1 \le h \le 10^6$。所有高度均为不同的整数。 对于至少 19%的测试数据,额外保证$N \leq 100$。

USACO 2024年1月白金组试题

USACO 2024年1月白金组试题

USACO2024J ANUARY C ONTEST,P LATINUM P ROBLEM 1.I SLAND V ACATIONBessie 正在一个N(2≤N≤104)座岛组成的岛屿网络中度假,编号为1…N,由M座双向通行的桥连接,每座桥连接两座岛(N−1≤M≤3/2(N−1))。

保证所有桥形成连通的简单图(具体地说,没有两座桥连接同一对岛屿,也没有一座桥连接一座岛到其自身)。

另外保证没有一座桥处在多于一个简单环上。

一个简单环是一个不包含重复岛的环。

Bessie从岛1开始,按以下过程旅行。

假设她目前在岛i上:1.如果不存在连接岛i的她尚未穿过的桥,则她的度假结束。

2.否则,以pi(mod109+7)的概率,她的度假结束。

3.否则,在连接岛i的所有她还没有穿过的桥中,她均匀地随机选择一座并穿过它。

对于每座岛,输出她在该岛上结束度假的概率,对109+7取模。

输入格式:输入的第一行包含独立的测试用例的数量T(1≤T≤10)。

相邻的测试用例之间以一个空行分隔。

每一个测试用例的第一行包含N和M,其中N为岛的数量,M为桥的数量。

输入保证所有测试用例的N之和不超过104。

第二行包含p1,p2,…,pN(0≤pi<109+7)。

以下M行描述所有的桥。

第i行包含整数ui和vi(1≤ui<vi≤N),表示第i座桥连接岛ui和vi。

输入保证所有桥满足上文中的限制。

输出格式:对于每个测试用例输出一行,包含在岛1到N的每一座岛上结束度假的概率模109+7的余数,用空格分隔。

输入样例:23 20 10 1111111121 32 36 5500000004 0 0 0 0 01 51 34 55 61 2输出样例:0 888888896 111111112500000004 166666668 166666668 83333334 0 83333334在第一个测试用例中,p3≡1/9(mod109+7)。

Bessie 有1/9的概率在岛3结束(经过路径1→3),8/9的概率在岛2结束(经过路径1→3→2)。

USACO 2019 US Open金组Gold竞赛真题(中文)

USACO 2019 US Open金组Gold竞赛真题(中文)

USACO2019US O PEN C ONTEST,G OLDP ROBLEM1.S NAKES传说,数千年前圣帕特里克消灭了哞尔兰所有的蛇。

然而,蛇们现在卷土重来了!圣帕特里克节是在每年的3月17日,所以Bessie要用彻底清除哞尔兰所有的蛇来纪念圣帕特里克。

Bessie装备了一个捕网,用来捕捉$N$组排成一行的蛇($1\leq N\leq400$)。

Bessie必须按照这些组在这一行中出现的顺序捕捉每一组的所有蛇。

每当Bessie抓完一组蛇之后,她就会将蛇放在笼子里,然后带着空的捕网开始捕捉下一组。

一个大小为$s$的捕网意味着Bessie可以抓住任意包含$g$条的一组蛇,其中$g\leq s$。

然而,每当Bessie用大小为$s$的捕网抓住了一组$g$条蛇,就意味着浪费了$s-g$的空间。

Bessie可以任意设定捕网的初始大小,并且她可以改变$K$次捕网大小($1\leq K<N$)。

请告诉Bessie她捕捉完所有组的蛇之后可以达到的总浪费空间的最小值。

输入格式(文件名:snakes.in):输入的第一行包含$N$和$K$。

第二行包含$N$个整数$a_1,\dots,a_N$,其中$a_i$($0\leq a_i\leq10^6$)为第$i$组蛇的数量。

输出格式(文件名:snakes.out):输出一个整数,为Bessie抓住所有蛇的总浪费空间的最小值。

输入样例:62798232输出样例:3Bessie 可以设置她的捕网开始时大小为7。

当她抓完第一组蛇之后,她将她的捕网的大小调整为9,保持这个大小直到抓完第4组蛇,再将捕网大小调整为3。

总浪费空间为$(7-7)+(9-9)+(9-8)+(3-2)+(3-3)+(3-2)=3$。

供题:Patrick ZhangUSACO2019US O PEN C ONTEST,G OLDP ROBLEM2.I W OULD W ALK500M ILESFarmer John想要将他的编号为$1\ldots N$的$N$头奶牛($N\leq7500$)分为非空的$K$组($2\leq K\leq N$),使得任意两头来自不同组的奶牛都需要走一定的距离才能相遇。

USACO open10金组铜组中文试题

USACO open10金组铜组中文试题

USACO open10试题金组试题Problem 1: 奶牛的跳格子游戏[John Pardon, 2010]奶牛们正在回味童年,玩一个类似跳格子的游戏,在这个游戏里,奶牛们在草地上画了一行N个格子,(3 <=N <= 250,000),编号为1..N。

就像任何一个好游戏一样,这样的跳格子游戏也有奖励!第i个格子标有一个数字V_i(-2,000,000,000 <=V_i<= 2,000,000,000)表示这个格子的钱。

奶牛们想看看最后谁能得到最多的钱。

规则很简单:* 每个奶牛从0号格子出发。

(0号格子在1号之前,那里没钱)* 她向N号格子进行一系列的跳跃(也可以不跳),每次她跳到的格子最多可以和前一个落脚的格子差K格(1 <= K <= N)(比方说,当前在1号格,K=2, 可以跳到2号和3号格子) *在任何时候,她都可以选择回头往0号格子跳,直到跳到0号格子。

另外,除了以上规则之外,回头跳的时候还有两条规则:*不可以跳到之前停留的格子。

*除了0号格子之外,她在回来的时候,停留的格子必须是恰巧过去的时候停留的某个格子的前一格(当然,也可以跳过某些过去时候停留的格子)。

简单点说,如果i号格子是回来停留的格子,i+1号就必须是过去停留的格子,如果i+1号格子是过去停留的格子,i号格子不一定要是回来停留的格子。

(如果这里不太清楚的可以去看英文原文)她得到的钱就是所有停留过的格子中的数字的和,请你求出最多奶牛可以得到的钱数。

在样例中,K=2,一行5个格子。

格子编号: 0 1 2 3 4 5+---+ +---+ +---+ +---+ +---+ +---+|///|--| |--| |--| |--| |--| |+---+ +---+ +---+ +---+ +---+ +---+钱数 : - 0 1 2 -3 4一个合法的序列Bessie可以选择的是0[0], 1[0], 3[2], 2[1], 0[0]。

USACO 2019 US Open铜组Bronze竞赛真题(中文)

USACO 2019 US Open铜组Bronze竞赛真题(中文)

USACO2019US O PEN C ONTEST,B RONZEP ROBLEM1.B UCKET B RIGADE农场上起火了,奶牛们正在紧急赶去灭火!农场可以用一个像这样的$10\times10$的字符方阵来描述:................................B......................R.............................L..............字符'B'表示正着火的牛棚。

字符'L'表示一个湖,而字符'R'表示农场上的一块巨大岩石。

奶牛们想要沿着一条湖到牛棚之间的路径组成一条“水桶传递队列”,这样她们就可以沿着这条路径传递水桶来帮助灭火。

当两头奶牛在东南西北四个方向上相邻时水桶可以在她们之间传递。

这对于湖边的奶牛也是对的——奶牛只能在紧挨着湖的时候才能用水桶从湖里取水。

类似地,奶牛只能在紧挨着牛棚的时候才能用水去灭牛棚的火。

请帮助求出奶牛们为了组成这样的“水桶传递队列”需要占据的'.'格子的最小数量。

奶牛不能站在岩石所在的方格之内,此外保证牛棚和湖不是相邻的。

输入格式(文件名:buckets.in):输入包含10行,每行10个字符,描述这个农场的布局。

输入保证图案中恰有一个字符'B'、一个字符'L'以及一个字符'R'。

输出格式(文件名:buckets.out):输出一个整数,为组成一条可行的水桶传递队列所需要的奶牛的最小数量。

输入样例:................................B......................R.............................L..............输出样例:7在这个例子中,以下是一个可行的方案,使用了最小数量的奶牛(7):................................B.........C........R....C.........C.........L..............供题:Brian DeanUSACO2019US O PEN C ONTEST,B RONZEP ROBLEM2.M ILK F ACTORY牛奶生意正红红火火!Farmer John的牛奶加工厂内有$N$个加工站,编号为$1\ldotsN$($1\leq N\leq100$),以及$N-1$条通道,每条连接某两个加工站。

USACO 2019.1月金组Gold竞赛真题(中文)

USACO 2019.1月金组Gold竞赛真题(中文)

USACO2019J ANUARY C ONTEST,G OLDP ROBLEM1.C OW P OETRY不为Farmer John所知的是,Bessie还热衷于资助艺术创作!最近,她开始研究许多伟大的诗人们,而现在,她想要尝试创作一些属于自己的诗歌了。

Bessie认识$N$($1\leq N\leq5000$)个单词,她想要将她们写进她的诗。

Bessie已经计算了她认识的每个单词的长度,以音节为单位,并且她将这些单词划分成了不同的“韵部”。

每个单词仅与属于同一韵部的其他单词押韵。

Bessie的每首诗由$M$行组成($1\leq M\leq10^5$),每一行必须由$K$($1\leq K\leq5000$)个音节构成。

此外,Bessie的诗必须遵循某个指定的押韵模式。

Bessie想要知道她可以写出多少首符合限制条件的不同的诗。

输入格式(文件名:poetry.in):输入的第一行包含$N$、$M$和$K$。

以下$N$行,每行包含两个整数$s_i$($1\leq s_i\leq K$)和$c_i$($1\leq c_i\leqN$)。

这表示Bessie认识一个长度(以音节为单位)为$s_i$、属于韵部$c_i$的单词。

最后$M$行描述了Bessie想要的押韵模式,每行包含一个大写字母$e_i$。

所有押韵模式等于$e_i$的行必须以同一韵部的单词结尾。

不同$e_i$值的行并非必须以不同的韵部的单词结尾。

输出格式(文件名:poetry.out):输出Bessie可以写出的满足这些限制的不同的诗的数量。

由于这个数字可能非常大,请计算这个数对1,000,000,007取余的结果。

输入样例:3310314132ABA输出样例:960在这个例子中,Bessie认识三个单词。

前两个单词押韵,长度分别为三个音节和四个音节,最后一个单词长度为三个音节,不与其他单词押韵。

她想要写一首三行的诗,每行包含十个音节,并且第一行和最后一行押韵。

USACO 2011年1月精英赛铜组试题 洗盘子

USACO 2011年1月精英赛铜组试题 洗盘子

USACO 2011年1月精英赛铜组试题洗盘子Bessie 和Canmuu 将联手洗掉N (1<= N <= 10,000) 个脏盘子。

Bessie 洗; Canmuu 来擦干它们.每个盘子有一个指定的编号,范围1..N. 开始,所有盘子按顺序排列在栈中,1号盘子在顶端,N号盘子在底端.Bessie 会先洗一些盘子,然后放在洗过的盘子栈里(这样原来的顺序颠倒).然后,或者她洗别的盘子,或者Canmuu 擦干她已经洗好的部分或全部盘子,放在擦干的盘子栈里。

这样直到所有盘子洗完擦干后放置的顺序是什么?比如1 <-- top2345 <-- bottom第一次洗3个:未洗| 洗了但未擦干| | 洗了并擦干的| | |TOP 12 23 -> 3 -> 3 -> 34 4 4 2 4 2BOTTOM 5 - - 5 1 - 5 1 - 5 1 -开始洗了1号洗了2号洗了3号Canmuu 擦了2个,然后放在擦干的盘子栈里:TOP 34 2 -> 4 2 -> 4 2BOTTOM 5 1 - 5 1 3 5 1 3Bessie 又来洗最后2个:TOP 54 2 -> 4 2 -> 4 2BOTTOM 5 1 3 5 1 3 - 1 3Finally, Canmuu 擦干了剩下的三个盘子,放置顺序如下:TOP 14 45 -> 5 -> 5 -> 54 2 4 2 2 2BOTTOM - 1 3 - 1 3 - 1 3 - - 3序号如下: 1, 4, 5, 2, 3.程序文件名: dishes输入格式::第一行: 一个整数N,表示盘子的数量第2行至N+1行: 每一行两个整数,第一整数为1表示洗盘子,为2表示擦盘子,第二个整数表示数量输入样例(dishes.in):51 32 21 22 3输出格式:共N行:擦干后盘子从顶端到底端的顺序输出样例(dishes.out):14523。

USACO 2022年2月银组和铜组试题

USACO 2022年2月银组和铜组试题

USACO2022February Contest,Silver Problem1.Redistributing Gifts 题目描述Farmer John为他的N头奶牛准备了N个礼物,标记为1…N,也标记为1…N(1≤N≤500)。

每头奶牛都有一个愿望清单,它是所有N个礼物的排列,因此奶牛更喜欢列表中较早出现的礼物而不是列表中较晚出现的礼物。

FJ很懒,只是将礼物i分配给了奶牛i。

现在,奶牛聚集在一起并决定重新分配礼物,这样在重新分配后,每头奶牛最终都会得到与她最初相同的礼物,或者是她更喜欢的礼物而不是最初分配的礼物。

对于从1到N的每个i,计算奶牛i在重新分配后可能希望收到的最喜欢的礼物。

输入第一行包含NN。

接下来的NN行每行都包含一头奶牛的偏好列表。

保证每行形成1…N的排列。

输出请输出N行,其中第i行包含重新分配后奶牛i最希望收到的礼物。

样例输入样例输出提示在此示例中,有两种可能的重新分配:•原始分配:奶牛1收到礼物1,奶牛2收到礼物2,奶牛3收到礼物3,奶牛4收到礼物4。

•奶牛1收到礼物1,奶牛2收到礼物礼物3,奶牛3收到礼物2,奶牛4收到礼物4。

请注意,奶牛1和4都不能希望收到比最初分配的更好的礼物。

但是,奶牛2和3都可以。

评分:•测试用例2-3满足N≤8。

•测试用例4-11不满足任何附加约束。

USACO2022February Contest,Silver Problem2.Robot Instructions 题目描述Bessie正在学习如何控制她最近收到的作为礼物的机器人。

机器人从坐标平面上的点(0,0)开始,Bessie希望机器人在点(x g,y g)结束。

Bessie最初有一个N(1≤N≤40)指令列表给机器人,其中第i个指令将向右移动机器人x i单位和向上移动y i单位(或者当x i和y i 为负数时向左或向下移动)。

对于从1到N的每个K,帮助Bessie计算她可以从原始N 中选择K条指令的方式的数量,使得在执行K条指令后,机器人将在点(x g,y g)处结束。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

USACO2019J ANUARY C ONTEST,B RONZE
P ROBLEM1.S HELL G AME
为了消磨时光,奶牛Bessie和她的朋友Elsie喜欢玩一种她们在农业展览会上看到的游戏。

游戏准备阶段,Bessie在桌子上放置三个倒置的坚果壳,并在其中一个坚果壳下面藏了一块小的鹅卵石(至少她希望这是一块鹅卵石——她在一块牧场的地上找到的)。

随后Bessie会两两调换坚果壳,同时Elsie试着去猜鹅卵石的位置。

奶牛们在农业展览会上看到的这个游戏的标准形式是玩家可以看到鹅卵石初始的位置,然后要求玩家猜所有交换完成之后鹅卵石最终的位置。

然而,现在奶牛们想要去进行这样一种玩法,Elsie不知道鹅卵石的初始位置,同时她可以在每一次交换之后猜一下鹅卵石的位置。

Bessie知道正确答案,在游戏结束后会给Elsie一个分数,等于她猜对的次数。

给定所有的交换和Elsie的猜测,但是不给出鹅卵石的初始位置,请求出Elsie最高可能获得的分数。

输入格式(文件名:shell.in):
输入的第一行包含一个整数$N$,为交换的次数($1\leq N\leq100$)。

以下$N$行每行描述了游戏的一个回合,包含三个整数$a$、$b$和$g$,表示Bessie交换了坚果壳$a$和$b$,然后Elsie猜的是坚果壳$g$。

所有这三个数均为1、2、3之一,并且$a\neq b$。

输出格式(文件名:shell.out):
输出Elsie可以得到的最高分数。

输入样例:
3
121
321
131
输出样例:
2
在这个例子中,Elsie 最多可以获得2分。

如果鹅卵石开始时位于坚果壳1下面,那么她猜中了一次(最后一次)。

如果鹅卵石开始时位于坚果壳2下面,那么她猜中了两次(开始两次)。

如果鹅卵石开始时位于坚果壳3下面,那么她没有猜对任何一次。

供题:Brian Dean
USACO2019J ANUARY C ONTEST,B RONZE
P ROBLEM2.S LEEPY C OW S ORTING
Farmer John正在尝试将他的$N$头奶牛($1\leq N\leq100$),方便起见编号为$1
\dots N$,在她们前往牧草地吃早餐之前排好顺序。

当前,这些奶牛以$p_1,p_2,p_3,\dots,p_N$的顺序排成一行,Farmer John站在奶牛$p_1$前面。

他想要重新排列这些奶牛,使得她们的顺序变为$1,2,3,\dots,N$,奶牛$1$在Farmer John旁边。

今天奶牛们有些困倦,所以任何时刻都只有直接面向Farmer John的奶牛会注意听Farmer John的指令。

每一次他可以命令这头奶牛沿着队伍向后移动$k$步,$k$可以是范围$1
\ldots N-1$中的任意数。

她经过的$k$头奶牛会向前移动,腾出空间使得她能够插入到队伍中这些奶牛之后的位置。

例如,假设$N=4$,奶牛们开始时是这样的顺序:
FJ:4,3,2,1
唯一注意FJ指令的奶牛是奶牛$4$。

当他命令她向队伍后移动$2$步之后,队伍的顺序会变成:
FJ:3,2,4,1
现在唯一注意FJ指令的奶牛是奶牛$3$,所以第二次他可以给奶牛$3$下命令,如此进行直到奶牛们排好了顺序。

Farmer John急欲完成排序,这样他就可以回到他的农舍里享用他自己的早餐了。

请帮助他求出将奶牛们排好顺序所需要的最小操作次数。

输入格式(文件名:sleepy.in):
输入的第一行包含$N$。

第二行包含$N$个空格分隔的整数,$p_1,p_2,p_3,\dots,p_N$,表示奶牛们的起始顺序。

输出格式(文件名:sleepy.out):
输出一个整数,为Farmer John采用最佳策略可以将这$N$头奶牛排好顺序所需要的操作次数。

输入样例:
4
1243
输出样例:
3
供题:Dhruv Rohatgi
USACO2019J ANUARY C ONTEST,B RONZE
P ROBLEM3.G UESS THE A NIMAL
奶牛Bessie和她的朋友Elsie厌倦了她们的坚果壳游戏,她们想要玩另一个叫做“猜动物”的常见游戏。

游戏开始时,Bessie会想好一种动物(大部分时候,她想的都是奶牛,这使得游戏相当无聊,但是偶尔Bessie也能有些新意,想一些别的)。

随后Elsie会通过问一些问题来猜出Bessie选择的动物。

每个问题都是询问这种动物是否具有某个特定的特征,Bessie对于每个问题回答“是”或“不是”。

例如:
Elsie:“这种动物是能飞的吗?”
Bessie:“不是。


Elsie:“这种动物是吃草的吗?”
Bessie:“是。


Elsie:“这种动物是能产奶的吗?”
Bessie:“是。


Elsie:“这种动物是会哞哞叫的吗?”
Bessie:“是。


Elsie:“这样的话我想这种动物是奶牛。


Bessie:“猜对了!”
如果我们将所有具备符合Elsie到目前为止所提出的问题的特征的动物的集合称为“可行集”,那么Elsie会持续进行提问直到可行集仅包含一种动物,然后她会把这种动物作为她的答案。

对于每个问题,Elsie会选择某种动物的一个特征进行询问(即使这个特征并不能进一步帮助她缩小可行集)。

她不会关于同一个特征询问两次。

给定Bessie和Elsie知道的所有动物以及它们的特征,请求出Elsie在猜出正确的动物之前能够得到的“是”的回答的最大数量。

输入格式(文件名:guess.in):
输入的第一行包含动物的数量$N$($2\leq N\leq100$)。

以下$N$行每行描述了一种动物。

每一行开始是这种动物的名称,接下来是一个整数$K$($1\leq K\leq100$),接下来是这种动物的$K$个特征。

动物的名称和特征是至多20个小写字母(a..z)组成的字符串。

没有两种动物具有完全相同的特征。

输出格式(文件名:guess.out):
输出游戏结束之前Elsie可能得到的“是”的回答的最大数量。

输入样例:
4
bird2flies eatsworms
cow4eatsgrass isawesome makesmilk goesmoo
sheep1eatsgrass
goat2makesmilk eatsgrass
输出样例:
3
在这个例子中,Elsie可能在对话中获得3个“是”的回答(题目中的例子),并且不可能进行包含超过3个“是”的回答的对话。

供题:Brian Dean。

相关文档
最新文档