#P6056. [加油武汉] SIR 模型
[加油武汉] SIR 模型
Description
We simplify this model. Initially, there are infectives and susceptibles. For each day, suppose there are currently infectives, susceptibles, and recovered. Then each day, people will be infected (changing from susceptible to infective), and people will be cured (changing from infective to recovered).
Here, is the infection rate, is the recovery rate, and is the ceiling function.
Find how many susceptibles , infectives , and recovered there are after days.
Note: Infectives and recovered are settled daily, and the result depends only on the values at the start of that day. That is, someone who recovers on that day does not affect how many people they infect on the same day.
If the computed number of newly infected people exceeds the number of susceptibles, then all susceptibles become infected.
Input Format
The first line contains three positive integers, representing the number of susceptibles on day , , the number of infectives on day , , and the number of days (initially the number of recovered is ).
The second line contains two floating-point numbers, representing the infection rate and the recovery rate .
Output Format
Output one line with three integers, representing the numbers of susceptibles , infectives , and recovered after days.
980 20 2
0.0005 0.00001
955 43 2
1400000000 1 10
0.000000003 0.001
1386791252 13205592 3157
1919 810 1
0.00001 0.1
1903 745 81
Hint
For of the testdata, . For another of the testdata, . For of the testdata, $1 \le S_0+R_0 \le 2\times 10^9, 0 < \beta, \gamma < 1, 1 \le n \le 100$.
Translated by ChatGPT 5
京公网安备 11011102002149号