Here, for example, the simplest olympiad problem. I solved it in 45 minutes, in the old fashioned way, with oop:
- I create class AppleTree
- I am writing a comparator
- I make a dynamic array and sort it.
- I use a couple of crutches to know where the nearest trees are to the zero position.
- I clone a dynamic array
- I walk recursively in an array, deleting trees
- Then go to the other side of the sloped array
This is all taking into account the search for bugs took me three-quarters of an hour. And if you look, then some people managed to solve it in 5 minutes!
Well, for 5 minutes, I definitely will not succeed. But at least 20 ...
Well, the question is how to achieve this. Since the overwhelming number of time took writings, then we must somehow reduce it. But how to do that? I understand that it is not necessary to fence an oopgorod, but how not to fence it?
ps Those who will propose to close the question for "it is necessary to concretize the question," etc. - I specifically cited a specific task. In my opinion this is a sufficient specification.