-
Notifications
You must be signed in to change notification settings - Fork 0
/
LSCthoughts.txt
29 lines (18 loc) · 1.23 KB
/
LSCthoughts.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
start time
11:11 aim 12:11
Ok so i have just read the question and some thoughts come to mind.
Obviously i can just brute force and im hoping that it works. I could use binary search with this. However, this is not ideal.
I'll keep thinking until i get insight.
update 11:13
Ok so i have some new ideas. if we know that there is radius R, cant we just move a giant block of size 2*R+1 across and when we see a new store just add it to the houses in the block
I think that this will work and im excited. Once a house leaves the block we check if a pamphlete with this sum is available and if not just binary search the next possible etc etc.
Also i saw the time limit is a whole 3 seconds which is really large, a bit surprised honestly.
update 11:19
Ok i think that this approach would need some improvement. there is no way i'm iterating through like l when its a billion haha. I will just jump to the next smallest instead of incrementing by 1
update 11:31
still doing the brute force stuffs
I think that binary search is not feasible and probably explains the time limit lol
update 11:57
done coding and it doesn't work time to debug oof.
update 12:10
i wont be able to finish by the aim time. this program is taking way to long to implement.