Submission: 93000577 Problem: 1042C - Array Product Can someone help me out? This works fine on the sample cases but shows tle on test case 6.
Edit: TLE was due to vector erase function. It works fine when set is used instead of vector.
Auto comment: topic has been updated by dhritishman22 (previous revision, new revision, compare).
It worked fine when I used set instead of vector. TLE was due to vector erase function.
Good, you corrected on your own ... yes its simple observation when you are erasing every time the last or first element or even erasing in increasing decreasing manner you should not be using vectors.