Activity for justhalfâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Comment | Post #289805 |
Can replace `while True` with `while 1` for -3 bytes. (more) |
— | 12 months ago |
Edit | Post #290270 |
Post edited: Update header |
— | 12 months ago |
Edit | Post #290270 | Initial revision | — | 12 months ago |
Answer | — |
A: How many umbrellas to cover the beach? [Python 3.8], 117 bytes def f(l): r,s,t=0,0,0 while si))for i,h in enumerate(l[s:])],t,0,r+1 return r Try it online! The idea is to find the left-most uncovered spot, find the umbrella that cover as many spots to the right as possible. Repeat until no more uncovered... (more) |
— | 12 months ago |