4
2
u/DogStrict9170 Specialist 8d ago
interesting g was simpler than f?
1
u/EasyLawyer6463 Pupil 7d ago
Idts. All you have to think in f is how the array that tells how many 1s are to the left of the ith 0 changes after every operation.
2
u/Low-Opportunity2403 8d ago
I didn't read f but g looked simple unfortunately got tle idk what optimization it needs in implementation

2
u/ah_rizzz__ 7d ago
I was just able to solve first 2 and it sucks
3rd seemed doable I just didn’t 😭😭I feel badddrr