|
|
вернуться в форумWA #5 I use priority queue,the memory that I used is 236 KB,but I still WA at test 5,but I don't know why... Re: WA #5 Послано Міша 12 июн 2014 23:40 You need use unsigned int. Re: WA #5 Послано EGlym 18 фев 2017 05:39 could someone tell me why ? Edited by author 18.02.2017 05:40 Edited by author 18.02.2017 05:40 Re: WA #5 2^31-1 can be stored into signed int. But, when length of input is even, you need to value average, so (probably) add 2 values and receive integer overflow. It doesn't mean you must use unsigned. You can avoid overflow in any other way. |
|
|