Hi , may i get the 2. test case in this task , or can someone help me with it , I get invalid memory reference or memory limit exceeded error.
Autoput
Are you sure that your array is big enough?
You're a genius , for some odd reason , in the middle of the programm , i just reduced it to 50 k elements. >.>
Can anyone give hint on how to solve this problem?
just brute force it , the time and memory limit aren't bad , just read all the input and then try all the combinations.
Sort cities by X axis and try to put the road on every possible X. As you move forward on the X axis, remove the cities that come out of interval and add the new ones that come in (from the right).
Thanks.
That's a kind of line sweeping problem, right?
That's a kind of line sweeping problem, right?
I guess it's something like that