#include using namespace std; const int solvers = 7; const int instances = 400; double st[solvers + 1][instances + 1]; double rat[solvers + 1][instances + 1]; char instance[instances + 1][200]; int main() { freopen("speedunsat.txt", "r", stdin); for (int i = 1; i <= instances; i++) { for (int j = 1; j <= solvers; j++) scanf("%lf%lf", &st[j][i], &rat[j][i]); scanf("%s", instance[i]); } for (int j = 2; j <= 7; j++) { int same = 0; double sum = 0; for (int i = 1; i <= instances; i++) { // printf("%.2lf %.2lf\n", st[j][i], rat[j][i]); if (st[j][i] > 5000 || st[1][i] > 5000) continue; if (st[j][i] < 1.0 && st[1][i] < 1.0) continue; if (st[j][i] < 0.1 || st[1][i] < 0.1) { printf("\tpre %s\n", instance[i]); continue; } ++same; sum += rat[j][i]; // printf("%.2lf \t\t%.2lf %.2lf %s\n", rat[j][i], st[j][i], st[1][i], instance[i]); } printf("c speed is %.2lf, cal is %d\n", sum / same, same); } return 0; }