It's the only thing that matters. Go to a top high-school (there's 1 or two in most important cities, 4-5 in Bucharest) and you'll probably have good to excellent teachers (and some bad ones) and smart, motivated classmates. Go to a bad one and...you won't.
Yeah, I think it being meritocratic is the most important part. For context, you have to pass a math and literature exam at the end of 8th grade and you get assigned to a high school based on your score and your preferences. Everyone prefers the same high-schools.