Hello, can you explain how to solve this problem, please?
Problem
Thank you!
# | User | Rating |
---|---|---|
1 | tourist | 3803 |
2 | jiangly | 3707 |
3 | Benq | 3627 |
4 | ecnerwala | 3584 |
5 | orzdevinwang | 3573 |
6 | Geothermal | 3569 |
6 | cnnfls_csy | 3569 |
8 | Radewoosh | 3542 |
9 | jqdai0815 | 3532 |
10 | gyh20 | 3447 |
# | User | Contrib. |
---|---|---|
1 | maomao90 | 169 |
2 | awoo | 164 |
3 | adamant | 162 |
4 | maroonrk | 152 |
5 | -is-this-fft- | 151 |
6 | nor | 150 |
7 | SecondThread | 147 |
7 | atcoder_official | 147 |
9 | TheScrasse | 146 |
10 | Petr | 145 |
Hello, can you explain how to solve this problem, please?
A circle with a diameter of 2n-1 is symmetrically drawn on a chessboard of 2nx2n cells. Through how many squares of the board does this circle pass and how many squares will fit completely inside this circle? E.g if n = 4, then answer is, completely inside: 4, pass: 12;
Thank you!
Name |
---|
What is the data range of n?
n <= 10^4
Then if n<=10^4,use brute force to solve it.
Check this problem. The solution to this one is similar to your problem.
Oh, maybe I solved it.
Code: