|
|
вернуться в форумПоказать все сообщения Спрятать все сообщенияMay be your program is O(n^2) you can use an array. f[i] means there are f[i] '1' after s[i]. (I can't speak English well.) No additional array is required. Only several auxiliary variables. |
|
|