当前位置:网站首页>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 .
边栏推荐
- Scala basic tutorial -- 15 -- recursion
- 使用FTP
- Scala basic tutorial -- 14 -- implicit conversion
- sqlserver的CDC第一次查询的能读取到数据,但后面增删改读取不到,是什么原因
- The latest progress of Intel Integrated Optoelectronics Research promotes the progress of CO packaging optics and optical interconnection technology
- 奥迪AUDI EDI INVOIC发票报文详解
- Perfect JS event delegation
- 2022CoCa: Contrastive Captioners are Image-Text Fountion Models
- My colleagues quietly told me that flying Book notification can still play like this
- Wanghongru research group of Institute of genomics, Chinese Academy of Agricultural Sciences is cordially invited to join
猜你喜欢

Scala基础教程--17--集合

Scala基础教程--20--Akka
Summary and sorting of 8 pits of redis distributed lock

每日一题(2022-07-02)——最低加油次数

Principle and application of ThreadLocal

Li Kou brush question diary /day3/2022.6.25
![[2022 Jiangxi graduate mathematical modeling] curling movement idea analysis and code implementation](/img/63/8d5f875b4409511628faf2914836d3.png)
[2022 Jiangxi graduate mathematical modeling] curling movement idea analysis and code implementation

Improve the accuracy of 3D reconstruction of complex scenes | segmentation of UAV Remote Sensing Images Based on paddleseg
![[uniapp] uniapp development app online Preview PDF file](/img/11/d640338c626249057f7ad616b55c4f.png)
[uniapp] uniapp development app online Preview PDF file
redis分布式锁的8大坑总结梳理
随机推荐
IBM WebSphere MQ retrieving messages
IBM WebSphere MQ检索邮件
Caché WebSocket
Scala basic tutorial -- 18 -- set (2)
模板_大整数减法_无论大小关系
Caché WebSocket
使用FTP
How to download files using WGet and curl
Deleting nodes in binary search tree
Installation and use of VMware Tools and open VM tools: solve the problems of incomplete screen and unable to transfer files of virtual machines
2021 合肥市信息学竞赛小学组
基于C语言的菜鸟驿站管理系统
BI技巧丨权限轴
Nebula importer data import practice
Process of manually encrypt the mass-producing firmware and programming ESP devices
2022CoCa: Contrastive Captioners are Image-Text Fountion Models
Using SSH
Cache é JSON uses JSON adapters
ESP32-C3入门教程 问题篇⑫——undefined reference to rom_temp_to_power, in function phy_get_romfunc_addr
[mathematical modeling of graduate students in Jiangxi Province in 2022] analysis and code implementation of haze removal by nucleation of water vapor supersaturation