杭电上该程序通不过,请大神指点。
杭电上该程序通不过,请大神指点。
日期:2014-06-01 13:22:55 人气:1
#include#includeusing namespace std;struct node{ int j, f;}a[1000];bool cmp(node a, node b){ return a.j * b.f > b.j * a.f;}int main(){ int N, i; int M; double ans = 0; while (scanf("%d%d", &M, &N) != EOF) { ans = 0; // 初始化 if (M ==