Same finger points

 Letter: | ideal 0-4 | acceptable 5-9 || too high >= 10

E: Q1 Z2 J3 | O6 U9 || X12 K18 Y21 F26 G28 I35 W36 P37 B41 A50 C60 M72 V74 T91 L94 D127 S136 N138 H237 R250 A: Q0 Z1 X1 J1 O4 | K9 || U13 F17 Y17 G22 B22 V24 P30 I36 W39 D42 C48 E50 M54 H81 L82 S85 R100 T113 N147 I: J0 Q0 Z1 Y1 X2 | U7 || K10 B10 P12 G25 F26 V26 W29 E35 A36 O37 M41 C45 D45 L61 R62 H71 S101 T126 N160 O: Q0 Z0 X1 J3 A4 | E6 K6 || Y13 G14 V15 B18 D24 P32 I37 H41 W42 S45 L46 C47 M54 U73 T98 F107 R113 N130 R: J0 Q0 Z0 W3 K4 V4 | L6 H6 B9 || N10 M11 C14 F16 Y16 G17 D21 P24 S25 U42 T43 I62 A100 O113 E250 U: Y0 W0 Z0 V0 K0 X0 J3 | H6 I7 F8 Q8 E9 || D12 A13 M14 P16 G16 C19 B20 N29 L31 R42 T43 S47 O73 S: Z0 J0 X0 V0 Q0 F1 B3 G3 W4 | K5 Y6 C8 D8 M9 || L10 P14 N24 R25 H27 O45 U47 T79 A85 I101 E136 T: J0 Q0 V0 K0 D0 Z0 M0 G1 B1 X2 | W5 P5 F6 || Y13 L15 C20 R43 U43 N52 S79 E91 O98 A113 I126 H274 L: J0 Q0 X0 Z0 H0 M1 V2 W2 K2 N4 | G6 R6 C8 F9 || S10 P14 B15 T15 D24 Y30 U31 O46 I61 A82 E94 N: Z0 X0 P0 B0 J0 Q0 M1 H1 V2 F3 L4 | W7 Y7 K9 || R10 C23 S24 U29 T52 G65 D95 O130 E138 A147 I160 C: J0 V0 Z0 B0 P0 G0 W0 F0 D0 M0 Q0 Y1 X2 | K8 S8 L8 || R14 U19 T20 N23 H40 I45 O47 A48 E60 H: J0 V0 Q0 Z0 F0 K0 X0 B0 L0 D0 M1 N1 Y3 P3 | U6 R6 || G21 S27 W35 C40 O41 I71 A81 E237 T274 P: Q0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0 F0 S0 R0 D0 I0 N0 B1 A1 E3 O3 U3 | || Z: Q0 X0 F0 J0 K0 M0 S0 B0 P0 C0 V0 G0 D0 W0 H0 R0 Y0 L0 T0 N0 U0 O0 A1 I1 E2 | ||

Same finger score counter: #include

