In a country with more than 20,000 public high schools, we found just 165 of these schools, known as exam schools. They educate about 1 percent of students. Nineteen states have none. Only three big cities have more than five such schools (Los Angeles has zero). Almost all have far more qualified applicants than they can accommodate. Hence they practice very selective admission, turning away thousands of students who could benefit from what they have to offer. Northern Virginia’s acclaimed Thomas Jefferson High School for Science and Technology, for example, gets some 3,300 applicants a year — two-thirds of them academically qualified — for 480 places.

We built a list, surveyed the principals and visited 11 schools. We learned a lot. While the schools differ in many ways, their course offerings resemble A.P. classes in content and rigor; they have stellar college placement; and the best of them expose their pupils to independent study, challenging internships and individual research projects.

Critics call them elitist, but we found the opposite. These are great schools accessible to families who can’t afford private schooling or expensive suburbs. While exam schools in some cities don’t come close to reflecting the demographics around them, across the country the low-income enrollment in these schools parallels the high school population as a whole. African-American youngsters are “overrepresented” in them and Asian-Americans staggeringly so (21 percent versus 5 percent in high schools overall). Latinos are underrepresented, but so are whites.

That’s not so surprising. Prosperous, educated parents can access multiple options for their able daughters and sons. Elite private schools are still out there. So are New Trier, Scarsdale and Beverly Hills. The schools we studied, by and large, are educational oases for families with smart kids but few alternatives.

They’re safe havens, too — schools where everyone focuses on teaching and learning, not maintaining order. They have sports teams, but their orchestras are better. Yes, some have had to crack down on cheating, but in these schools it’s O.K. to be a nerd. You’re surrounded by kids like you — some smarter than you — and taught by capable teachers who welcome the challenge, teachers more apt to have Ph.D.’s or experience at the college level than high school instructors elsewhere. You aren’t searched for weapons at the door. And you’re pretty sure to graduate and go on to a good college.

Many more students could benefit from schools like these — and the numbers would multiply if our education system did right by such students in the early grades. But that will happen only when we acknowledge that leaving no child behind means paying as much attention to those who’ve mastered the basics — and have the capacity and motivation for much more — as we do to those who cannot yet read or subtract.

It’s time to end the bias against gifted and talented education and quit assuming that every school must be all things to all students, a simplistic formula that ends up neglecting all sorts of girls and boys, many of them poor and minority, who would benefit more from specialized public schools. America should have a thousand or more high schools for able students, not 165, and elementary and middle schools that spot and prepare their future pupils.

With their support for school choice, Mr. Romney and Mr. Obama have both edged toward recognizing that kids aren’t all the same and schools shouldn’t be, either. Yet fear of seeming elitist will most likely keep them from proposing more exam schools. Which is ironic and sad, considering where they went to school. Smart kids shouldn’t have to go to private schools or get turned away from Bronx Science or Thomas Jefferson simply because there’s no room for them.