|
|
I think is bigger problem is surmise, what stoi dont work for long long integers mxw can be 1, and all w is about 10^9 and a can be 10^9, then in the worst case we need to withdraw the sum of 10^18 about 10^5 times, so long double should not fit, but it fits i use python so long arithmetics is not problem for me i use greedy algo and try to replace digit to 9 i want to see test How to solve problem without long arithmetics? The main idea of this test following in sorting relative fees instead of absolute fees. Simple example: 2 1 10 10 1 1 999990 1 100 1 The first package has huge absolute value of fees ((999999 - 10) * 1), but it adds only 9 credits to the initial fees. Edited by author 18.06.2022 20:06 please tell me the 16 test |
|
|