int bigram[] = { 0, 22, 48, 42, 50, 17, 22, 81, 36, 1,  9, 82, 54,147,  4, 30,  0,100, 85,113, 13, 24, 39,  1, 17,  1, 22,  0,  0,  0, 41,  0,  0,  0, 10,  1,  0, 15,  4,  0, 18,  0,  0,  9,  3,  1, 20,  0,  0,  0, 12,  0, 48,  0,  0,  0, 60,  0,  0, 40, 45,  0,  8,  8,  0, 23, 47,  0,  0, 14,  8, 20, 19,  0,  0,  2,  1,  0, 42,  0,  0,  0,127,  0,  2,  0, 45,  0,  0, 24,  1, 95, 24,  0,  0, 21,  8,  0, 12,  1,  0,  0,  3,  0, 50, 41, 60,127,  0, 26, 28,237, 35,  3, 18, 94, 72,138,  6, 37,  1,250,136, 91,  9, 74, 36, 12, 21,  2, 17,  0,  0,  0, 26,  0,  0,  0, 26,  0,  0,  9,  0,  3,107,  0,  0, 16,  1,  6,  8,  0,  0,  0,  0,  0, 22,  0,  0,  2, 28,  0,  0, 21, 25,  0,  0,  6,  0, 65, 14,  0,  0, 17,  3,  1, 16,  0,  0,  0,  1,  0, 81,  0, 40,  0,237,  0, 21,  0, 71,  0,  0,  0,  1,  1, 41,  3,  0,  6, 27,274,  6,  0, 35,  0,  3,  0, 36, 10, 45, 45, 35, 26, 25, 71,  0,  0, 10, 61, 41,160, 37, 12,  0, 62,101,126,  7, 26, 29,  2,  1,  1,  1,  1,  0,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  9,  0,  8,  0, 18,  0,  0,  0, 10,  0,  0,  2,  0,  9,  6,  0,  0,  4,  5,  0,  0,  0,  0,  0,  0,  0, 82, 15,  8, 24, 94,  9,  6,  0, 61,  0,  2,  0,  1,  4, 46, 14,  0,  6, 10, 15, 31,  2,  2,  0, 30,  0, 54,  4,  0,  1, 72,  0,  0,  1, 41,  0,  0,  1,  0,  1, 54, 11,  0, 11,  9,  0, 14,  0,  0,  0,  7,  0, 147,  0, 23, 95,138,  3, 65,  1,160,  0,  9,  4,  1,  0,130,  0,  0, 10, 24, 52, 29,  2,  7,  0,  7,  0,  4, 18, 47, 24,  6,107, 14, 41, 37,  3,  6, 46, 54,130,  0, 32,  0,113, 45, 98, 73, 15, 42,  1, 13,  0, 30,  0,  0,  0, 37,  0,  0,  3, 12,  0,  0, 14, 11,  0, 32,  0,  0, 24, 14,  5, 16,  0,  0,  2,  1,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  8,  0,  0,  0,  0,  0, 100,  9, 14, 21,250, 16, 17,  6, 62,  0,  4,  6, 11, 10,113, 24,  0,  0, 25, 43, 42,  4,  3,  0, 16,  0, 85,  3,  8,  8,136,  1,  3, 27,101,  0,  5, 10,  9, 24, 45, 14,  0, 25,  0, 79, 47,  0,  4,  0,  6,  0, 113,  1, 20,  0, 91,  6,  1,274,126,  0,  0, 15,  0, 52, 98,  5,  0, 43, 79,  0, 43,  0,  5,  2, 13,  0, 13, 20, 19, 12,  9,  8, 16,  6,  7,  3,  0, 31, 14, 29, 73, 16,  8, 42, 47, 43,  0,  0,  0,  0,  0,  0, 24,  0,  0,  1, 74,  0,  0,  0, 26,  0,  0,  2,  0,  2, 15,  0,  0,  4,  0,  0,  0,  0,  0,  0,  0,  0, 39,  0,  0,  0, 36,  0,  0, 35, 29,  0,  0,  2,  0,  7, 42,  0,  0,  3,  4,  5,  0,  0,  0,  0,  0,  0,  1,  0,  2,  0, 12,  0,  0,  0,  2,  0,  0,  0,  0,  0,  1,  2,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0, 17, 12,  1,  3, 21,  0,  1,  3,  1,  0,  0, 30,  7,  7, 13,  1,  0, 16,  6, 13,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  2,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, }; // same finger points from https://colemak.com/Design

int points;

char sf1[48]; char sf2[48]; int sfv[48];

int pointer = 0;

void add(char x, char y){ if(((x&0xDF)>='A'&&(x&0xDF)<='Z')&&((y&0xDF)>='A'&&(y&0xDF)<='Z')){ points+=bigram[26*((y&0x1F)-1)+((x&0x1F)-1)]; sf1[pointer]=x;sf2[pointer]=y;sfv[pointer]=bigram[26*((y&0x1F)-1)+((x&0x1F)-1)]; pointer++; } }

