Showing
1 changed file
with
111 additions
and
0 deletions
win_rate_accurrancy.cpp
0 → 100644
1 | +#include <iostream> | ||
2 | +#include <iomanip> | ||
3 | +using namespace std; | ||
4 | + | ||
5 | +int main() { | ||
6 | + enum {Lotte, NC, Kia, Samsung, LG, Kiwoom, Hanhwa, SK, KT, Doosan}; | ||
7 | + enum{win, draw, defeat, RW, RL, ERA, AVG, r1,r2,r3,r4 }; | ||
8 | + | ||
9 | + double info[10][11]; | ||
10 | + | ||
11 | + info[Lotte][win] = 10; | ||
12 | + info[Lotte][draw] = 0; | ||
13 | + info[Lotte][defeat] = 10; | ||
14 | + info[Lotte][RW] = 87; | ||
15 | + info[Lotte][RL] = 106; | ||
16 | + info[Lotte][ERA] = 5.04; | ||
17 | + info[Lotte][AVG] = 0.255; | ||
18 | + | ||
19 | + info[NC][win] = 17; | ||
20 | + info[NC][draw] = 0; | ||
21 | + info[NC][defeat] = 3; | ||
22 | + info[NC][RW] = 129; | ||
23 | + info[NC][RL] = 71; | ||
24 | + info[NC][ERA] = 3.32; | ||
25 | + info[NC][AVG] = 0.296; | ||
26 | + | ||
27 | + info[LG][win] = 14; | ||
28 | + info[LG][draw] = 0; | ||
29 | + info[LG][defeat] = 6; | ||
30 | + info[LG][RW] = 117; | ||
31 | + info[LG][RL] = 90; | ||
32 | + info[LG][ERA] = 4.15; | ||
33 | + info[LG][AVG] = 0.288; | ||
34 | + | ||
35 | + info[Kia][win] = 11; | ||
36 | + info[Kia][draw] = 0; | ||
37 | + info[Kia][defeat] = 10; | ||
38 | + info[Kia][RW] = 97; | ||
39 | + info[Kia][RL] = 95; | ||
40 | + info[Kia][ERA] = 3.91; | ||
41 | + info[Kia][AVG] = 0.273; | ||
42 | + | ||
43 | + info[Doosan][win] = 12; | ||
44 | + info[Doosan][draw] = 0; | ||
45 | + info[Doosan][defeat] = 8; | ||
46 | + info[Doosan][RW] = 127; | ||
47 | + info[Doosan][RL] = 134; | ||
48 | + info[Doosan][ERA] = 6.15; | ||
49 | + info[Doosan][AVG] = 0.305; | ||
50 | + | ||
51 | + info[Kiwoom][win] = 10; | ||
52 | + info[Kiwoom][draw] = 0; | ||
53 | + info[Kiwoom][defeat] = 11; | ||
54 | + info[Kiwoom][RW] = 109; | ||
55 | + info[Kiwoom][RL] = 108; | ||
56 | + info[Kiwoom][ERA] = 4.80; | ||
57 | + info[Kiwoom][AVG] = 0.263; | ||
58 | + | ||
59 | + info[KT][win] = 9; | ||
60 | + info[KT][draw] = 0; | ||
61 | + info[KT][defeat] = 11; | ||
62 | + info[KT][RW] = 131; | ||
63 | + info[KT][RL] = 111; | ||
64 | + info[KT][ERA] = 5.11; | ||
65 | + info[KT][AVG] = 0.311; | ||
66 | + | ||
67 | + info[Samsung][win] = 8; | ||
68 | + info[Samsung][draw] = 0; | ||
69 | + info[Samsung][defeat] = 13; | ||
70 | + info[Samsung][RW] = 103; | ||
71 | + info[Samsung][RL] = 109; | ||
72 | + info[Samsung][ERA] = 4.60; | ||
73 | + info[Samsung][AVG] = 0.244; | ||
74 | + | ||
75 | + info[Hanhwa][win] = 7; | ||
76 | + info[Hanhwa][draw] = 0; | ||
77 | + info[Hanhwa][defeat] = 14; | ||
78 | + info[Hanhwa][RW] = 73; | ||
79 | + info[Hanhwa][RL] = 104; | ||
80 | + info[Hanhwa][ERA] = 4.87; | ||
81 | + info[Hanhwa][AVG] = 0.247; | ||
82 | + | ||
83 | + info[SK][win] = 4; | ||
84 | + info[SK][draw] = 0; | ||
85 | + info[SK][defeat] = 16; | ||
86 | + info[SK][RW] = 73; | ||
87 | + info[SK][RL] = 118; | ||
88 | + info[SK][ERA] = 4.96; | ||
89 | + info[SK][AVG] = 0.234; | ||
90 | + | ||
91 | + for (int i = 0; i < 10; i++) { | ||
92 | + info[i][r1] = info[i][win] / (info[i][win] + info[i][defeat]); | ||
93 | + } | ||
94 | + | ||
95 | + for (int i = 0; i < 10; i++) { | ||
96 | + info[i][r2] = pow((info[i][RW]), 2) / (pow((info[i][RW]), 2) + pow((info[i][RL]), 2)); | ||
97 | + } | ||
98 | + | ||
99 | + for (int i = 0; i < 10; i++) { | ||
100 | + info[i][r3] = 3.8 * info[i][AVG] - 0.1 * info[i][ERA] - 0.11; | ||
101 | + } | ||
102 | + | ||
103 | + for (int i = 0; i < 10; i++) { | ||
104 | + cout << i << setw(10) << info[i][r1] << setw(10) << info[i][r2] <<setw(10)<<info[i][r3]<< endl; | ||
105 | + } | ||
106 | + | ||
107 | + | ||
108 | + | ||
109 | + | ||
110 | + return 0; | ||
111 | +} | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
-
Please register or login to post a comment