String window problem

can i code using brute force approach??
will the coding blocks IDE will accept my code if i use brute force approach to solve this