0075 - BMI

#include <cstdio>
#include <iostream>
#include <vector>
using namespace std;

typedef pair<int,double> P_ID;

void Slove(void)	{
	int number;
	double weight, height;
	vector<P_ID> vec;

	while (scanf ("%d,%lf,%lf", &number, &weight, &height) != EOF)
		vec.push_back( P_ID(number,25.0-weight/(height*height)) );
	for (vector<P_ID>::iterator it=vec.begin(); it!=vec.end(); ++it)
		if (it->second <= 0)	cout << it->first << endl;
}

int main(void)	{
	Slove();
}

やるだけ問題。