这可以说是一道数论(? 首先可以发现$x$的取值为$[0,min(a,S/n)]$,$$$y$$$的取值为$$$S-xn$$$ $$$x$$$的取值最大为$$$min(a,S/n)$$$,得$$$y$$$的取值为$$$S-min(a,S/n)n$$$ 只要判断$y$是否小于等于$b$就好了
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3773 |
3 | Radewoosh | 3646 |
4 | ecnerwala | 3624 |
5 | jqdai0815 | 3620 |
5 | Benq | 3620 |
7 | orzdevinwang | 3612 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | Um_nik | 164 |
2 | maomao90 | 160 |
3 | -is-this-fft- | 159 |
4 | cry | 158 |
4 | atcoder_official | 158 |
4 | awoo | 158 |
7 | adamant | 155 |
8 | nor | 154 |
9 | maroonrk | 151 |
10 | Dominater069 | 150 |
这可以说是一道数论(? 首先可以发现$x$的取值为$[0,min(a,S/n)]$,$$$y$$$的取值为$$$S-xn$$$ $$$x$$$的取值最大为$$$min(a,S/n)$$$,得$$$y$$$的取值为$$$S-min(a,S/n)n$$$ 只要判断$y$是否小于等于$b$就好了
Name |
---|