Minjae1239

승률 공식 정확도 비교

#include <iostream>
#include <iomanip>
using namespace std;
int main() {
enum {Lotte, NC, Kia, Samsung, LG, Kiwoom, Hanhwa, SK, KT, Doosan};
enum{win, draw, defeat, RW, RL, ERA, AVG, r1,r2,r3,r4 };
double info[10][11];
info[Lotte][win] = 10;
info[Lotte][draw] = 0;
info[Lotte][defeat] = 10;
info[Lotte][RW] = 87;
info[Lotte][RL] = 106;
info[Lotte][ERA] = 5.04;
info[Lotte][AVG] = 0.255;
info[NC][win] = 17;
info[NC][draw] = 0;
info[NC][defeat] = 3;
info[NC][RW] = 129;
info[NC][RL] = 71;
info[NC][ERA] = 3.32;
info[NC][AVG] = 0.296;
info[LG][win] = 14;
info[LG][draw] = 0;
info[LG][defeat] = 6;
info[LG][RW] = 117;
info[LG][RL] = 90;
info[LG][ERA] = 4.15;
info[LG][AVG] = 0.288;
info[Kia][win] = 11;
info[Kia][draw] = 0;
info[Kia][defeat] = 10;
info[Kia][RW] = 97;
info[Kia][RL] = 95;
info[Kia][ERA] = 3.91;
info[Kia][AVG] = 0.273;
info[Doosan][win] = 12;
info[Doosan][draw] = 0;
info[Doosan][defeat] = 8;
info[Doosan][RW] = 127;
info[Doosan][RL] = 134;
info[Doosan][ERA] = 6.15;
info[Doosan][AVG] = 0.305;
info[Kiwoom][win] = 10;
info[Kiwoom][draw] = 0;
info[Kiwoom][defeat] = 11;
info[Kiwoom][RW] = 109;
info[Kiwoom][RL] = 108;
info[Kiwoom][ERA] = 4.80;
info[Kiwoom][AVG] = 0.263;
info[KT][win] = 9;
info[KT][draw] = 0;
info[KT][defeat] = 11;
info[KT][RW] = 131;
info[KT][RL] = 111;
info[KT][ERA] = 5.11;
info[KT][AVG] = 0.311;
info[Samsung][win] = 8;
info[Samsung][draw] = 0;
info[Samsung][defeat] = 13;
info[Samsung][RW] = 103;
info[Samsung][RL] = 109;
info[Samsung][ERA] = 4.60;
info[Samsung][AVG] = 0.244;
info[Hanhwa][win] = 7;
info[Hanhwa][draw] = 0;
info[Hanhwa][defeat] = 14;
info[Hanhwa][RW] = 73;
info[Hanhwa][RL] = 104;
info[Hanhwa][ERA] = 4.87;
info[Hanhwa][AVG] = 0.247;
info[SK][win] = 4;
info[SK][draw] = 0;
info[SK][defeat] = 16;
info[SK][RW] = 73;
info[SK][RL] = 118;
info[SK][ERA] = 4.96;
info[SK][AVG] = 0.234;
for (int i = 0; i < 10; i++) {
info[i][r1] = info[i][win] / (info[i][win] + info[i][defeat]);
}
for (int i = 0; i < 10; i++) {
info[i][r2] = pow((info[i][RW]), 2) / (pow((info[i][RW]), 2) + pow((info[i][RL]), 2));
}
for (int i = 0; i < 10; i++) {
info[i][r3] = 3.8 * info[i][AVG] - 0.1 * info[i][ERA] - 0.11;
}
for (int i = 0; i < 10; i++) {
cout << i << setw(10) << info[i][r1] << setw(10) << info[i][r2] <<setw(10)<<info[i][r3]<< endl;
}
return 0;
}
\ No newline at end of file