当前位置:网站首页>2021 Hefei informatics competition primary school group
2021 Hefei informatics competition primary school group
2022-07-04 19:20:00 【Small Turing programming】
1、 COVID-19 population immunity (covid)
COVID-19 has been in the world for nearly two years. , It has brought great trouble to all countries in the world , In order to defeat COVID-19 finally , Various countries are stepping up vaccine research and development , At present, our country has developed and issued inactivated vaccine 、 Adenovirus vector vaccine and other new coronavirus vaccines with different technologies , While meeting their own needs , It has also helped many countries , Together to curb the spread of the virus . Prevention is better than cure , Only by reaching a certain proportion of vaccination , That is to achieve mass immunization , That's the way to defeat COVID-19. . Studies have shown that , Different vaccine efficacy , The proportion of people who achieve mass immunization is different , Suppose that the vaccinated population of a country only reaches half of the total population of the country 75%, Group immunity can be achieved . Please calculate how many people need to be vaccinated in a country to achieve mass immunization .
Input :
The input data consists of 1 That's ok 1 A positive integer , Indicates the total population of a country , Unit: 10000 persons .
Output :
common 1 Line a positive integer , Indicates the number of people who need to be vaccinated to achieve mass immunization , rounding , Unit: 10000 persons .
Examples 1:
Input :(covid.in)
100
Output :(covid.out)
75
Data range :100≤ The total population ≤100000
2、 Organize books (book)
Another semester is over , I have accumulated many more books , You decided to tidy up , There are three operations in sorting , The following rules :
1 p It means to number p Put your book at the front
2 p It means to number p Put your books at the back
3 p q It means to number p Put your book under the number q Behind my book
1、2、3 Each represents the type of sorting operation ,p、q Indicates the number of the book , They are separated by spaces ; It is known that before sorting , All books from 1 Start numbering and discharging in sequence .
Input :
common m+1 That's ok . The first line has two positive integers separated by spaces n and m, respectively n This book
and m Finishing operation , Next m That's ok , Each row has 2 Or 3 A positive integer separated by a space ,
Corresponding to the above three sorting operations .
Output :
common 1 That's ok , The order of the sorted books , The books are separated by spaces .
Examples :
Input :(book.in)
10 4
1 3
2 4
3 3 6
3 1 5
Output :(book.out)
2 5 1 6 3 7 8 9 10 4
Data range :1≤n,m≤100000
3、 CY Craft (cycraft)
As the game goes on , You also get a lot of weapons and equipment , Every acquisition of a weapon and equipment requires a certain price . Suppose you have a timeline , It records that there is a weapon corresponding to a certain point in time , We give every point in time ti Weapons and equipment corresponding to the time i The power value of is wi. At this time, you have a time shuttle , You can shuttle through the time axis at will , Suppose you go back and forth to a point in time t, Definition t Time point to ti Point in time acquisition i The cost of weaponry is |t-ti|*wi. Please calculate which t The total cost of acquiring all weapons and equipment at a time point is the smallest , Output minimum total cost . Every weapon and equipment must be acquired from t Time to start , return t The cost of a point in time is 0;|t-ti| Express t-ti The absolute value of .
Input :
common n+1 That's ok , First line a positive integer n, Indicates the total number of weapons and equipment , Next n That's ok , Each row
Two positive integers separated by spaces , They represent time ti Corresponding weapons and equipment at that time
Power value wi.
Output :
common 1 Line an integer , Represents the minimum cost of acquiring all weapons .
Examples 1:
Input :(cycraft.in)
4
-1 7
0 2
7 3
3 4
Output :(cycraft.out)
40
Sample explanation : Shuttle to 0 The total cost of acquiring all weapons and equipment at any time :1*7+7*3+3*4=40. Wear
Shuttle to 7 The total cost of acquiring all weapons and equipment at any time :8*7+7*2+4*4=86 ...
Data range :1≤n≤10000,-1000≤ti,wi≤1000.
4、 Mice love food (mouse)
There are many people on one road 1 Start numbering the mouse's favorite food , Suppose there are an infinite number of delicious foods , And the mice flashed randomly next to any food , Then try some delicious food in turn , At least try the next food when it first appears , Ask which two adjacent delicacies are tried the most by rats , Output as many times as possible . Make sure each mouse appears and stops with a different food number .
Input :
The input data are n+1 That's ok , The first line shows the number of mice n, Next n Each row has two numbers ,
Respectively represent the food number of the mouse for the first time , And stop the food number
Output :
One positive integer per line , Indicates the maximum number of times .
Examples 1:
Input :(mouse.in)
3
1 4
2 5
3 7
Output :(mouse.out)
3
Sample explanation :
share 3 A mouse , The first one tried in turn 1-2-3-4 common 4 Grow food ; The second one tried in turn
2-3-4-5 Here you are 4 Chinese cuisine ; The third one tried in turn 3-4-5-6-7 common 5 Grow food . The adjacent 3-4
Food has been tried 3 Time .
Data range :2≤n≤10000, The variety of food is guaranteed to be in int Within the scope of , Each mouse appears and stops
The food numbers are different .
边栏推荐
- 神经网络物联网平台搭建(物联网平台搭建实战教程)
- 2014合肥市第三十一届青少年信息学奥林匹克竞赛(小学组)试题
- Learning path PHP -- phpstudy "hosts file does not exist or is blocked from opening" when creating the project
- Cache é JSON uses JSON adapters
- Scala basic tutorial -- 15 -- recursion
- ByteDance dev better technology salon was successfully held, and we joined hands with Huatai to share our experience in improving the efficiency of web research and development
- 神经网络物联网应用技术就业前景【欢迎补充】
- 删除字符串中出现次数最少的字符【JS,Map排序,正则】
- Don't just learn Oracle and MySQL!
- 利用策略模式优化if代码【策略模式】
猜你喜欢

