win_rate_accurrancy.cpp
2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#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;
}