In this submission is there any logical error or precision error? I have been trying to tackle this issue for over an hour and still couldn't figure out the issue. The logic is not very complicated.
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
4 | adamant | 160 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
8 | Dominater069 | 154 |
8 | nor | 154 |
In this submission is there any logical error or precision error? I have been trying to tackle this issue for over an hour and still couldn't figure out the issue. The logic is not very complicated.
Name |
---|
Just some little comments
1) search for fast I/O a sample here and you may encounter TLE for this question
2) try not to use float/double unless you really need it. For this question you need double when print the answer only, but not necessary in storing the values
the sample i/o is using only 6 precision digits why are you using 17? see your first input the 4th line gives 1.33333333333333326 instead of 6 3's. I think this your main issue. the 10th test also says that thing- "wrong answer 103364th numbers differ — expected: '-1307.3528710', found: '-1307.3548723', error = '0.0000015'"
use vectors instead of stack, it seems you are using too much memory
Not the case. As long as the difference of the answer and the output does not exceed 10^-6, it's fine, no matter how many digits there are. Here, the difference is 0.002, so if it prints only 6 digits or 8 digits, it will still be 0.002.
There has been no MLE test cases yet. Also, I don't think there will be much difference between std::vector and std::stack.
Maybe it could work fine. But, I recommend declaring the arrays globally all the time.
It's not a good practice for programming for work. Otherwise, I don't see much difference between declaring bits/stdc++.h and a bunch of other headers, performance wise, just a few extra seconds of compiling (the compiler will know what the code needs, so it won't include unnecessary things in the actual program).
You can use precompiled headers to get rid of those extra seconds.
I do not understand your logic exactly but you do some strange things with this
plus
variable. For example, I wrote the following test case:The last output is 2.5, which doesn't seem to be the average of 10 and 5.