This type is used to refer to actions that are impossible to occur. Here we know that the condition cannot be fulfilled because the sentences refer to only past events. In this type, the conditional clause is in the Past perfect. The main clause uses: Would + have + past participle form of the verb.
If he had studied harder, he would have passed.
If a few more people had voted in his favour, he would have won the election.
If you had asked me for help, I would have helped you.
If you had shut the gate, the hens would not have gone out.
If I had known all the questions before, I would have got hundred per cent.