What are the correct resonance structures of nitrous oxide?
Firstly, neither of the resonance structures that you drew for your test are possible because they both violate the octet rule. For the structure on the left, the leftmost $\ce{N}$ is in control of only 6 electrons, and will not exist in this form. The structure on the right is not possible because central $\ce{N}$ is participating in 5 bonds, which $\ce{N}$ cannot do. The maximum number of bonds that $\ce{N}$ can participate in is 3 (covalent bonding - like $\ce{NH3}$) or 4 (coordinate bonding - like $\ce{NH4+}$).

As long as you satisfy the octet rule (or at least as best as you can - here are some exceptions) and you wish to check the stability of a molecule that you have drawn, simply use formula for formal charge. This is given by the equation:

$$\mathrm{FC} = \mathrm{V} - (\mathrm{N_B} + \frac{\mathrm{B}}{2})$$

Wher $\mathrm{FC}$ is the formal charge, $\mathrm{V}$ is the number of valence electrons that the atom under consideration usually has, $\mathrm{N_B}$ is the number of non-bonded electrons, and $\mathrm{B}$ is the number of electrons shared in a covalent bond on the atom. If a molecule is stable, the sum of the formal charges of each substituent atom should be 0. If you were to test this on each of the resonance structures that the test provides as answers, you would see that this holds true.