Radio wave heating of the corona and electron precipitation during flares