How much energy does it cost to have electron configurations that are not in accordance with Hund's rules?
Each energy level of a given electron configuration is described by a  Russell-Saunders term symbol, assuming LS coupling. The ground state term symbol is predicted by Hund's rules. Tables of atomic energy levels identified by their term symbols have been compiled by NIST. So, the only thing you have to do, is to compare the energies of the terms describing the electron configurations you are looking for with their respective ground states.

In the following pictures the notation $m_{S} = + \frac{1}{2} \overset{\scriptsize{\text{def}}}{=} \, \uparrow$ and $m_{S} = - \frac{1}{2} \overset{\scriptsize{\text{def}}}{=} \, \downarrow$ will be used for the spin quantum number $m_{S}$.

The data for carbon can be found here. The ground state for carbon is ${}^{3}\mathrm{P}_{0}$ - it is assigned the energy $0.00 \, \mathrm{cm}^{-1}$. From your question it's not 100 % clear what exact electron configuration you want. I assume it is either ${}^{3}\mathrm{P}_{2}$ or ${}^{1}\mathrm{S}_{0}$ therefore I will give the values for both of them (for comparison: the thermal energy at room temperature is about $200 \, \mathrm{cm}^{-1}$).



The data for nitrogen can be found here. The ground state for nitrogen is ${}^{4}\mathrm{S}_{3/2}$ - it is assigned the energy $0.00 \, \mathrm{cm}^{-1}$. From your question it's not 100 % clear what exact electron configuration you want. I assume it is either ${}^{2}\mathrm{D}_{5/2}$ or ${}^{2}\mathrm{P}_{3/2}$ therefore I will give the values for both of them.