如何根据 Visual Basic 2010 中其中一列的最大值从列表框中提取行
How to extract a row from a listbox based on the maximum value of one of it's columns in Visual Basic 2010
我在 Visual Basic 2010 中有一个列表框。总而言之,我想遍历每一行,对于每个 MaxWeight 类别,遍历 Maxspeed 值并打印出最高 T_final 值,同时在该特定最大重量下最大化 MaxSpeed。
因此 1) 对于每个权重类别
2) 降序排列 T_final
3) Select 最高 T_final 值对应于最高可能的 Maxspeed 值。
下面是原始数据;
Group Max Weight Max Speed T_Desc T_Emerg T_Final Time
2 80000 1 404 0 404 840
2 80000 2 0 0 0 420
2 80000 3 0 0 0 280
2 80000 4 0 0 0 210
2 80000 5 0 0 0 168
2 80000 6 0 0 0 140
2 80000 7 0 0 0 120
2 80000 8 0 0 0 105
2 80000 9 0 0 0 93
2 80000 10 0 0 0 84
2 80000 11 0 0 0 76
2 80000 12 0 0 0 70
2 80000 13 0 0 0 65
2 80000 14 0 0 0 60
2 80000 15 0 0 0 56
2 80000 16 0 0 0 52
2 80000 17 0 0 0 49
2 80000 18 0 0 0 47
2 80000 19 0 0 0 44
2 80000 20 0 0 0 42
2 80000 21 0 0 0 40
2 80000 22 0 0 0 38
2 80000 23 0 0 0 37
2 80000 24 0 0 0 35
2 80000 25 0 0 0 34
2 80000 26 0 0 0 32
2 80000 27 0 0 0 31
2 80000 28 0 0 0 30
2 80000 29 0 0 0 29
2 80000 30 0 0 0 28
2 80000 31 0 0 0 27
2 80000 32 0 0 0 26
2 80000 33 0 0 0 25
2 80000 34 0 0 0 25
2 80000 35 0 0 0 24
2 80000 36 0 0 0 23
2 80000 37 0 0 0 23
2 80000 38 0 0 0 22
2 80000 39 0 0 0 22
2 80000 40 0 0 0 21
2 80000 41 0 0 0 20
2 80000 42 0 0 0 20
2 80000 43 0 0 0 20
2 80000 44 0 0 0 19
2 80000 45 0 0 0 19
2 80000 46 0 0 0 18
2 80000 47 0 0 0 18
2 80000 48 0 0 0 18
2 80000 49 0 0 0 17
2 80000 50 0 0 0 17
2 80000 51 0 0 0 16
2 80000 52 0 0 0 16
2 80000 53 0 0 0 16
2 80000 54 0 0 0 16
2 80000 55 0 0 0 15
2 80000 56 0 0 0 15
2 80000 57 0 0 0 15
2 80000 58 0 0 0 14
2 80000 59 0 0 0 14
2 80000 60 0 0 0 14
2 80000 61 0 0 0 14
2 80000 62 0 0 0 14
2 80000 63 0 0 0 13
2 80000 64 0 0 0 13
2 80000 65 0 0 0 13
2 75000 1 361 0 361 840
2 75000 2 0 0 0 420
2 75000 3 0 0 0 280
2 75000 4 0 0 0 210
2 75000 5 0 0 0 168
2 75000 6 0 0 0 140
2 75000 7 0 0 0 120
2 75000 8 0 0 0 105
2 75000 9 0 0 0 93
2 75000 10 0 0 0 84
2 75000 11 0 0 0 76
2 75000 12 0 0 0 70
2 75000 13 0 0 0 65
2 75000 14 0 0 0 60
2 75000 15 0 0 0 56
2 75000 16 0 0 0 52
2 75000 17 0 0 0 49
2 75000 18 0 0 0 47
2 75000 19 0 0 0 44
2 75000 20 0 0 0 42
2 75000 21 0 0 0 40
2 75000 22 0 0 0 38
2 75000 23 0 0 0 37
2 75000 24 0 0 0 35
2 75000 25 0 0 0 34
2 75000 26 0 0 0 32
2 75000 27 0 0 0 31
2 75000 28 0 0 0 30
2 75000 29 0 0 0 29
2 75000 30 0 0 0 28
2 75000 31 0 0 0 27
2 75000 32 0 0 0 26
2 75000 33 0 0 0 25
2 75000 34 0 0 0 25
2 75000 35 0 0 0 24
2 75000 36 0 0 0 23
2 75000 37 0 0 0 23
2 75000 38 0 0 0 22
2 75000 39 0 0 0 22
2 75000 40 0 0 0 21
2 75000 41 0 0 0 20
2 75000 42 0 0 0 20
2 75000 43 0 0 0 20
2 75000 44 0 0 0 19
2 75000 45 0 0 0 19
2 75000 46 0 0 0 18
2 75000 47 0 0 0 18
2 75000 48 0 0 0 18
2 75000 49 0 0 0 17
2 75000 50 0 0 0 17
2 75000 51 0 0 0 16
2 75000 52 0 0 0 16
2 75000 53 0 0 0 16
2 75000 54 0 0 0 16
2 75000 55 0 0 0 15
2 75000 56 0 0 0 15
2 75000 57 0 0 0 15
2 75000 58 0 0 0 14
2 75000 59 0 0 0 14
2 75000 60 0 0 0 14
2 75000 61 0 0 0 14
2 75000 62 0 0 0 14
2 75000 63 0 0 0 13
2 75000 64 0 0 0 13
2 75000 65 0 0 0 13
2 70000 1 317 0 317 840
2 70000 2 0 0 0 420
2 70000 3 0 0 0 280
2 70000 4 0 0 0 210
2 70000 5 0 0 0 168
2 70000 6 0 0 0 140
2 70000 7 0 0 0 120
2 70000 8 0 0 0 105
2 70000 9 0 0 0 93
2 70000 10 0 0 0 84
2 70000 11 0 0 0 76
2 70000 12 0 0 0 70
2 70000 13 0 0 0 65
2 70000 14 0 0 0 60
2 70000 15 0 0 0 56
2 70000 16 0 0 0 52
2 70000 17 0 0 0 49
2 70000 18 0 0 0 47
2 70000 19 0 0 0 44
2 70000 20 0 0 0 42
2 70000 21 0 0 0 40
2 70000 22 0 0 0 38
2 70000 23 0 0 0 37
2 70000 24 0 0 0 35
2 70000 25 0 0 0 34
2 70000 26 0 0 0 32
2 70000 27 0 0 0 31
2 70000 28 0 0 0 30
2 70000 29 0 0 0 29
2 70000 30 0 0 0 28
2 70000 31 0 0 0 27
2 70000 32 0 0 0 26
2 70000 33 0 0 0 25
2 70000 34 0 0 0 25
2 70000 35 0 0 0 24
2 70000 36 0 0 0 23
2 70000 37 0 0 0 23
2 70000 38 0 0 0 22
2 70000 39 0 0 0 22
2 70000 40 0 0 0 21
2 70000 41 0 0 0 20
2 70000 42 0 0 0 20
2 70000 43 0 0 0 20
2 70000 44 0 0 0 19
2 70000 45 0 0 0 19
2 70000 46 0 0 0 18
2 70000 47 0 0 0 18
2 70000 48 0 0 0 18
2 70000 49 0 0 0 17
2 70000 50 0 0 0 17
2 70000 51 0 0 0 16
2 70000 52 0 0 0 16
2 70000 53 0 0 0 16
2 70000 54 0 0 0 16
2 70000 55 0 0 0 15
2 70000 56 0 0 0 15
2 70000 57 0 0 0 15
2 70000 58 0 0 0 14
2 70000 59 0 0 0 14
2 70000 60 0 0 0 14
2 70000 61 0 0 0 14
2 70000 62 0 0 0 14
2 70000 63 0 0 0 13
2 70000 64 0 0 0 13
2 70000 65 0 0 0 13
2 65000 1 273 0 273 840
2 65000 2 0 0 0 420
2 65000 3 0 0 0 280
2 65000 4 0 0 0 210
2 65000 5 0 0 0 168
2 65000 6 0 0 0 140
2 65000 7 0 0 0 120
2 65000 8 0 0 0 105
2 65000 9 0 0 0 93
2 65000 10 0 0 0 84
2 65000 11 0 0 0 76
2 65000 12 0 0 0 70
2 65000 13 0 0 0 65
2 65000 14 0 0 0 60
2 65000 15 0 0 0 56
2 65000 16 0 0 0 52
2 65000 17 0 0 0 49
2 65000 18 0 0 0 47
2 65000 19 0 0 0 44
2 65000 20 0 0 0 42
2 65000 21 0 0 0 40
2 65000 22 0 0 0 38
2 65000 23 0 0 0 37
2 65000 24 0 0 0 35
2 65000 25 0 0 0 34
2 65000 26 0 0 0 32
2 65000 27 0 0 0 31
2 65000 28 0 0 0 30
2 65000 29 0 0 0 29
2 65000 30 0 0 0 28
2 65000 31 0 0 0 27
2 65000 32 0 0 0 26
2 65000 33 0 0 0 25
2 65000 34 0 0 0 25
2 65000 35 0 0 0 24
2 65000 36 0 0 0 23
2 65000 37 0 0 0 23
2 65000 38 0 0 0 22
2 65000 39 0 0 0 22
2 65000 40 0 0 0 21
2 65000 41 0 0 0 20
2 65000 42 0 0 0 20
2 65000 43 0 0 0 20
2 65000 44 0 0 0 19
2 65000 45 0 0 0 19
2 65000 46 0 0 0 18
2 65000 47 0 0 0 18
2 65000 48 0 0 0 18
2 65000 49 0 0 0 17
2 65000 50 0 0 0 17
2 65000 51 0 0 0 16
2 65000 52 0 0 0 16
2 65000 53 0 0 0 16
2 65000 54 0 0 0 16
2 65000 55 0 0 0 15
2 65000 56 0 0 0 15
2 65000 57 0 0 0 15
2 65000 58 0 0 0 14
2 65000 59 0 0 0 14
2 65000 60 0 0 0 14
2 65000 61 0 0 0 14
2 65000 62 0 0 0 14
2 65000 63 0 0 0 13
2 65000 64 0 0 0 13
2 65000 65 0 0 0 13
2 60000 1 230 0 230 840
2 60000 2 0 0 0 420
2 60000 3 0 0 0 280
2 60000 4 0 0 0 210
2 60000 5 0 0 0 168
2 60000 6 0 0 0 140
2 60000 7 0 0 0 120
2 60000 8 0 0 0 105
2 60000 9 0 0 0 93
2 60000 10 0 0 0 84
2 60000 11 0 0 0 76
2 60000 12 0 0 0 70
2 60000 13 0 0 0 65
2 60000 14 0 0 0 60
2 60000 15 0 0 0 56
2 60000 16 0 0 0 52
2 60000 17 0 0 0 49
2 60000 18 0 0 0 47
2 60000 19 0 0 0 44
2 60000 20 0 0 0 42
2 60000 21 0 0 0 40
2 60000 22 0 0 0 38
2 60000 23 0 0 0 37
2 60000 24 0 0 0 35
2 60000 25 0 0 0 34
2 60000 26 0 0 0 32
2 60000 27 0 0 0 31
2 60000 28 0 0 0 30
2 60000 29 0 0 0 29
2 60000 30 0 0 0 28
2 60000 31 0 0 0 27
2 60000 32 0 0 0 26
2 60000 33 0 0 0 25
2 60000 34 0 0 0 25
2 60000 35 0 0 0 24
2 60000 36 0 0 0 23
2 60000 37 0 0 0 23
2 60000 38 0 0 0 22
2 60000 39 0 0 0 22
2 60000 40 0 0 0 21
2 60000 41 0 0 0 20
2 60000 42 0 0 0 20
2 60000 43 0 0 0 20
2 60000 44 0 0 0 19
2 60000 45 0 0 0 19
2 60000 46 0 0 0 18
2 60000 47 0 0 0 18
2 60000 48 0 0 0 18
2 60000 49 0 0 0 17
2 60000 50 0 0 0 17
2 60000 51 0 0 0 16
2 60000 52 0 0 0 16
2 60000 53 0 0 0 16
2 60000 54 0 0 0 16
2 60000 55 0 0 0 15
2 60000 56 0 0 0 15
2 60000 57 0 0 0 15
2 60000 58 0 0 0 14
2 60000 59 0 0 0 14
2 60000 60 0 0 0 14
2 60000 61 0 0 0 14
2 60000 62 0 0 0 14
2 60000 63 0 0 0 13
2 60000 64 0 0 0 13
2 60000 65 0 0 0 13
2 55000 1 186 0 186 840
2 55000 2 0 0 0 420
2 55000 3 0 0 0 280
2 55000 4 0 0 0 210
2 55000 5 0 0 0 168
2 55000 6 0 0 0 140
2 55000 7 0 0 0 120
2 55000 8 0 0 0 105
2 55000 9 0 0 0 93
2 55000 10 0 0 0 84
2 55000 11 0 0 0 76
2 55000 12 0 0 0 70
2 55000 13 0 0 0 65
2 55000 14 0 0 0 60
2 55000 15 0 0 0 56
2 55000 16 0 0 0 52
2 55000 17 0 0 0 49
2 55000 18 0 0 0 47
2 55000 19 0 0 0 44
2 55000 20 0 0 0 42
2 55000 21 0 0 0 40
2 55000 22 0 0 0 38
2 55000 23 0 0 0 37
2 55000 24 0 0 0 35
2 55000 25 0 0 0 34
2 55000 26 0 0 0 32
2 55000 27 0 0 0 31
2 55000 28 0 0 0 30
2 55000 29 0 0 0 29
2 55000 30 0 0 0 28
2 55000 31 0 0 0 27
2 55000 32 0 0 0 26
2 55000 33 0 0 0 25
2 55000 34 0 0 0 25
2 55000 35 0 0 0 24
2 55000 36 0 0 0 23
2 55000 37 0 0 0 23
2 55000 38 0 0 0 22
2 55000 39 0 0 0 22
2 55000 40 0 0 0 21
2 55000 41 0 0 0 20
2 55000 42 0 0 0 20
2 55000 43 0 0 0 20
2 55000 44 0 0 0 19
2 55000 45 0 0 0 19
2 55000 46 0 0 0 18
2 55000 47 0 0 0 18
2 55000 48 0 0 0 18
2 55000 49 0 0 0 17
2 55000 50 0 0 0 17
2 55000 51 0 0 0 16
2 55000 52 0 0 0 16
2 55000 53 0 0 0 16
2 55000 54 0 0 0 16
2 55000 55 0 0 0 15
2 55000 56 0 0 0 15
2 55000 57 0 0 0 15
2 55000 58 0 0 0 14
2 55000 59 0 0 0 14
2 55000 60 0 0 0 14
2 55000 61 0 0 0 14
2 55000 62 0 0 0 14
2 55000 63 0 0 0 13
2 55000 64 0 0 0 13
2 55000 65 0 0 0 13
2 50000 1 142 0 142 840
2 50000 2 0 0 0 420
2 50000 3 0 0 0 280
2 50000 4 0 0 0 210
2 50000 5 0 0 0 168
2 50000 6 0 0 0 140
2 50000 7 0 0 0 120
2 50000 8 0 0 0 105
2 50000 9 0 0 0 93
2 50000 10 0 0 0 84
2 50000 11 0 0 0 76
2 50000 12 0 0 0 70
2 50000 13 0 0 0 65
2 50000 14 0 0 0 60
2 50000 15 0 0 0 56
2 50000 16 0 0 0 52
2 50000 17 0 0 0 49
2 50000 18 0 0 0 47
2 50000 19 0 0 0 44
2 50000 20 0 0 0 42
2 50000 21 0 0 0 40
2 50000 22 0 0 0 38
2 50000 23 0 0 0 37
2 50000 24 0 0 0 35
2 50000 25 0 0 0 34
2 50000 26 0 0 0 32
2 50000 27 0 0 0 31
2 50000 28 0 0 0 30
2 50000 29 0 0 0 29
2 50000 30 0 0 0 28
2 50000 31 0 0 0 27
2 50000 32 0 0 0 26
2 50000 33 0 0 0 25
2 50000 34 0 0 0 25
2 50000 35 0 0 0 24
2 50000 36 0 0 0 23
2 50000 37 0 0 0 23
2 50000 38 0 0 0 22
2 50000 39 0 0 0 22
2 50000 40 0 0 0 21
2 50000 41 0 0 0 20
2 50000 42 0 0 0 20
2 50000 43 0 0 0 20
2 50000 44 0 0 0 19
2 50000 45 0 0 0 19
2 50000 46 0 0 0 18
2 50000 47 0 0 0 18
2 50000 48 0 0 0 18
2 50000 49 0 0 0 17
2 50000 50 0 0 0 17
2 50000 51 0 0 0 16
2 50000 52 0 0 0 16
2 50000 53 0 0 0 16
2 50000 54 0 0 0 16
2 50000 55 0 0 0 15
2 50000 56 0 0 0 15
2 50000 57 0 0 0 15
2 50000 58 0 0 0 14
2 50000 59 0 0 0 14
2 50000 60 0 0 0 14
2 50000 61 0 0 0 14
2 50000 62 0 0 0 14
2 50000 63 0 0 0 13
2 50000 64 0 0 0 13
2 50000 65 0 0 0 13
2 45000 1 99 0 99 840
2 45000 2 466 0 466 420
2 45000 3 0 0 0 280
2 45000 4 0 0 0 210
2 45000 5 0 0 0 168
2 45000 6 0 0 0 140
2 45000 7 0 0 0 120
2 45000 8 0 0 0 105
2 45000 9 0 0 0 93
2 45000 10 0 0 0 84
2 45000 11 0 0 0 76
2 45000 12 0 0 0 70
2 45000 13 0 0 0 65
2 45000 14 0 0 0 60
2 45000 15 0 0 0 56
2 45000 16 0 0 0 52
2 45000 17 0 0 0 49
2 45000 18 0 0 0 47
2 45000 19 0 0 0 44
2 45000 20 0 0 0 42
2 45000 21 0 0 0 40
2 45000 22 0 0 0 38
2 45000 23 0 0 0 37
2 45000 24 0 0 0 35
2 45000 25 0 0 0 34
2 45000 26 0 0 0 32
2 45000 27 0 0 0 31
2 45000 28 0 0 0 30
2 45000 29 0 0 0 29
2 45000 30 0 0 0 28
2 45000 31 0 0 0 27
2 45000 32 0 0 0 26
2 45000 33 0 0 0 25
2 45000 34 0 0 0 25
2 45000 35 0 0 0 24
2 45000 36 0 0 0 23
2 45000 37 0 0 0 23
2 45000 38 0 0 0 22
2 45000 39 0 0 0 22
2 45000 40 0 0 0 21
2 45000 41 0 0 0 20
2 45000 42 0 0 0 20
2 45000 43 0 0 0 20
2 45000 44 0 0 0 19
2 45000 45 0 0 0 19
2 45000 46 0 0 0 18
2 45000 47 0 0 0 18
2 45000 48 0 0 0 18
2 45000 49 0 0 0 17
2 45000 50 0 0 0 17
2 45000 51 0 0 0 16
2 45000 52 0 0 0 16
2 45000 53 0 0 0 16
2 45000 54 0 0 0 16
2 45000 55 0 0 0 15
2 45000 56 0 0 0 15
2 45000 57 0 0 0 15
2 45000 58 0 0 0 14
2 45000 59 0 0 0 14
2 45000 60 0 0 0 14
2 45000 61 0 0 0 14
2 45000 62 0 0 0 14
2 45000 63 0 0 0 13
2 45000 64 0 0 0 13
2 45000 65 0 0 0 13
2 40000 1 55 0 55 840
2 40000 2 382 0 382 420
2 40000 3 0 0 0 280
2 40000 4 0 0 0 210
2 40000 5 0 0 0 168
2 40000 6 0 0 0 140
2 40000 7 0 0 0 120
2 40000 8 0 0 0 105
2 40000 9 0 0 0 93
2 40000 10 0 0 0 84
2 40000 11 0 0 0 76
2 40000 12 0 0 0 70
2 40000 13 0 0 0 65
2 40000 14 0 0 0 60
2 40000 15 0 0 0 56
2 40000 16 0 0 0 52
2 40000 17 0 0 0 49
2 40000 18 0 0 0 47
2 40000 19 0 0 0 44
2 40000 20 0 0 0 42
2 40000 21 0 0 0 40
2 40000 22 0 0 0 38
2 40000 23 0 0 0 37
2 40000 24 0 0 0 35
2 40000 25 0 0 0 34
2 40000 26 0 0 0 32
2 40000 27 0 0 0 31
2 40000 28 0 0 0 30
2 40000 29 0 0 0 29
2 40000 30 0 0 0 28
2 40000 31 0 0 0 27
2 40000 32 0 0 0 26
2 40000 33 0 0 0 25
2 40000 34 0 0 0 25
2 40000 35 0 0 0 24
2 40000 36 0 0 0 23
2 40000 37 0 0 0 23
2 40000 38 0 0 0 22
2 40000 39 0 0 0 22
2 40000 40 0 0 0 21
2 40000 41 0 0 0 20
2 40000 42 0 0 0 20
2 40000 43 0 0 0 20
2 40000 44 0 0 0 19
2 40000 45 0 0 0 19
2 40000 46 0 0 0 18
2 40000 47 0 0 0 18
2 40000 48 0 0 0 18
2 40000 49 0 0 0 17
2 40000 50 0 0 0 17
2 40000 51 0 0 0 16
2 40000 52 0 0 0 16
2 40000 53 0 0 0 16
2 40000 54 0 0 0 16
2 40000 55 0 0 0 15
2 40000 56 0 0 0 15
2 40000 57 0 0 0 15
2 40000 58 0 0 0 14
2 40000 59 0 0 0 14
2 40000 60 0 0 0 14
2 40000 61 0 0 0 14
2 40000 62 0 0 0 14
2 40000 63 0 0 0 13
2 40000 64 0 0 0 13
2 40000 65 0 0 0 13
2 35000 1 11 0 11 840
2 35000 2 299 0 299 420
2 35000 3 0 0 0 280
2 35000 4 0 0 0 210
2 35000 5 0 0 0 168
2 35000 6 0 0 0 140
2 35000 7 0 0 0 120
2 35000 8 0 0 0 105
2 35000 9 0 0 0 93
2 35000 10 0 0 0 84
2 35000 11 0 0 0 76
2 35000 12 0 0 0 70
2 35000 13 0 0 0 65
2 35000 14 0 0 0 60
2 35000 15 0 0 0 56
2 35000 16 0 0 0 52
2 35000 17 0 0 0 49
2 35000 18 0 0 0 47
2 35000 19 0 0 0 44
2 35000 20 0 0 0 42
2 35000 21 0 0 0 40
2 35000 22 0 0 0 38
2 35000 23 0 0 0 37
2 35000 24 0 0 0 35
2 35000 25 0 0 0 34
2 35000 26 0 0 0 32
2 35000 27 0 0 0 31
2 35000 28 0 0 0 30
2 35000 29 0 0 0 29
2 35000 30 0 0 0 28
2 35000 31 0 0 0 27
2 35000 32 0 0 0 26
2 35000 33 0 0 0 25
2 35000 34 0 0 0 25
2 35000 35 0 0 0 24
2 35000 36 0 0 0 23
2 35000 37 0 0 0 23
2 35000 38 0 0 0 22
2 35000 39 0 0 0 22
2 35000 40 0 0 0 21
2 35000 41 0 0 0 20
2 35000 42 0 0 0 20
2 35000 43 0 0 0 20
2 35000 44 0 0 0 19
2 35000 45 0 0 0 19
2 35000 46 0 0 0 18
2 35000 47 0 0 0 18
2 35000 48 0 0 0 18
2 35000 49 0 0 0 17
2 35000 50 0 0 0 17
2 35000 51 0 0 0 16
2 35000 52 0 0 0 16
2 35000 53 0 0 0 16
2 35000 54 0 0 0 16
2 35000 55 0 0 0 15
2 35000 56 0 0 0 15
2 35000 57 0 0 0 15
2 35000 58 0 0 0 14
2 35000 59 0 0 0 14
2 35000 60 0 0 0 14
2 35000 61 0 0 0 14
2 35000 62 0 0 0 14
2 35000 63 0 0 0 13
2 35000 64 0 0 0 13
2 35000 65 0 0 0 13
2 30000 1 -32 0 -32 840
2 30000 2 216 0 216 420
2 30000 3 440 0 440 280
2 30000 4 0 0 0 210
2 30000 5 0 0 0 168
2 30000 6 0 0 0 140
2 30000 7 0 0 0 120
2 30000 8 0 0 0 105
2 30000 9 0 0 0 93
2 30000 10 0 0 0 84
2 30000 11 0 0 0 76
2 30000 12 0 0 0 70
2 30000 13 0 0 0 65
2 30000 14 0 0 0 60
2 30000 15 0 0 0 56
2 30000 16 0 0 0 52
2 30000 17 0 0 0 49
2 30000 18 0 0 0 47
2 30000 19 0 0 0 44
2 30000 20 0 0 0 42
2 30000 21 0 0 0 40
2 30000 22 0 0 0 38
2 30000 23 0 0 0 37
2 30000 24 0 0 0 35
2 30000 25 0 0 0 34
2 30000 26 0 0 0 32
2 30000 27 0 0 0 31
2 30000 28 0 0 0 30
2 30000 29 0 0 0 29
2 30000 30 0 0 0 28
2 30000 31 0 0 0 27
2 30000 32 0 0 0 26
2 30000 33 0 0 0 25
2 30000 34 0 0 0 25
2 30000 35 0 0 0 24
2 30000 36 0 0 0 23
2 30000 37 0 0 0 23
2 30000 38 0 0 0 22
2 30000 39 0 0 0 22
2 30000 40 0 0 0 21
2 30000 41 0 0 0 20
2 30000 42 0 0 0 20
2 30000 43 0 0 0 20
2 30000 44 0 0 0 19
2 30000 45 0 0 0 19
2 30000 46 0 0 0 18
2 30000 47 0 0 0 18
2 30000 48 0 0 0 18
2 30000 49 0 0 0 17
2 30000 50 0 0 0 17
2 30000 51 0 0 0 16
2 30000 52 0 0 0 16
2 30000 53 0 0 0 16
2 30000 54 0 0 0 16
2 30000 55 0 0 0 15
2 30000 56 0 0 0 15
2 30000 57 0 0 0 15
2 30000 58 0 0 0 14
2 30000 59 0 0 0 14
2 30000 60 0 0 0 14
2 30000 61 0 0 0 14
2 30000 62 0 0 0 14
2 30000 63 0 0 0 13
2 30000 64 0 0 0 13
2 30000 65 0 0 0 13
2 25000 1 -76 0 -76 840
2 25000 2 132 0 133 420
2 25000 3 321 0 321 280
2 25000 4 492 0 492 210
2 25000 5 0 0 0 168
2 25000 6 0 0 0 140
2 25000 7 0 0 0 120
2 25000 8 0 0 0 105
2 25000 9 0 0 0 93
2 25000 10 0 0 0 84
2 25000 11 0 0 0 76
2 25000 12 0 0 0 70
2 25000 13 0 0 0 65
2 25000 14 0 0 0 60
2 25000 15 0 0 0 56
2 25000 16 0 0 0 52
2 25000 17 0 0 0 49
2 25000 18 0 0 0 47
2 25000 19 0 0 0 44
2 25000 20 0 0 0 42
2 25000 21 0 0 0 40
2 25000 22 0 0 0 38
2 25000 23 0 0 0 37
2 25000 24 0 0 0 35
2 25000 25 0 0 0 34
2 25000 26 0 0 0 32
2 25000 27 0 0 0 31
2 25000 28 0 0 0 30
2 25000 29 0 0 0 29
2 25000 30 0 0 0 28
2 25000 31 0 0 0 27
2 25000 32 0 0 0 26
2 25000 33 0 0 0 25
2 25000 34 0 0 0 25
2 25000 35 0 0 0 24
2 25000 36 0 0 0 23
2 25000 37 0 0 0 23
2 25000 38 0 0 0 22
2 25000 39 0 0 0 22
2 25000 40 0 0 0 21
2 25000 41 0 0 0 20
2 25000 42 0 0 0 20
2 25000 43 0 0 0 20
2 25000 44 0 0 0 19
2 25000 45 0 0 0 19
2 25000 46 0 0 0 18
2 25000 47 0 0 0 18
2 25000 48 0 0 0 18
2 25000 49 0 0 0 17
2 25000 50 0 0 0 17
2 25000 51 0 0 0 16
2 25000 52 0 0 0 16
2 25000 53 0 0 0 16
2 25000 54 0 0 0 16
2 25000 55 0 0 0 15
2 25000 56 0 0 0 15
2 25000 57 0 0 0 15
2 25000 58 0 0 0 14
2 25000 59 0 0 0 14
2 25000 60 0 0 0 14
2 25000 61 0 0 0 14
2 25000 62 0 0 0 14
2 25000 63 0 0 0 13
2 25000 64 0 0 0 13
2 25000 65 0 0 0 13
2 20000 1 -119 0 -119 840
2 20000 2 49 0 49 420
2 20000 3 202 0 202 280
2 20000 4 340 0 340 210
2 20000 5 467 0 467 168
2 20000 6 0 0 0 140
2 20000 7 0 0 0 120
2 20000 8 0 0 0 105
2 20000 9 0 0 0 93
2 20000 10 0 0 0 84
2 20000 11 0 0 0 76
2 20000 12 0 0 0 70
2 20000 13 0 0 0 65
2 20000 14 0 0 0 60
2 20000 15 0 0 0 56
2 20000 16 0 0 0 52
2 20000 17 0 0 0 49
2 20000 18 0 0 0 47
2 20000 19 0 0 0 44
2 20000 20 0 0 0 42
2 20000 21 0 0 0 40
2 20000 22 0 0 0 38
2 20000 23 0 0 0 37
2 20000 24 0 0 0 35
2 20000 25 0 0 0 34
2 20000 26 0 0 0 32
2 20000 27 0 0 0 31
2 20000 28 0 0 0 30
2 20000 29 0 0 0 29
2 20000 30 0 0 0 28
2 20000 31 0 0 0 27
2 20000 32 0 0 0 26
2 20000 33 0 0 0 25
2 20000 34 0 0 0 25
2 20000 35 0 0 0 24
2 20000 36 0 0 0 23
2 20000 37 0 0 0 23
2 20000 38 0 0 0 22
2 20000 39 0 0 0 22
2 20000 40 0 0 0 21
2 20000 41 0 0 0 20
2 20000 42 0 0 0 20
2 20000 43 0 0 0 20
2 20000 44 0 0 0 19
2 20000 45 0 0 0 19
2 20000 46 0 0 0 18
2 20000 47 0 0 0 18
2 20000 48 0 0 0 18
2 20000 49 0 0 0 17
2 20000 50 0 0 0 17
2 20000 51 0 0 0 16
2 20000 52 0 0 0 16
2 20000 53 0 0 0 16
2 20000 54 0 0 0 16
2 20000 55 0 0 0 15
2 20000 56 0 0 0 15
2 20000 57 0 0 0 15
2 20000 58 0 0 0 14
2 20000 59 0 0 0 14
2 20000 60 0 0 0 14
2 20000 61 0 0 0 14
2 20000 62 0 0 0 14
2 20000 63 0 0 0 13
2 20000 64 0 0 0 13
2 20000 65 0 0 0 13
2 15000 1 -163 0 -163 840
2 15000 2 -34 0 -34 420
2 15000 3 83 0 83 280
2 15000 4 189 0 189 210
2 15000 5 286 0 286 168
2 15000 6 375 0 375 140
2 15000 7 456 0 456 120
2 15000 8 0 0 0 105
2 15000 9 0 0 0 93
2 15000 10 0 0 0 84
2 15000 11 0 0 0 76
2 15000 12 0 0 0 70
2 15000 13 0 0 0 65
2 15000 14 0 0 0 60
2 15000 15 0 0 0 56
2 15000 16 0 0 0 52
2 15000 17 0 0 0 49
2 15000 18 0 0 0 47
2 15000 19 0 0 0 44
2 15000 20 0 0 0 42
2 15000 21 0 0 0 40
2 15000 22 0 0 0 38
2 15000 23 0 0 0 37
2 15000 24 0 0 0 35
2 15000 25 0 0 0 34
2 15000 26 0 0 0 32
2 15000 27 0 0 0 31
2 15000 28 0 0 0 30
2 15000 29 0 0 0 29
2 15000 30 0 0 0 28
2 15000 31 0 0 0 27
2 15000 32 0 0 0 26
2 15000 33 0 0 0 25
2 15000 34 0 0 0 25
2 15000 35 0 0 0 24
2 15000 36 0 0 0 23
2 15000 37 0 0 0 23
2 15000 38 0 0 0 22
2 15000 39 0 0 0 22
2 15000 40 0 0 0 21
2 15000 41 0 0 0 20
2 15000 42 0 0 0 20
2 15000 43 0 0 0 20
2 15000 44 0 0 0 19
2 15000 45 0 0 0 19
2 15000 46 0 0 0 18
2 15000 47 0 0 0 18
2 15000 48 0 0 0 18
2 15000 49 0 0 0 17
2 15000 50 0 0 0 17
2 15000 51 0 0 0 16
2 15000 52 0 0 0 16
2 15000 53 0 0 0 16
2 15000 54 0 0 0 16
2 15000 55 0 0 0 15
2 15000 56 0 0 0 15
2 15000 57 0 0 0 15
2 15000 58 0 0 0 14
2 15000 59 0 0 0 14
2 15000 60 0 0 0 14
2 15000 61 0 0 0 14
2 15000 62 0 0 0 14
2 15000 63 0 0 0 13
2 15000 64 0 0 0 13
2 15000 65 0 0 0 13
2 10000 1 -207 0 -207 840
2 10000 2 -117 0 -117 420
2 10000 3 -37 0 -37 280
2 10000 4 37 0 37 210
2 10000 5 105 0 105 168
2 10000 6 167 0 167 140
2 10000 7 224 0 224 120
2 10000 8 276 0 276 105
2 10000 9 324 0 324 93
2 10000 10 367 0 367 84
2 10000 11 406 0 407 76
2 10000 12 442 0 442 70
2 10000 13 474 1 475 65
2 10000 14 0 0 0 60
2 10000 15 0 0 0 56
2 10000 16 0 0 0 52
2 10000 17 0 0 0 49
2 10000 18 0 0 0 47
2 10000 19 0 0 0 44
2 10000 20 0 0 0 42
2 10000 21 0 0 0 40
2 10000 22 0 0 0 38
2 10000 23 0 0 0 37
2 10000 24 0 0 0 35
2 10000 25 0 0 0 34
2 10000 26 0 0 0 32
2 10000 27 0 0 0 31
2 10000 28 0 0 0 30
2 10000 29 0 0 0 29
2 10000 30 0 0 0 28
2 10000 31 0 0 0 27
2 10000 32 0 0 0 26
2 10000 33 0 0 0 25
2 10000 34 0 0 0 25
2 10000 35 0 0 0 24
2 10000 36 0 0 0 23
2 10000 37 0 0 0 23
2 10000 38 0 0 0 22
2 10000 39 0 0 0 22
2 10000 40 0 0 0 21
2 10000 41 0 0 0 20
2 10000 42 0 0 0 20
2 10000 43 0 0 0 20
2 10000 44 0 0 0 19
2 10000 45 0 0 0 19
2 10000 46 0 0 0 18
2 10000 47 0 0 0 18
2 10000 48 0 0 0 18
2 10000 49 0 0 0 17
2 10000 50 0 0 0 17
2 10000 51 0 0 0 16
2 10000 52 0 0 0 16
2 10000 53 0 0 0 16
2 10000 54 0 0 0 16
2 10000 55 0 0 0 15
2 10000 56 0 0 0 15
2 10000 57 0 0 0 15
2 10000 58 0 0 0 14
2 10000 59 0 0 0 14
2 10000 60 0 0 0 14
2 10000 61 0 0 0 14
2 10000 62 0 0 0 14
2 10000 63 0 0 0 13
2 10000 64 0 0 0 13
2 10000 65 0 0 0 13
2 5000 1 -250 0 -250 840
2 5000 2 -201 0 -201 420
2 5000 3 -156 0 -156 280
2 5000 4 -114 0 -114 210
2 5000 5 -76 0 -76 168
2 5000 6 -41 0 -41 140
2 5000 7 -8 0 -8 120
2 5000 8 23 0 23 105
2 5000 9 51 0 51 93
2 5000 10 77 0 77 84
2 5000 11 101 0 101 76
2 5000 12 123 0 123 70
2 5000 13 143 0 143 65
2 5000 14 161 0 161 60
2 5000 15 178 0 178 56
2 5000 16 193 0 194 52
2 5000 17 208 0 208 49
2 5000 18 221 1 221 47
2 5000 19 232 1 233 44
2 5000 20 243 1 244 42
2 5000 21 253 1 254 40
2 5000 22 263 1 263 38
2 5000 23 271 1 272 37
2 5000 24 279 1 280 35
2 5000 25 286 1 287 34
2 5000 26 293 1 294 32
2 5000 27 299 1 300 31
2 5000 28 305 1 306 30
2 5000 29 310 1 311 29
2 5000 30 315 1 316 28
2 5000 31 319 1 320 27
2 5000 32 323 2 324 26
2 5000 33 326 2 328 25
2 5000 34 330 2 332 25
2 5000 35 333 2 335 24
2 5000 36 335 2 338 23
2 5000 37 338 2 340 23
2 5000 38 340 2 342 22
2 5000 39 342 2 344 22
2 5000 40 344 2 346 21
2 5000 41 345 3 348 20
2 5000 42 347 3 349 20
2 5000 43 348 3 351 20
2 5000 44 349 3 352 19
2 5000 45 349 3 353 19
2 5000 46 350 3 353 18
2 5000 47 350 3 354 18
2 5000 48 351 4 354 18
2 5000 49 351 4 355 17
2 5000 50 351 4 355 17
2 5000 51 351 4 355 16
2 5000 52 350 4 355 16
2 5000 53 350 4 354 16
2 5000 54 349 5 354 16
2 5000 55 349 5 354 15
2 5000 56 348 5 353 15
2 5000 57 347 5 352 15
2 5000 58 346 5 351 14
2 5000 59 345 5 351 14
2 5000 60 344 6 350 14
2 5000 61 343 6 348 14
2 5000 62 341 6 347 14
2 5000 63 340 6 346 13
2 5000 64 338 6 345 13
2 5000 65 337 7 343 13
2 0 1 -294 0 -294 840
2 0 2 -284 0 -284 420
2 0 3 -275 0 -275 280
2 0 4 -266 0 -266 210
2 0 5 -257 0 -257 168
2 0 6 -249 0 -249 140
2 0 7 -240 0 -240 120
2 0 8 -231 0 -231 105
2 0 9 -222 0 -222 93
2 0 10 -213 0 -213 84
2 0 11 -205 0 -205 76
2 0 12 -197 0 -197 70
2 0 13 -189 0 -189 65
2 0 14 -182 0 -182 60
2 0 15 -175 0 -175 56
2 0 16 -168 0 -168 52
2 0 17 -162 0 -162 49
2 0 18 -157 0 -157 47
2 0 19 -152 0 -152 44
2 0 20 -147 0 -147 42
2 0 21 -142 0 -142 40
2 0 22 -138 0 -138 38
2 0 23 -134 0 -134 37
2 0 24 -131 0 -131 35
2 0 25 -127 0 -127 34
2 0 26 -124 0 -124 32
2 0 27 -121 0 -121 31
2 0 28 -119 0 -119 30
2 0 29 -116 0 -116 29
2 0 30 -114 0 -114 28
2 0 31 -112 0 -112 27
2 0 32 -111 0 -111 26
2 0 33 -109 0 -109 25
2 0 34 -108 0 -108 25
2 0 35 -107 0 -107 24
2 0 36 -106 0 -106 23
2 0 37 -105 0 -105 23
2 0 38 -104 0 -104 22
2 0 39 -103 0 -103 22
2 0 40 -103 0 -103 21
2 0 41 -103 0 -103 20
2 0 42 -102 0 -102 20
2 0 43 -102 0 -102 20
2 0 44 -102 0 -102 19
2 0 45 -103 0 -103 19
2 0 46 -103 0 -103 18
2 0 47 -103 0 -103 18
2 0 48 -104 0 -104 18
2 0 49 -104 0 -104 17
2 0 50 -105 0 -105 17
2 0 51 -106 0 -106 16
2 0 52 -107 0 -107 16
2 0 53 -108 0 -108 16
2 0 54 -109 0 -109 16
2 0 55 -110 0 -110 15
2 0 56 -111 0 -111 15
2 0 57 -113 0 -113 15
2 0 58 -114 0 -114 14
2 0 59 -116 0 -116 14
2 0 60 -117 0 -117 14
2 0 61 -119 0 -119 14
2 0 62 -121 0 -121 14
2 0 63 -123 0 -123 13
2 0 64 -125 0 -125 13
2 0 65 -126 0 -126 13
下面是我正在寻找的输出。特别注意从 MaxWeight 的 15,000 到 0。
{'Max_Weight'} {'Max_Speed'} {'T_Desc'} {'T_Emerg'} {'T_Final'} {'Time'}
{[ 80000]} {[ 1]} {[ 404]} {[ 0]} {[ 404]} {[ 840]}
{[ 75000]} {[ 1]} {[ 361]} {[ 0]} {[ 361]} {[ 840]}
{[ 70000]} {[ 1]} {[ 317]} {[ 0]} {[ 317]} {[ 840]}
{[ 65000]} {[ 1]} {[ 273]} {[ 0]} {[ 273]} {[ 840]}
{[ 60000]} {[ 1]} {[ 230]} {[ 0]} {[ 230]} {[ 840]}
{[ 55000]} {[ 1]} {[ 186]} {[ 0]} {[ 186]} {[ 840]}
{[ 50000]} {[ 1]} {[ 142]} {[ 0]} {[ 142]} {[ 840]}
{[ 45000]} {[ 2]} {[ 466]} {[ 0]} {[ 466]} {[ 420]}
{[ 40000]} {[ 2]} {[ 382]} {[ 0]} {[ 382]} {[ 420]}
{[ 35000]} {[ 2]} {[ 299]} {[ 0]} {[ 299]} {[ 420]}
{[ 30000]} {[ 3]} {[ 440]} {[ 0]} {[ 440]} {[ 280]}
{[ 25000]} {[ 4]} {[ 492]} {[ 0]} {[ 492]} {[ 210]}
{[ 20000]} {[ 5]} {[ 467]} {[ 0]} {[ 467]} {[ 168]}
{[ 15000]} {[ 7]} {[ 456]} {[ 0]} {[ 456]} {[ 120]}
{[ 10000]} {[ 13]} {[ 474]} {[ 1]} {[ 475]} {[ 65]}
{[ 5000]} {[ 65]} {[ 337]} {[ 7]} {[ 343]} {[ 13]}
目前还没有足够的信息来提供完整的解决方案。我们仍然缺少用于 ListBox 中对象的类型,也不知道“打印出来”的确切含义。但我仍然可以帮助一些人,方法是使用一个名为 LineItem
的假类型,其中 属性 匹配示例中显示的每个字段(删除空格以符合语法)。
listBox1.SelectionMode = SelectionMode.MultiExtended
listBox1.SelectedItems.Clear()
Dim weightGroups = listBox1.Items.Cast(Of LineItem)().
GroupBy(Function(i) i.MaxWeight, Function(i) i)
Dim MaxPerWeight = weightGroups.Select(Function(g) g.OrderBy(Function(i) -1*i.T_desc).First())
For Each item As LineItem in MaxPerWeight
listBox1.SelectedItems.Add(item)
Next
根据您的所有回答,尝试以下类似的方法。它将字符串数据解析为 DataValue 实例(代码假设值之间有空格 and/or 制表符),然后使用 LINQ 查询为每个“MaxWeight”组获取最大的“T_Desc”,并重新填充 ListBox新数据。该代码假定 ListBox 中的第一行是 header 行,并保持不变:
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim header As String = lstOutput.Items(0)
Dim data As New List(Of DataValue)
' Skip the header row by starting at 1:
For i As Integer = 1 To lstOutput.Items.Count - 1
data.Add(New DataValue(lstOutput.Items(i)))
Next
Dim results = From dv In data
Order By dv.MaxWeight Descending, dv.T_Desc Descending
Group dv By dv.MaxWeight Into g = Group
Select g.First
lstOutput.Items.Clear()
lstOutput.Items.Add(header)
For Each row In results
lstOutput.Items.Add(row.ToString)
Next
End Sub
End Class
Public Class DataValue
Public Sub New(ByVal strInput As String)
Dim values() As String = strInput.Split({" ", vbTab}, StringSplitOptions.RemoveEmptyEntries)
If values.Length >= 6 Then
Try
MaxWeight = Integer.Parse(values(0))
MaxSpeed = Integer.Parse(values(1))
Time = Integer.Parse(values(2))
T_Emerg = Integer.Parse(values(3))
T_Final = Integer.Parse(values(4))
T_Desc = Integer.Parse(values(5))
Catch ex As Exception
MessageBox.Show("Invalid Input: Value failed to convert to Integer.")
End Try
Else
MessageBox.Show("Invalid Input: Not enough values.")
End If
End Sub
Public Overrides Function ToString() As String
Return MaxWeight & vbTab & MaxSpeed & vbTab & Time & vbTab & T_Emerg & vbTab & T_Final & vbTab & T_Desc
End Function
Public MaxWeight As Integer
Public MaxSpeed As Integer
Public Time As Integer
Public T_Emerg As Integer
Public T_Final As Integer
Public T_Desc As Integer
End Class
不确定您的数据来自何处...您可以直接从数据创建 DataValue 实例,然后将这些实例添加到 ListBox,而不是在字符串之间来回转换。
来自评论:
I would like to compare the final output with the value of a variable
and remove items from the listbox/stop adding items as soon as
MaxSpeed equals the value of this variable. Thus in the animation you
put up, assuming the value of this variable = 127, the final output
would leave just the first row with a Maxweight = 80000.
您可以将输出部分更改为以下内容:
Dim target As Integer = 127
lstOutput.Items.Clear()
lstOutput.Items.Add(header)
For Each row In results
lstOutput.Items.Add(row.ToString)
If row.MaxSpeed = target Then
Exit For
End If
Next
我在 Visual Basic 2010 中有一个列表框。总而言之,我想遍历每一行,对于每个 MaxWeight 类别,遍历 Maxspeed 值并打印出最高 T_final 值,同时在该特定最大重量下最大化 MaxSpeed。
因此 1) 对于每个权重类别 2) 降序排列 T_final 3) Select 最高 T_final 值对应于最高可能的 Maxspeed 值。
下面是原始数据;
Group Max Weight Max Speed T_Desc T_Emerg T_Final Time 2 80000 1 404 0 404 840 2 80000 2 0 0 0 420 2 80000 3 0 0 0 280 2 80000 4 0 0 0 210 2 80000 5 0 0 0 168 2 80000 6 0 0 0 140 2 80000 7 0 0 0 120 2 80000 8 0 0 0 105 2 80000 9 0 0 0 93 2 80000 10 0 0 0 84 2 80000 11 0 0 0 76 2 80000 12 0 0 0 70 2 80000 13 0 0 0 65 2 80000 14 0 0 0 60 2 80000 15 0 0 0 56 2 80000 16 0 0 0 52 2 80000 17 0 0 0 49 2 80000 18 0 0 0 47 2 80000 19 0 0 0 44 2 80000 20 0 0 0 42 2 80000 21 0 0 0 40 2 80000 22 0 0 0 38 2 80000 23 0 0 0 37 2 80000 24 0 0 0 35 2 80000 25 0 0 0 34 2 80000 26 0 0 0 32 2 80000 27 0 0 0 31 2 80000 28 0 0 0 30 2 80000 29 0 0 0 29 2 80000 30 0 0 0 28 2 80000 31 0 0 0 27 2 80000 32 0 0 0 26 2 80000 33 0 0 0 25 2 80000 34 0 0 0 25 2 80000 35 0 0 0 24 2 80000 36 0 0 0 23 2 80000 37 0 0 0 23 2 80000 38 0 0 0 22 2 80000 39 0 0 0 22 2 80000 40 0 0 0 21 2 80000 41 0 0 0 20 2 80000 42 0 0 0 20 2 80000 43 0 0 0 20 2 80000 44 0 0 0 19 2 80000 45 0 0 0 19 2 80000 46 0 0 0 18 2 80000 47 0 0 0 18 2 80000 48 0 0 0 18 2 80000 49 0 0 0 17 2 80000 50 0 0 0 17 2 80000 51 0 0 0 16 2 80000 52 0 0 0 16 2 80000 53 0 0 0 16 2 80000 54 0 0 0 16 2 80000 55 0 0 0 15 2 80000 56 0 0 0 15 2 80000 57 0 0 0 15 2 80000 58 0 0 0 14 2 80000 59 0 0 0 14 2 80000 60 0 0 0 14 2 80000 61 0 0 0 14 2 80000 62 0 0 0 14 2 80000 63 0 0 0 13 2 80000 64 0 0 0 13 2 80000 65 0 0 0 13 2 75000 1 361 0 361 840 2 75000 2 0 0 0 420 2 75000 3 0 0 0 280 2 75000 4 0 0 0 210 2 75000 5 0 0 0 168 2 75000 6 0 0 0 140 2 75000 7 0 0 0 120 2 75000 8 0 0 0 105 2 75000 9 0 0 0 93 2 75000 10 0 0 0 84 2 75000 11 0 0 0 76 2 75000 12 0 0 0 70 2 75000 13 0 0 0 65 2 75000 14 0 0 0 60 2 75000 15 0 0 0 56 2 75000 16 0 0 0 52 2 75000 17 0 0 0 49 2 75000 18 0 0 0 47 2 75000 19 0 0 0 44 2 75000 20 0 0 0 42 2 75000 21 0 0 0 40 2 75000 22 0 0 0 38 2 75000 23 0 0 0 37 2 75000 24 0 0 0 35 2 75000 25 0 0 0 34 2 75000 26 0 0 0 32 2 75000 27 0 0 0 31 2 75000 28 0 0 0 30 2 75000 29 0 0 0 29 2 75000 30 0 0 0 28 2 75000 31 0 0 0 27 2 75000 32 0 0 0 26 2 75000 33 0 0 0 25 2 75000 34 0 0 0 25 2 75000 35 0 0 0 24 2 75000 36 0 0 0 23 2 75000 37 0 0 0 23 2 75000 38 0 0 0 22 2 75000 39 0 0 0 22 2 75000 40 0 0 0 21 2 75000 41 0 0 0 20 2 75000 42 0 0 0 20 2 75000 43 0 0 0 20 2 75000 44 0 0 0 19 2 75000 45 0 0 0 19 2 75000 46 0 0 0 18 2 75000 47 0 0 0 18 2 75000 48 0 0 0 18 2 75000 49 0 0 0 17 2 75000 50 0 0 0 17 2 75000 51 0 0 0 16 2 75000 52 0 0 0 16 2 75000 53 0 0 0 16 2 75000 54 0 0 0 16 2 75000 55 0 0 0 15 2 75000 56 0 0 0 15 2 75000 57 0 0 0 15 2 75000 58 0 0 0 14 2 75000 59 0 0 0 14 2 75000 60 0 0 0 14 2 75000 61 0 0 0 14 2 75000 62 0 0 0 14 2 75000 63 0 0 0 13 2 75000 64 0 0 0 13 2 75000 65 0 0 0 13 2 70000 1 317 0 317 840 2 70000 2 0 0 0 420 2 70000 3 0 0 0 280 2 70000 4 0 0 0 210 2 70000 5 0 0 0 168 2 70000 6 0 0 0 140 2 70000 7 0 0 0 120 2 70000 8 0 0 0 105 2 70000 9 0 0 0 93 2 70000 10 0 0 0 84 2 70000 11 0 0 0 76 2 70000 12 0 0 0 70 2 70000 13 0 0 0 65 2 70000 14 0 0 0 60 2 70000 15 0 0 0 56 2 70000 16 0 0 0 52 2 70000 17 0 0 0 49 2 70000 18 0 0 0 47 2 70000 19 0 0 0 44 2 70000 20 0 0 0 42 2 70000 21 0 0 0 40 2 70000 22 0 0 0 38 2 70000 23 0 0 0 37 2 70000 24 0 0 0 35 2 70000 25 0 0 0 34 2 70000 26 0 0 0 32 2 70000 27 0 0 0 31 2 70000 28 0 0 0 30 2 70000 29 0 0 0 29 2 70000 30 0 0 0 28 2 70000 31 0 0 0 27 2 70000 32 0 0 0 26 2 70000 33 0 0 0 25 2 70000 34 0 0 0 25 2 70000 35 0 0 0 24 2 70000 36 0 0 0 23 2 70000 37 0 0 0 23 2 70000 38 0 0 0 22 2 70000 39 0 0 0 22 2 70000 40 0 0 0 21 2 70000 41 0 0 0 20 2 70000 42 0 0 0 20 2 70000 43 0 0 0 20 2 70000 44 0 0 0 19 2 70000 45 0 0 0 19 2 70000 46 0 0 0 18 2 70000 47 0 0 0 18 2 70000 48 0 0 0 18 2 70000 49 0 0 0 17 2 70000 50 0 0 0 17 2 70000 51 0 0 0 16 2 70000 52 0 0 0 16 2 70000 53 0 0 0 16 2 70000 54 0 0 0 16 2 70000 55 0 0 0 15 2 70000 56 0 0 0 15 2 70000 57 0 0 0 15 2 70000 58 0 0 0 14 2 70000 59 0 0 0 14 2 70000 60 0 0 0 14 2 70000 61 0 0 0 14 2 70000 62 0 0 0 14 2 70000 63 0 0 0 13 2 70000 64 0 0 0 13 2 70000 65 0 0 0 13 2 65000 1 273 0 273 840 2 65000 2 0 0 0 420 2 65000 3 0 0 0 280 2 65000 4 0 0 0 210 2 65000 5 0 0 0 168 2 65000 6 0 0 0 140 2 65000 7 0 0 0 120 2 65000 8 0 0 0 105 2 65000 9 0 0 0 93 2 65000 10 0 0 0 84 2 65000 11 0 0 0 76 2 65000 12 0 0 0 70 2 65000 13 0 0 0 65 2 65000 14 0 0 0 60 2 65000 15 0 0 0 56 2 65000 16 0 0 0 52 2 65000 17 0 0 0 49 2 65000 18 0 0 0 47 2 65000 19 0 0 0 44 2 65000 20 0 0 0 42 2 65000 21 0 0 0 40 2 65000 22 0 0 0 38 2 65000 23 0 0 0 37 2 65000 24 0 0 0 35 2 65000 25 0 0 0 34 2 65000 26 0 0 0 32 2 65000 27 0 0 0 31 2 65000 28 0 0 0 30 2 65000 29 0 0 0 29 2 65000 30 0 0 0 28 2 65000 31 0 0 0 27 2 65000 32 0 0 0 26 2 65000 33 0 0 0 25 2 65000 34 0 0 0 25 2 65000 35 0 0 0 24 2 65000 36 0 0 0 23 2 65000 37 0 0 0 23 2 65000 38 0 0 0 22 2 65000 39 0 0 0 22 2 65000 40 0 0 0 21 2 65000 41 0 0 0 20 2 65000 42 0 0 0 20 2 65000 43 0 0 0 20 2 65000 44 0 0 0 19 2 65000 45 0 0 0 19 2 65000 46 0 0 0 18 2 65000 47 0 0 0 18 2 65000 48 0 0 0 18 2 65000 49 0 0 0 17 2 65000 50 0 0 0 17 2 65000 51 0 0 0 16 2 65000 52 0 0 0 16 2 65000 53 0 0 0 16 2 65000 54 0 0 0 16 2 65000 55 0 0 0 15 2 65000 56 0 0 0 15 2 65000 57 0 0 0 15 2 65000 58 0 0 0 14 2 65000 59 0 0 0 14 2 65000 60 0 0 0 14 2 65000 61 0 0 0 14 2 65000 62 0 0 0 14 2 65000 63 0 0 0 13 2 65000 64 0 0 0 13 2 65000 65 0 0 0 13 2 60000 1 230 0 230 840 2 60000 2 0 0 0 420 2 60000 3 0 0 0 280 2 60000 4 0 0 0 210 2 60000 5 0 0 0 168 2 60000 6 0 0 0 140 2 60000 7 0 0 0 120 2 60000 8 0 0 0 105 2 60000 9 0 0 0 93 2 60000 10 0 0 0 84 2 60000 11 0 0 0 76 2 60000 12 0 0 0 70 2 60000 13 0 0 0 65 2 60000 14 0 0 0 60 2 60000 15 0 0 0 56 2 60000 16 0 0 0 52 2 60000 17 0 0 0 49 2 60000 18 0 0 0 47 2 60000 19 0 0 0 44 2 60000 20 0 0 0 42 2 60000 21 0 0 0 40 2 60000 22 0 0 0 38 2 60000 23 0 0 0 37 2 60000 24 0 0 0 35 2 60000 25 0 0 0 34 2 60000 26 0 0 0 32 2 60000 27 0 0 0 31 2 60000 28 0 0 0 30 2 60000 29 0 0 0 29 2 60000 30 0 0 0 28 2 60000 31 0 0 0 27 2 60000 32 0 0 0 26 2 60000 33 0 0 0 25 2 60000 34 0 0 0 25 2 60000 35 0 0 0 24 2 60000 36 0 0 0 23 2 60000 37 0 0 0 23 2 60000 38 0 0 0 22 2 60000 39 0 0 0 22 2 60000 40 0 0 0 21 2 60000 41 0 0 0 20 2 60000 42 0 0 0 20 2 60000 43 0 0 0 20 2 60000 44 0 0 0 19 2 60000 45 0 0 0 19 2 60000 46 0 0 0 18 2 60000 47 0 0 0 18 2 60000 48 0 0 0 18 2 60000 49 0 0 0 17 2 60000 50 0 0 0 17 2 60000 51 0 0 0 16 2 60000 52 0 0 0 16 2 60000 53 0 0 0 16 2 60000 54 0 0 0 16 2 60000 55 0 0 0 15 2 60000 56 0 0 0 15 2 60000 57 0 0 0 15 2 60000 58 0 0 0 14 2 60000 59 0 0 0 14 2 60000 60 0 0 0 14 2 60000 61 0 0 0 14 2 60000 62 0 0 0 14 2 60000 63 0 0 0 13 2 60000 64 0 0 0 13 2 60000 65 0 0 0 13 2 55000 1 186 0 186 840 2 55000 2 0 0 0 420 2 55000 3 0 0 0 280 2 55000 4 0 0 0 210 2 55000 5 0 0 0 168 2 55000 6 0 0 0 140 2 55000 7 0 0 0 120 2 55000 8 0 0 0 105 2 55000 9 0 0 0 93 2 55000 10 0 0 0 84 2 55000 11 0 0 0 76 2 55000 12 0 0 0 70 2 55000 13 0 0 0 65 2 55000 14 0 0 0 60 2 55000 15 0 0 0 56 2 55000 16 0 0 0 52 2 55000 17 0 0 0 49 2 55000 18 0 0 0 47 2 55000 19 0 0 0 44 2 55000 20 0 0 0 42 2 55000 21 0 0 0 40 2 55000 22 0 0 0 38 2 55000 23 0 0 0 37 2 55000 24 0 0 0 35 2 55000 25 0 0 0 34 2 55000 26 0 0 0 32 2 55000 27 0 0 0 31 2 55000 28 0 0 0 30 2 55000 29 0 0 0 29 2 55000 30 0 0 0 28 2 55000 31 0 0 0 27 2 55000 32 0 0 0 26 2 55000 33 0 0 0 25 2 55000 34 0 0 0 25 2 55000 35 0 0 0 24 2 55000 36 0 0 0 23 2 55000 37 0 0 0 23 2 55000 38 0 0 0 22 2 55000 39 0 0 0 22 2 55000 40 0 0 0 21 2 55000 41 0 0 0 20 2 55000 42 0 0 0 20 2 55000 43 0 0 0 20 2 55000 44 0 0 0 19 2 55000 45 0 0 0 19 2 55000 46 0 0 0 18 2 55000 47 0 0 0 18 2 55000 48 0 0 0 18 2 55000 49 0 0 0 17 2 55000 50 0 0 0 17 2 55000 51 0 0 0 16 2 55000 52 0 0 0 16 2 55000 53 0 0 0 16 2 55000 54 0 0 0 16 2 55000 55 0 0 0 15 2 55000 56 0 0 0 15 2 55000 57 0 0 0 15 2 55000 58 0 0 0 14 2 55000 59 0 0 0 14 2 55000 60 0 0 0 14 2 55000 61 0 0 0 14 2 55000 62 0 0 0 14 2 55000 63 0 0 0 13 2 55000 64 0 0 0 13 2 55000 65 0 0 0 13 2 50000 1 142 0 142 840 2 50000 2 0 0 0 420 2 50000 3 0 0 0 280 2 50000 4 0 0 0 210 2 50000 5 0 0 0 168 2 50000 6 0 0 0 140 2 50000 7 0 0 0 120 2 50000 8 0 0 0 105 2 50000 9 0 0 0 93 2 50000 10 0 0 0 84 2 50000 11 0 0 0 76 2 50000 12 0 0 0 70 2 50000 13 0 0 0 65 2 50000 14 0 0 0 60 2 50000 15 0 0 0 56 2 50000 16 0 0 0 52 2 50000 17 0 0 0 49 2 50000 18 0 0 0 47 2 50000 19 0 0 0 44 2 50000 20 0 0 0 42 2 50000 21 0 0 0 40 2 50000 22 0 0 0 38 2 50000 23 0 0 0 37 2 50000 24 0 0 0 35 2 50000 25 0 0 0 34 2 50000 26 0 0 0 32 2 50000 27 0 0 0 31 2 50000 28 0 0 0 30 2 50000 29 0 0 0 29 2 50000 30 0 0 0 28 2 50000 31 0 0 0 27 2 50000 32 0 0 0 26 2 50000 33 0 0 0 25 2 50000 34 0 0 0 25 2 50000 35 0 0 0 24 2 50000 36 0 0 0 23 2 50000 37 0 0 0 23 2 50000 38 0 0 0 22 2 50000 39 0 0 0 22 2 50000 40 0 0 0 21 2 50000 41 0 0 0 20 2 50000 42 0 0 0 20 2 50000 43 0 0 0 20 2 50000 44 0 0 0 19 2 50000 45 0 0 0 19 2 50000 46 0 0 0 18 2 50000 47 0 0 0 18 2 50000 48 0 0 0 18 2 50000 49 0 0 0 17 2 50000 50 0 0 0 17 2 50000 51 0 0 0 16 2 50000 52 0 0 0 16 2 50000 53 0 0 0 16 2 50000 54 0 0 0 16 2 50000 55 0 0 0 15 2 50000 56 0 0 0 15 2 50000 57 0 0 0 15 2 50000 58 0 0 0 14 2 50000 59 0 0 0 14 2 50000 60 0 0 0 14 2 50000 61 0 0 0 14 2 50000 62 0 0 0 14 2 50000 63 0 0 0 13 2 50000 64 0 0 0 13 2 50000 65 0 0 0 13 2 45000 1 99 0 99 840 2 45000 2 466 0 466 420 2 45000 3 0 0 0 280 2 45000 4 0 0 0 210 2 45000 5 0 0 0 168 2 45000 6 0 0 0 140 2 45000 7 0 0 0 120 2 45000 8 0 0 0 105 2 45000 9 0 0 0 93 2 45000 10 0 0 0 84 2 45000 11 0 0 0 76 2 45000 12 0 0 0 70 2 45000 13 0 0 0 65 2 45000 14 0 0 0 60 2 45000 15 0 0 0 56 2 45000 16 0 0 0 52 2 45000 17 0 0 0 49 2 45000 18 0 0 0 47 2 45000 19 0 0 0 44 2 45000 20 0 0 0 42 2 45000 21 0 0 0 40 2 45000 22 0 0 0 38 2 45000 23 0 0 0 37 2 45000 24 0 0 0 35 2 45000 25 0 0 0 34 2 45000 26 0 0 0 32 2 45000 27 0 0 0 31 2 45000 28 0 0 0 30 2 45000 29 0 0 0 29 2 45000 30 0 0 0 28 2 45000 31 0 0 0 27 2 45000 32 0 0 0 26 2 45000 33 0 0 0 25 2 45000 34 0 0 0 25 2 45000 35 0 0 0 24 2 45000 36 0 0 0 23 2 45000 37 0 0 0 23 2 45000 38 0 0 0 22 2 45000 39 0 0 0 22 2 45000 40 0 0 0 21 2 45000 41 0 0 0 20 2 45000 42 0 0 0 20 2 45000 43 0 0 0 20 2 45000 44 0 0 0 19 2 45000 45 0 0 0 19 2 45000 46 0 0 0 18 2 45000 47 0 0 0 18 2 45000 48 0 0 0 18 2 45000 49 0 0 0 17 2 45000 50 0 0 0 17 2 45000 51 0 0 0 16 2 45000 52 0 0 0 16 2 45000 53 0 0 0 16 2 45000 54 0 0 0 16 2 45000 55 0 0 0 15 2 45000 56 0 0 0 15 2 45000 57 0 0 0 15 2 45000 58 0 0 0 14 2 45000 59 0 0 0 14 2 45000 60 0 0 0 14 2 45000 61 0 0 0 14 2 45000 62 0 0 0 14 2 45000 63 0 0 0 13 2 45000 64 0 0 0 13 2 45000 65 0 0 0 13 2 40000 1 55 0 55 840 2 40000 2 382 0 382 420 2 40000 3 0 0 0 280 2 40000 4 0 0 0 210 2 40000 5 0 0 0 168 2 40000 6 0 0 0 140 2 40000 7 0 0 0 120 2 40000 8 0 0 0 105 2 40000 9 0 0 0 93 2 40000 10 0 0 0 84 2 40000 11 0 0 0 76 2 40000 12 0 0 0 70 2 40000 13 0 0 0 65 2 40000 14 0 0 0 60 2 40000 15 0 0 0 56 2 40000 16 0 0 0 52 2 40000 17 0 0 0 49 2 40000 18 0 0 0 47 2 40000 19 0 0 0 44 2 40000 20 0 0 0 42 2 40000 21 0 0 0 40 2 40000 22 0 0 0 38 2 40000 23 0 0 0 37 2 40000 24 0 0 0 35 2 40000 25 0 0 0 34 2 40000 26 0 0 0 32 2 40000 27 0 0 0 31 2 40000 28 0 0 0 30 2 40000 29 0 0 0 29 2 40000 30 0 0 0 28 2 40000 31 0 0 0 27 2 40000 32 0 0 0 26 2 40000 33 0 0 0 25 2 40000 34 0 0 0 25 2 40000 35 0 0 0 24 2 40000 36 0 0 0 23 2 40000 37 0 0 0 23 2 40000 38 0 0 0 22 2 40000 39 0 0 0 22 2 40000 40 0 0 0 21 2 40000 41 0 0 0 20 2 40000 42 0 0 0 20 2 40000 43 0 0 0 20 2 40000 44 0 0 0 19 2 40000 45 0 0 0 19 2 40000 46 0 0 0 18 2 40000 47 0 0 0 18 2 40000 48 0 0 0 18 2 40000 49 0 0 0 17 2 40000 50 0 0 0 17 2 40000 51 0 0 0 16 2 40000 52 0 0 0 16 2 40000 53 0 0 0 16 2 40000 54 0 0 0 16 2 40000 55 0 0 0 15 2 40000 56 0 0 0 15 2 40000 57 0 0 0 15 2 40000 58 0 0 0 14 2 40000 59 0 0 0 14 2 40000 60 0 0 0 14 2 40000 61 0 0 0 14 2 40000 62 0 0 0 14 2 40000 63 0 0 0 13 2 40000 64 0 0 0 13 2 40000 65 0 0 0 13 2 35000 1 11 0 11 840 2 35000 2 299 0 299 420 2 35000 3 0 0 0 280 2 35000 4 0 0 0 210 2 35000 5 0 0 0 168 2 35000 6 0 0 0 140 2 35000 7 0 0 0 120 2 35000 8 0 0 0 105 2 35000 9 0 0 0 93 2 35000 10 0 0 0 84 2 35000 11 0 0 0 76 2 35000 12 0 0 0 70 2 35000 13 0 0 0 65 2 35000 14 0 0 0 60 2 35000 15 0 0 0 56 2 35000 16 0 0 0 52 2 35000 17 0 0 0 49 2 35000 18 0 0 0 47 2 35000 19 0 0 0 44 2 35000 20 0 0 0 42 2 35000 21 0 0 0 40 2 35000 22 0 0 0 38 2 35000 23 0 0 0 37 2 35000 24 0 0 0 35 2 35000 25 0 0 0 34 2 35000 26 0 0 0 32 2 35000 27 0 0 0 31 2 35000 28 0 0 0 30 2 35000 29 0 0 0 29 2 35000 30 0 0 0 28 2 35000 31 0 0 0 27 2 35000 32 0 0 0 26 2 35000 33 0 0 0 25 2 35000 34 0 0 0 25 2 35000 35 0 0 0 24 2 35000 36 0 0 0 23 2 35000 37 0 0 0 23 2 35000 38 0 0 0 22 2 35000 39 0 0 0 22 2 35000 40 0 0 0 21 2 35000 41 0 0 0 20 2 35000 42 0 0 0 20 2 35000 43 0 0 0 20 2 35000 44 0 0 0 19 2 35000 45 0 0 0 19 2 35000 46 0 0 0 18 2 35000 47 0 0 0 18 2 35000 48 0 0 0 18 2 35000 49 0 0 0 17 2 35000 50 0 0 0 17 2 35000 51 0 0 0 16 2 35000 52 0 0 0 16 2 35000 53 0 0 0 16 2 35000 54 0 0 0 16 2 35000 55 0 0 0 15 2 35000 56 0 0 0 15 2 35000 57 0 0 0 15 2 35000 58 0 0 0 14 2 35000 59 0 0 0 14 2 35000 60 0 0 0 14 2 35000 61 0 0 0 14 2 35000 62 0 0 0 14 2 35000 63 0 0 0 13 2 35000 64 0 0 0 13 2 35000 65 0 0 0 13 2 30000 1 -32 0 -32 840 2 30000 2 216 0 216 420 2 30000 3 440 0 440 280 2 30000 4 0 0 0 210 2 30000 5 0 0 0 168 2 30000 6 0 0 0 140 2 30000 7 0 0 0 120 2 30000 8 0 0 0 105 2 30000 9 0 0 0 93 2 30000 10 0 0 0 84 2 30000 11 0 0 0 76 2 30000 12 0 0 0 70 2 30000 13 0 0 0 65 2 30000 14 0 0 0 60 2 30000 15 0 0 0 56 2 30000 16 0 0 0 52 2 30000 17 0 0 0 49 2 30000 18 0 0 0 47 2 30000 19 0 0 0 44 2 30000 20 0 0 0 42 2 30000 21 0 0 0 40 2 30000 22 0 0 0 38 2 30000 23 0 0 0 37 2 30000 24 0 0 0 35 2 30000 25 0 0 0 34 2 30000 26 0 0 0 32 2 30000 27 0 0 0 31 2 30000 28 0 0 0 30 2 30000 29 0 0 0 29 2 30000 30 0 0 0 28 2 30000 31 0 0 0 27 2 30000 32 0 0 0 26 2 30000 33 0 0 0 25 2 30000 34 0 0 0 25 2 30000 35 0 0 0 24 2 30000 36 0 0 0 23 2 30000 37 0 0 0 23 2 30000 38 0 0 0 22 2 30000 39 0 0 0 22 2 30000 40 0 0 0 21 2 30000 41 0 0 0 20 2 30000 42 0 0 0 20 2 30000 43 0 0 0 20 2 30000 44 0 0 0 19 2 30000 45 0 0 0 19 2 30000 46 0 0 0 18 2 30000 47 0 0 0 18 2 30000 48 0 0 0 18 2 30000 49 0 0 0 17 2 30000 50 0 0 0 17 2 30000 51 0 0 0 16 2 30000 52 0 0 0 16 2 30000 53 0 0 0 16 2 30000 54 0 0 0 16 2 30000 55 0 0 0 15 2 30000 56 0 0 0 15 2 30000 57 0 0 0 15 2 30000 58 0 0 0 14 2 30000 59 0 0 0 14 2 30000 60 0 0 0 14 2 30000 61 0 0 0 14 2 30000 62 0 0 0 14 2 30000 63 0 0 0 13 2 30000 64 0 0 0 13 2 30000 65 0 0 0 13 2 25000 1 -76 0 -76 840 2 25000 2 132 0 133 420 2 25000 3 321 0 321 280 2 25000 4 492 0 492 210 2 25000 5 0 0 0 168 2 25000 6 0 0 0 140 2 25000 7 0 0 0 120 2 25000 8 0 0 0 105 2 25000 9 0 0 0 93 2 25000 10 0 0 0 84 2 25000 11 0 0 0 76 2 25000 12 0 0 0 70 2 25000 13 0 0 0 65 2 25000 14 0 0 0 60 2 25000 15 0 0 0 56 2 25000 16 0 0 0 52 2 25000 17 0 0 0 49 2 25000 18 0 0 0 47 2 25000 19 0 0 0 44 2 25000 20 0 0 0 42 2 25000 21 0 0 0 40 2 25000 22 0 0 0 38 2 25000 23 0 0 0 37 2 25000 24 0 0 0 35 2 25000 25 0 0 0 34 2 25000 26 0 0 0 32 2 25000 27 0 0 0 31 2 25000 28 0 0 0 30 2 25000 29 0 0 0 29 2 25000 30 0 0 0 28 2 25000 31 0 0 0 27 2 25000 32 0 0 0 26 2 25000 33 0 0 0 25 2 25000 34 0 0 0 25 2 25000 35 0 0 0 24 2 25000 36 0 0 0 23 2 25000 37 0 0 0 23 2 25000 38 0 0 0 22 2 25000 39 0 0 0 22 2 25000 40 0 0 0 21 2 25000 41 0 0 0 20 2 25000 42 0 0 0 20 2 25000 43 0 0 0 20 2 25000 44 0 0 0 19 2 25000 45 0 0 0 19 2 25000 46 0 0 0 18 2 25000 47 0 0 0 18 2 25000 48 0 0 0 18 2 25000 49 0 0 0 17 2 25000 50 0 0 0 17 2 25000 51 0 0 0 16 2 25000 52 0 0 0 16 2 25000 53 0 0 0 16 2 25000 54 0 0 0 16 2 25000 55 0 0 0 15 2 25000 56 0 0 0 15 2 25000 57 0 0 0 15 2 25000 58 0 0 0 14 2 25000 59 0 0 0 14 2 25000 60 0 0 0 14 2 25000 61 0 0 0 14 2 25000 62 0 0 0 14 2 25000 63 0 0 0 13 2 25000 64 0 0 0 13 2 25000 65 0 0 0 13 2 20000 1 -119 0 -119 840 2 20000 2 49 0 49 420 2 20000 3 202 0 202 280 2 20000 4 340 0 340 210 2 20000 5 467 0 467 168 2 20000 6 0 0 0 140 2 20000 7 0 0 0 120 2 20000 8 0 0 0 105 2 20000 9 0 0 0 93 2 20000 10 0 0 0 84 2 20000 11 0 0 0 76 2 20000 12 0 0 0 70 2 20000 13 0 0 0 65 2 20000 14 0 0 0 60 2 20000 15 0 0 0 56 2 20000 16 0 0 0 52 2 20000 17 0 0 0 49 2 20000 18 0 0 0 47 2 20000 19 0 0 0 44 2 20000 20 0 0 0 42 2 20000 21 0 0 0 40 2 20000 22 0 0 0 38 2 20000 23 0 0 0 37 2 20000 24 0 0 0 35 2 20000 25 0 0 0 34 2 20000 26 0 0 0 32 2 20000 27 0 0 0 31 2 20000 28 0 0 0 30 2 20000 29 0 0 0 29 2 20000 30 0 0 0 28 2 20000 31 0 0 0 27 2 20000 32 0 0 0 26 2 20000 33 0 0 0 25 2 20000 34 0 0 0 25 2 20000 35 0 0 0 24 2 20000 36 0 0 0 23 2 20000 37 0 0 0 23 2 20000 38 0 0 0 22 2 20000 39 0 0 0 22 2 20000 40 0 0 0 21 2 20000 41 0 0 0 20 2 20000 42 0 0 0 20 2 20000 43 0 0 0 20 2 20000 44 0 0 0 19 2 20000 45 0 0 0 19 2 20000 46 0 0 0 18 2 20000 47 0 0 0 18 2 20000 48 0 0 0 18 2 20000 49 0 0 0 17 2 20000 50 0 0 0 17 2 20000 51 0 0 0 16 2 20000 52 0 0 0 16 2 20000 53 0 0 0 16 2 20000 54 0 0 0 16 2 20000 55 0 0 0 15 2 20000 56 0 0 0 15 2 20000 57 0 0 0 15 2 20000 58 0 0 0 14 2 20000 59 0 0 0 14 2 20000 60 0 0 0 14 2 20000 61 0 0 0 14 2 20000 62 0 0 0 14 2 20000 63 0 0 0 13 2 20000 64 0 0 0 13 2 20000 65 0 0 0 13 2 15000 1 -163 0 -163 840 2 15000 2 -34 0 -34 420 2 15000 3 83 0 83 280 2 15000 4 189 0 189 210 2 15000 5 286 0 286 168 2 15000 6 375 0 375 140 2 15000 7 456 0 456 120 2 15000 8 0 0 0 105 2 15000 9 0 0 0 93 2 15000 10 0 0 0 84 2 15000 11 0 0 0 76 2 15000 12 0 0 0 70 2 15000 13 0 0 0 65 2 15000 14 0 0 0 60 2 15000 15 0 0 0 56 2 15000 16 0 0 0 52 2 15000 17 0 0 0 49 2 15000 18 0 0 0 47 2 15000 19 0 0 0 44 2 15000 20 0 0 0 42 2 15000 21 0 0 0 40 2 15000 22 0 0 0 38 2 15000 23 0 0 0 37 2 15000 24 0 0 0 35 2 15000 25 0 0 0 34 2 15000 26 0 0 0 32 2 15000 27 0 0 0 31 2 15000 28 0 0 0 30 2 15000 29 0 0 0 29 2 15000 30 0 0 0 28 2 15000 31 0 0 0 27 2 15000 32 0 0 0 26 2 15000 33 0 0 0 25 2 15000 34 0 0 0 25 2 15000 35 0 0 0 24 2 15000 36 0 0 0 23 2 15000 37 0 0 0 23 2 15000 38 0 0 0 22 2 15000 39 0 0 0 22 2 15000 40 0 0 0 21 2 15000 41 0 0 0 20 2 15000 42 0 0 0 20 2 15000 43 0 0 0 20 2 15000 44 0 0 0 19 2 15000 45 0 0 0 19 2 15000 46 0 0 0 18 2 15000 47 0 0 0 18 2 15000 48 0 0 0 18 2 15000 49 0 0 0 17 2 15000 50 0 0 0 17 2 15000 51 0 0 0 16 2 15000 52 0 0 0 16 2 15000 53 0 0 0 16 2 15000 54 0 0 0 16 2 15000 55 0 0 0 15 2 15000 56 0 0 0 15 2 15000 57 0 0 0 15 2 15000 58 0 0 0 14 2 15000 59 0 0 0 14 2 15000 60 0 0 0 14 2 15000 61 0 0 0 14 2 15000 62 0 0 0 14 2 15000 63 0 0 0 13 2 15000 64 0 0 0 13 2 15000 65 0 0 0 13 2 10000 1 -207 0 -207 840 2 10000 2 -117 0 -117 420 2 10000 3 -37 0 -37 280 2 10000 4 37 0 37 210 2 10000 5 105 0 105 168 2 10000 6 167 0 167 140 2 10000 7 224 0 224 120 2 10000 8 276 0 276 105 2 10000 9 324 0 324 93 2 10000 10 367 0 367 84 2 10000 11 406 0 407 76 2 10000 12 442 0 442 70 2 10000 13 474 1 475 65 2 10000 14 0 0 0 60 2 10000 15 0 0 0 56 2 10000 16 0 0 0 52 2 10000 17 0 0 0 49 2 10000 18 0 0 0 47 2 10000 19 0 0 0 44 2 10000 20 0 0 0 42 2 10000 21 0 0 0 40 2 10000 22 0 0 0 38 2 10000 23 0 0 0 37 2 10000 24 0 0 0 35 2 10000 25 0 0 0 34 2 10000 26 0 0 0 32 2 10000 27 0 0 0 31 2 10000 28 0 0 0 30 2 10000 29 0 0 0 29 2 10000 30 0 0 0 28 2 10000 31 0 0 0 27 2 10000 32 0 0 0 26 2 10000 33 0 0 0 25 2 10000 34 0 0 0 25 2 10000 35 0 0 0 24 2 10000 36 0 0 0 23 2 10000 37 0 0 0 23 2 10000 38 0 0 0 22 2 10000 39 0 0 0 22 2 10000 40 0 0 0 21 2 10000 41 0 0 0 20 2 10000 42 0 0 0 20 2 10000 43 0 0 0 20 2 10000 44 0 0 0 19 2 10000 45 0 0 0 19 2 10000 46 0 0 0 18 2 10000 47 0 0 0 18 2 10000 48 0 0 0 18 2 10000 49 0 0 0 17 2 10000 50 0 0 0 17 2 10000 51 0 0 0 16 2 10000 52 0 0 0 16 2 10000 53 0 0 0 16 2 10000 54 0 0 0 16 2 10000 55 0 0 0 15 2 10000 56 0 0 0 15 2 10000 57 0 0 0 15 2 10000 58 0 0 0 14 2 10000 59 0 0 0 14 2 10000 60 0 0 0 14 2 10000 61 0 0 0 14 2 10000 62 0 0 0 14 2 10000 63 0 0 0 13 2 10000 64 0 0 0 13 2 10000 65 0 0 0 13 2 5000 1 -250 0 -250 840 2 5000 2 -201 0 -201 420 2 5000 3 -156 0 -156 280 2 5000 4 -114 0 -114 210 2 5000 5 -76 0 -76 168 2 5000 6 -41 0 -41 140 2 5000 7 -8 0 -8 120 2 5000 8 23 0 23 105 2 5000 9 51 0 51 93 2 5000 10 77 0 77 84 2 5000 11 101 0 101 76 2 5000 12 123 0 123 70 2 5000 13 143 0 143 65 2 5000 14 161 0 161 60 2 5000 15 178 0 178 56 2 5000 16 193 0 194 52 2 5000 17 208 0 208 49 2 5000 18 221 1 221 47 2 5000 19 232 1 233 44 2 5000 20 243 1 244 42 2 5000 21 253 1 254 40 2 5000 22 263 1 263 38 2 5000 23 271 1 272 37 2 5000 24 279 1 280 35 2 5000 25 286 1 287 34 2 5000 26 293 1 294 32 2 5000 27 299 1 300 31 2 5000 28 305 1 306 30 2 5000 29 310 1 311 29 2 5000 30 315 1 316 28 2 5000 31 319 1 320 27 2 5000 32 323 2 324 26 2 5000 33 326 2 328 25 2 5000 34 330 2 332 25 2 5000 35 333 2 335 24 2 5000 36 335 2 338 23 2 5000 37 338 2 340 23 2 5000 38 340 2 342 22 2 5000 39 342 2 344 22 2 5000 40 344 2 346 21 2 5000 41 345 3 348 20 2 5000 42 347 3 349 20 2 5000 43 348 3 351 20 2 5000 44 349 3 352 19 2 5000 45 349 3 353 19 2 5000 46 350 3 353 18 2 5000 47 350 3 354 18 2 5000 48 351 4 354 18 2 5000 49 351 4 355 17 2 5000 50 351 4 355 17 2 5000 51 351 4 355 16 2 5000 52 350 4 355 16 2 5000 53 350 4 354 16 2 5000 54 349 5 354 16 2 5000 55 349 5 354 15 2 5000 56 348 5 353 15 2 5000 57 347 5 352 15 2 5000 58 346 5 351 14 2 5000 59 345 5 351 14 2 5000 60 344 6 350 14 2 5000 61 343 6 348 14 2 5000 62 341 6 347 14 2 5000 63 340 6 346 13 2 5000 64 338 6 345 13 2 5000 65 337 7 343 13 2 0 1 -294 0 -294 840 2 0 2 -284 0 -284 420 2 0 3 -275 0 -275 280 2 0 4 -266 0 -266 210 2 0 5 -257 0 -257 168 2 0 6 -249 0 -249 140 2 0 7 -240 0 -240 120 2 0 8 -231 0 -231 105 2 0 9 -222 0 -222 93 2 0 10 -213 0 -213 84 2 0 11 -205 0 -205 76 2 0 12 -197 0 -197 70 2 0 13 -189 0 -189 65 2 0 14 -182 0 -182 60 2 0 15 -175 0 -175 56 2 0 16 -168 0 -168 52 2 0 17 -162 0 -162 49 2 0 18 -157 0 -157 47 2 0 19 -152 0 -152 44 2 0 20 -147 0 -147 42 2 0 21 -142 0 -142 40 2 0 22 -138 0 -138 38 2 0 23 -134 0 -134 37 2 0 24 -131 0 -131 35 2 0 25 -127 0 -127 34 2 0 26 -124 0 -124 32 2 0 27 -121 0 -121 31 2 0 28 -119 0 -119 30 2 0 29 -116 0 -116 29 2 0 30 -114 0 -114 28 2 0 31 -112 0 -112 27 2 0 32 -111 0 -111 26 2 0 33 -109 0 -109 25 2 0 34 -108 0 -108 25 2 0 35 -107 0 -107 24 2 0 36 -106 0 -106 23 2 0 37 -105 0 -105 23 2 0 38 -104 0 -104 22 2 0 39 -103 0 -103 22 2 0 40 -103 0 -103 21 2 0 41 -103 0 -103 20 2 0 42 -102 0 -102 20 2 0 43 -102 0 -102 20 2 0 44 -102 0 -102 19 2 0 45 -103 0 -103 19 2 0 46 -103 0 -103 18 2 0 47 -103 0 -103 18 2 0 48 -104 0 -104 18 2 0 49 -104 0 -104 17 2 0 50 -105 0 -105 17 2 0 51 -106 0 -106 16 2 0 52 -107 0 -107 16 2 0 53 -108 0 -108 16 2 0 54 -109 0 -109 16 2 0 55 -110 0 -110 15 2 0 56 -111 0 -111 15 2 0 57 -113 0 -113 15 2 0 58 -114 0 -114 14 2 0 59 -116 0 -116 14 2 0 60 -117 0 -117 14 2 0 61 -119 0 -119 14 2 0 62 -121 0 -121 14 2 0 63 -123 0 -123 13 2 0 64 -125 0 -125 13 2 0 65 -126 0 -126 13
下面是我正在寻找的输出。特别注意从 MaxWeight 的 15,000 到 0。
{'Max_Weight'} {'Max_Speed'} {'T_Desc'} {'T_Emerg'} {'T_Final'} {'Time'} {[ 80000]} {[ 1]} {[ 404]} {[ 0]} {[ 404]} {[ 840]} {[ 75000]} {[ 1]} {[ 361]} {[ 0]} {[ 361]} {[ 840]} {[ 70000]} {[ 1]} {[ 317]} {[ 0]} {[ 317]} {[ 840]} {[ 65000]} {[ 1]} {[ 273]} {[ 0]} {[ 273]} {[ 840]} {[ 60000]} {[ 1]} {[ 230]} {[ 0]} {[ 230]} {[ 840]} {[ 55000]} {[ 1]} {[ 186]} {[ 0]} {[ 186]} {[ 840]} {[ 50000]} {[ 1]} {[ 142]} {[ 0]} {[ 142]} {[ 840]} {[ 45000]} {[ 2]} {[ 466]} {[ 0]} {[ 466]} {[ 420]} {[ 40000]} {[ 2]} {[ 382]} {[ 0]} {[ 382]} {[ 420]} {[ 35000]} {[ 2]} {[ 299]} {[ 0]} {[ 299]} {[ 420]} {[ 30000]} {[ 3]} {[ 440]} {[ 0]} {[ 440]} {[ 280]} {[ 25000]} {[ 4]} {[ 492]} {[ 0]} {[ 492]} {[ 210]} {[ 20000]} {[ 5]} {[ 467]} {[ 0]} {[ 467]} {[ 168]} {[ 15000]} {[ 7]} {[ 456]} {[ 0]} {[ 456]} {[ 120]} {[ 10000]} {[ 13]} {[ 474]} {[ 1]} {[ 475]} {[ 65]} {[ 5000]} {[ 65]} {[ 337]} {[ 7]} {[ 343]} {[ 13]}
目前还没有足够的信息来提供完整的解决方案。我们仍然缺少用于 ListBox 中对象的类型,也不知道“打印出来”的确切含义。但我仍然可以帮助一些人,方法是使用一个名为 LineItem
的假类型,其中 属性 匹配示例中显示的每个字段(删除空格以符合语法)。
listBox1.SelectionMode = SelectionMode.MultiExtended
listBox1.SelectedItems.Clear()
Dim weightGroups = listBox1.Items.Cast(Of LineItem)().
GroupBy(Function(i) i.MaxWeight, Function(i) i)
Dim MaxPerWeight = weightGroups.Select(Function(g) g.OrderBy(Function(i) -1*i.T_desc).First())
For Each item As LineItem in MaxPerWeight
listBox1.SelectedItems.Add(item)
Next
根据您的所有回答,尝试以下类似的方法。它将字符串数据解析为 DataValue 实例(代码假设值之间有空格 and/or 制表符),然后使用 LINQ 查询为每个“MaxWeight”组获取最大的“T_Desc”,并重新填充 ListBox新数据。该代码假定 ListBox 中的第一行是 header 行,并保持不变:
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim header As String = lstOutput.Items(0)
Dim data As New List(Of DataValue)
' Skip the header row by starting at 1:
For i As Integer = 1 To lstOutput.Items.Count - 1
data.Add(New DataValue(lstOutput.Items(i)))
Next
Dim results = From dv In data
Order By dv.MaxWeight Descending, dv.T_Desc Descending
Group dv By dv.MaxWeight Into g = Group
Select g.First
lstOutput.Items.Clear()
lstOutput.Items.Add(header)
For Each row In results
lstOutput.Items.Add(row.ToString)
Next
End Sub
End Class
Public Class DataValue
Public Sub New(ByVal strInput As String)
Dim values() As String = strInput.Split({" ", vbTab}, StringSplitOptions.RemoveEmptyEntries)
If values.Length >= 6 Then
Try
MaxWeight = Integer.Parse(values(0))
MaxSpeed = Integer.Parse(values(1))
Time = Integer.Parse(values(2))
T_Emerg = Integer.Parse(values(3))
T_Final = Integer.Parse(values(4))
T_Desc = Integer.Parse(values(5))
Catch ex As Exception
MessageBox.Show("Invalid Input: Value failed to convert to Integer.")
End Try
Else
MessageBox.Show("Invalid Input: Not enough values.")
End If
End Sub
Public Overrides Function ToString() As String
Return MaxWeight & vbTab & MaxSpeed & vbTab & Time & vbTab & T_Emerg & vbTab & T_Final & vbTab & T_Desc
End Function
Public MaxWeight As Integer
Public MaxSpeed As Integer
Public Time As Integer
Public T_Emerg As Integer
Public T_Final As Integer
Public T_Desc As Integer
End Class
不确定您的数据来自何处...您可以直接从数据创建 DataValue 实例,然后将这些实例添加到 ListBox,而不是在字符串之间来回转换。
来自评论:
I would like to compare the final output with the value of a variable and remove items from the listbox/stop adding items as soon as MaxSpeed equals the value of this variable. Thus in the animation you put up, assuming the value of this variable = 127, the final output would leave just the first row with a Maxweight = 80000.
您可以将输出部分更改为以下内容:
Dim target As Integer = 127
lstOutput.Items.Clear()
lstOutput.Items.Add(header)
For Each row In results
lstOutput.Items.Add(row.ToString)
If row.MaxSpeed = target Then
Exit For
End If
Next