Enigmatic grading, what's the standard?
?
| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
#include"iostream"#include"stdlib.h"#include"stdio.h"#include<iomanip>#include<cmath>using namespace std;int max(int a, int b, int c){ if (a >=b) { if (a >= c) return a; else { return c; } } else { if (b >= c) return b; else { return c; } }}intmain( ){ int full_mark, tolerence, G1, G2, G3, Gj; double resu; while (cin >> full_mark >> tolerence >> G1 >> G2 >> G3 >> Gj) { if (abs(G1 - G2) <= tolerence) resu =(double) (G1 + G2) / 2.0; else if (abs(G3 - G1) > tolerence && abs(G3 - G2) <= tolerence) { resu = (double)(G3 + G2) / 2.0; } else if (abs(G3 - G2) > tolerence && abs(G3 - G1) <= tolerence) { resu = (double)(G3 + G1) / 2.0; } else if (abs(G3 - G1) <= tolerence && abs(G3 - G2) <= tolerence) resu = max(G1, G2, G3)+1.0-1.0; else { resu = (double)Gj + 1.0 - 1.0; } printf("%.1lf\n", resu); } return 0;} |
Nine degrees oj1002