Используем третье условное наклонение (Conditional 3) для описания нереальных ситуаций в прошлом.
If I had thought about the problem, the situation would not have been bad.