|
|
вернуться в форумTL13 My solution is O(n) (<=60 * n iterations) but I have TL on python Help me to read fast data input My input code: n, l, r = map(int, input().split()) tokens = sys.stdin.read().split() a = list(map(int, tokens)) Re: TL13 Thx But I solved problem using C++. The same algo but new implementation (added if ((prod / (double)1000000000) * a[j-1]> 1000000000) j = 0; else prod *= a[j-1];) Edited by author 07.08.2019 13:55 |
|
|