I am thinking you can separate to import the the accounts and contacts if the contacts are under these accounts.
You can first import the accounts, then import the contacts which has lookup field for accounts.
The lookup field will search the related reference , if it can't find the account with that name, the error will happen and the import will failed.
Wilson