int main{ for(int i=0; i<26*26; i++){ if(bigram[i]!=bigram[i/26+i%26*26])return i;	} char layout[30]; for(int i=0; i<30; i++)std::cin >> layout[i]; for(int i=0; i<30; i++)std::cout << layout[i]; std::cout << '\n'; points=0; pointer=0; char x; char y;	for(int i=0; i<10; i++){ add(layout[i], layout[i+10]); }	for(int i=0; i<10; i++){ add(layout[i], layout[i+20]); }	for(int i=0; i<10; i++){ add(layout[i+10], layout[i+20]); }	for(int i=0; i<18; i++){ add(layout[(i%2*2+3)+(i/2%3*10)], layout[(i%2*2+4)+(i/2/3*10)]); }	for (int p = 1; p < pointer; p += p)         for (int k = p; k > 0; k /= 2) for (int j = k % p; j + k < pointer; j += k + k)             for (int i = 0; i < k; i++) if ((i + j)/(p + p) == (i + j + k)/(p + p)) { if(i+j+k<pointer && (sfv[i + j] < sfv[i + j + k])){ int temp = sfv[i+j]; sfv[i+j] = sfv[i+j+k]; sfv[i+j+k] = temp; char temp2 = sf1[i+j]; sf1[i+j] = sf1[i+j+k]; sf1[i+j+k] = temp2; temp2 = sf2[i+j]; sf2[i+j] = sf2[i+j+k]; sf2[i+j+k] = temp2; }               }	for(int i=0; i#include

int bigram[] = { 0, 22, 48, 42, 50, 17, 22, 81, 36, 1,  9, 82, 54,147,  4, 30,  0,100, 85,113, 13, 24, 39,  1, 17,  1, 22,  0,  0,  0, 41,  0,  0,  0, 10,  1,  0, 15,  4,  0, 18,  0,  0,  9,  3,  1, 20,  0,  0,  0, 12,  0, 48,  0,  0,  0, 60,  0,  0, 40, 45,  0,  8,  8,  0, 23, 47,  0,  0, 14,  8, 20, 19,  0,  0,  2,  1,  0, 42,  0,  0,  0,127,  0,  2,  0, 45,  0,  0, 24,  1, 95, 24,  0,  0, 21,  8,  0, 12,  1,  0,  0,  3,  0, 50, 41, 60,127,  0, 26, 28,237, 35,  3, 18, 94, 72,138,  6, 37,  1,250,136, 91,  9, 74, 36, 12, 21,  2, 17,  0,  0,  0, 26,  0,  0,  0, 26,  0,  0,  9,  0,  3,107,  0,  0, 16,  1,  6,  8,  0,  0,  0,  0,  0, 22,  0,  0,  2, 28,  0,  0, 21, 25,  0,  0,  6,  0, 65, 14,  0,  0, 17,  3,  1, 16,  0,  0,  0,  1,  0, 81,  0, 40,  0,237,  0, 21,  0, 71,  0,  0,  0,  1,  1, 41,  3,  0,  6, 27,274,  6,  0, 35,  0,  3,  0, 36, 10, 45, 45, 35, 26, 25, 71,  0,  0, 10, 61, 41,160, 37, 12,  0, 62,101,126,  7, 26, 29,  2,  1,  1,  1,  1,  0,  0,  3,  0,  0,  0,  0,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  3,  0,  0,  0,  0,  0,  9,  0,  8,  0, 18,  0,  0,  0, 10,  0,  0,  2,  0,  9,  6,  0,  0,  4,  5,  0,  0,  0,  0,  0,  0,  0, 82, 15,  8, 24, 94,  9,  6,  0, 61,  0,  2,  0,  1,  4, 46, 14,  0,  6, 10, 15, 31,  2,  2,  0, 30,  0, 54,  4,  0,  1, 72,  0,  0,  1, 41,  0,  0,  1,  0,  1, 54, 11,  0, 11,  9,  0, 14,  0,  0,  0,  7,  0, 147,  0, 23, 95,138,  3, 65,  1,160,  0,  9,  4,  1,  0,130,  0,  0, 10, 24, 52, 29,  2,  7,  0,  7,  0,  4, 18, 47, 24,  6,107, 14, 41, 37,  3,  6, 46, 54,130,  0, 32,  0,113, 45, 98, 73, 15, 42,  1, 13,  0, 30,  0,  0,  0, 37,  0,  0,  3, 12,  0,  0, 14, 11,  0, 32,  0,  0, 24, 14,  5, 16,  0,  0,  2,  1,  0,  0,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  8,  0,  0,  0,  0,  0, 100,  9, 14, 21,250, 16, 17,  6, 62,  0,  4,  6, 11, 10,113, 24,  0,  0, 25, 43, 42,  4,  3,  0, 16,  0, 85,  3,  8,  8,136,  1,  3, 27,101,  0,  5, 10,  9, 24, 45, 14,  0, 25,  0, 79, 47,  0,  4,  0,  6,  0, 113,  1, 20,  0, 91,  6,  1,274,126,  0,  0, 15,  0, 52, 98,  5,  0, 43, 79,  0, 43,  0,  5,  2, 13,  0, 13, 20, 19, 12,  9,  8, 16,  6,  7,  3,  0, 31, 14, 29, 73, 16,  8, 42, 47, 43,  0,  0,  0,  0,  0,  0, 24,  0,  0,  1, 74,  0,  0,  0, 26,  0,  0,  2,  0,  2, 15,  0,  0,  4,  0,  0,  0,  0,  0,  0,  0,  0, 39,  0,  0,  0, 36,  0,  0, 35, 29,  0,  0,  2,  0,  7, 42,  0,  0,  3,  4,  5,  0,  0,  0,  0,  0,  0,  1,  0,  2,  0, 12,  0,  0,  0,  2,  0,  0,  0,  0,  0,  1,  2,  0,  0,  0,  2,  0,  0,  0,  0,  0,  0, 17, 12,  1,  3, 21,  0,  1,  3,  1,  0,  0, 30,  7,  7, 13,  1,  0, 16,  6, 13,  0,  0,  0,  0,  0,  0,  1,  0,  0,  0,  2,  0,  0,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, }; // same finger points from https://colemak.com/Design

int points;

char sf1[52]; char sf2[52]; int sfv[52];

int pointer = 0;

void add(char x, char y){ if(((x&0xDF)>='A'&&(x&0xDF)<='Z')&&((y&0xDF)>='A'&&(y&0xDF)<='Z')){ points+=bigram[26*((y&0x1F)-1)+((x&0x1F)-1)]; sf1[pointer]=x;sf2[pointer]=y;sfv[pointer]=bigram[26*((y&0x1F)-1)+((x&0x1F)-1)]; pointer++; } }

int main{ for(int i=0; i<26*26; i++){ if(bigram[i]!=bigram[i/26+i%26*26])return i;	} char layout[30]; for(int i=0; i<30; i++)std::cin >> layout[i]; for(int i=0; i<30; i++)std::cout << layout[i]; std::cout << '\n'; points=0; pointer=0; char x; char y;	for(int i=0; i<10; i++){ add(layout[i], layout[i+10]); }	for(int i=1; i<10; i++){ add(layout[i], layout[i+20]); }	for(int i=1; i<10; i++){ add(layout[i+10], layout[i+20]); }	for(int i=0; i<18; i++){ add(layout[(i%2*2+3)+(i/2%3*10)], layout[(i%2*2+4)+(i/2/3*10)]); }	for(int i=0; i<6; i++){ add(layout[20], layout[(i%2+3)+(i/2*10)]); }	for (int p = 1; p < pointer; p += p)         for (int k = p; k > 0; k /= 2) for (int j = k % p; j + k < pointer; j += k + k)             for (int i = 0; i < k; i++) if ((i + j)/(p + p) == (i + j + k)/(p + p)) { if(i+j+k<pointer && (sfv[i + j] < sfv[i + j + k])){ int temp = sfv[i+j]; sfv[i+j] = sfv[i+j+k]; sfv[i+j+k] = temp; char temp2 = sf1[i+j]; sf1[i+j] = sf1[i+j+k]; sf1[i+j+k] = temp2; temp2 = sf2[i+j]; sf2[i+j] = sf2[i+j+k]; sf2[i+j+k] = temp2; }               }	for(int i=0; i<pointer; i++){ std::cout << sf1[i] << sf2[i] << sfv[i] << ' '; }	std::cout << "\nSame finger points: " << points; return 0; }