Teenagers working undercover succeeded in buying cigarettes illegally from nearly half of the Northern Virginia store clerks and vending machines they tested, according to a survey by two state health agencies.