Hello all, I have a question about the problem in the recent div. 2 contest named in the title. ↵
↵
In the problem we are given a task to find a cyclical array of N numbers given the sum of local minima and local maxima. My claim is that the constraints of the question are incorrect as in an extreme case, my code will TLE. ↵
↵
This is because no constraint on N is given. However, the only constraints given are the sum of local minimas/maximas which is -1e9 <= X < Y <= 1e9. However, it is evident that length of the array will be 2*(X-Y). So if X = 1e9 and Y = -1e9, then N will be 2e9 won't it. And then we will have to output 2e9 numbers which will either TLE or MLE (since i am declaring an array with 2e9 integers which is a lot of space). ↵
↵
Am I misunderstanding? Any help will be appreciated. Thanks for reading. ↵
↵
UPD: I cannot read, and there was a constraint on N that said total sum of N over all test cases <= 2e5.
↵
In the problem we are given a task to find a cyclical array of N numbers given the sum of local minima and local maxima. My claim is that the constraints of the question are incorrect as in an extreme case, my code will TLE. ↵
↵
This is because no constraint on N is given. However, the only constraints given are the sum of local minimas/maximas which is -1e9 <= X < Y <= 1e9. However, it is evident that length of the array will be 2*(X-Y). So if X = 1e9 and Y = -1e9, then N will be 2e9 won't it. And then we will have to output 2e9 numbers which will either TLE or MLE (since i am declaring an array with 2e9 integers which is a lot of space). ↵
↵
Am I misunderstanding? Any help will be appreciated. Thanks for reading. ↵
↵
UPD: I cannot read, and there was a constraint on N that said total sum of N over all test cases <= 2e5.