Scala basic tutorial -- 17 -- Collection

LeetCode第300场周赛(20220703)

TorchDrug教程

字节跳动Dev Better技术沙龙成功举办,携手华泰分享Web研发效能提升经验

Nature Microbiology | 可感染阿斯加德古菌的六种深海沉积物中的病毒基因组

基于unity的愤怒的小鸟设计
![[发布] 一个测试 WebService 和数据库连接的工具 - DBTest v1.0](/img/4e/4154fec22035725d6c7aecd3371b05.jpg)
[发布] 一个测试 WebService 和数据库连接的工具 - DBTest v1.0

NBA赛事直播超清画质背后:阿里云视频云「窄带高清2.0」技术深度解读

中国农科院基因组所汪鸿儒课题组诚邀加入

What types of Thawte wildcard SSL certificates provide
随机推荐
国元期货是正规平台吗?在国元期货开户安全吗?
NBA赛事直播超清画质背后:阿里云视频云「窄带高清2.0」技术深度解读
[cloud voice suggestion collection] cloud store renewal and upgrading: provide effective suggestions, win a large number of code beans, Huawei AI speaker 2!
请教一下 flinksql中 除了数据统计结果是状态被保存 数据本身也是状态吗
Scala基础教程--12--读写数据
Li Kou brush question diary /day1/2022.6.23
ThreadLocal原理与使用
Scala basic tutorial -- 12 -- Reading and writing data
Safer, smarter and more refined, Chang'an Lumin Wanmei Hongguang Mini EV?
6.26CF模拟赛E:价格最大化题解
激进技术派 vs 项目保守派的微服务架构之争
sqlserver的CDC第一次查询的能读取到数据,但后面增删改读取不到,是什么原因
输入的查询SQL语句,是如何执行的?
Caché WebSocket
使用canal配合rocketmq监听mysql的binlog日志
从实时应用角度谈通信总线仲裁机制和网络流控
Scala basic tutorial -- 15 -- recursion
Unity给自己的脚本添加类似编辑器扩展的功能案例ContextMenu的使用
How to modify icons in VBS or VBE
2014合肥市第三十一届青少年信息学奥林匹克竞赛(小学组)试题