fork(1) download
  1. namespace System.Linq{class W{static void Main(){var r=new Random();
  2. Func<char>c=()=>(char)(r.Next(33,60)%59+32);var s="";
  3. while(s.Length<28)s+=c();var a="METHINKS IT IS LIKE A WEASEL";int b=0;
  4. while (s!=a){int m=-1;var f=s;for(int i=0;i<100;i++){
  5. var l=string.Join("",s.Select(j=>(r.Next(20)!=0?j:c()).ToString()).ToArray());
  6. int o=Enumerable.Range(0,28).Sum(j=>l[j]==a[j]?1:0);if(o>m){f=l;m=o;}}
  7. Console.WriteLine(b+++": "+(s=f)+" -- score: "+m);}}}}
Success #stdin #stdout 0.13s 35080KB
stdin
Standard input is empty
stdout
0: MWXNMXOT MHUYCMECXTPYZISRDED -- score: 3
1: MWXNMXOT MHUYKMECXTPYZISRDEL -- score: 4
2: MWXNMNOP MHUYKMECXTPYZISRDEL -- score: 5
3: MWXNMNKP MHUIKVEGXTPYZISRDEL -- score: 7
4: MWXNMNKP IHUIKVEGXTPYZISRDEL -- score: 8
5: MWXNMNK  IHUIK EGXTPYZISRDEL -- score: 9
6: MWXHMNK  IHUIK EGXTPYZISRDEL -- score: 10
7: MWXHMNKX IHUIK IGKTPYZISRDEL -- score: 11
8: MWXHMNKX IHUIK IIKTPYZISRSEL -- score: 13
9: MWXHMNKX IHUIK IIKT YZISRSEL -- score: 14
10: MEXHMNKX IHUIV IIKT YZISRSEL -- score: 15
11: MEXHMNKX ILUIV IIKT YZWSRSEL -- score: 16
12: MEXHMNKX IEAIV IIKT YZWERSEL -- score: 17
13: MEXHMNKX IEAIV IIKT YZWERSEL -- score: 17
14: MEXHMNKX IEAIV IIKT YZWERSEL -- score: 17
15: MEXHMNKX IEAIV IIKT YZWERSEL -- score: 17
16: MEXHMNKX IE IV IIKT YZWERSEL -- score: 18
17: METHMNKX IE IV IIKT YZWERSEL -- score: 19
18: METHINKX IE IV IIKT YZWERSEL -- score: 20
19: METHINKX IT IV IIKT YZWERSEL -- score: 21
20: METHINKX IT IV IIKT YZWERSEL -- score: 21
21: METHINKX IT IV IIKT YZWERSEL -- score: 21
22: METHINKX IT IS IIKT YZWERSEL -- score: 22
23: METHINKX IT IS IIKT YZWERSEL -- score: 22
24: METHINKX IT IS IIKK Y WERSEL -- score: 23
25: METHINKA IT IS IIKK Y WERSEL -- score: 23
26: METHINKA IT IS IIKK Y WERSEL -- score: 23
27: METHINKA IT IS IIKJ Y WEZSEL -- score: 23
28: METHINKA IT IS IIKJ Y WEZSEL -- score: 23
29: METHINKA IT IS IIKZ Y WEZSEL -- score: 23
30: METHINKA IT IS IIKZ Y WEZSEL -- score: 23
31: METHINKA IT IS IIKZ Y WEZSEL -- score: 23
32: METHINKA IT IS EIKZ L WEZSEL -- score: 23
33: METHINKA IT IS EIKC L WEZSEL -- score: 23
34: METHINKA IT IS EIKC L WEZSEL -- score: 23
35: METHINKS IT IS EIKC L WEZSEL -- score: 24
36: METHINKS IT IS EIKC L WEZSEL -- score: 24
37: METHINKS IT IS EIKC L WEZSEL -- score: 24
38: METHINKS IT IS EIKC L WEZSEL -- score: 24
39: METHINKS IT IS EIKX G WEZSEL -- score: 24
40: METHINKS IT IS EIKX G WEZSEL -- score: 24
41: METHINKS IT IS SIKX G WEZSEL -- score: 24
42: METHINKS IT IS SIKX G WEASEL -- score: 25
43: METHINKS IT IS SIKX G WEASEL -- score: 25
44: METHINKS IT IS SIKX G WEASEL -- score: 25
45: METHINKS IT IS SIKX G WEASEL -- score: 25
46: METHINKS IT IS SIKX G WEASEL -- score: 25
47: METHINKS IT IS SIKX G WEASEL -- score: 25
48: METHINKS IT IS SIKX G WEASEL -- score: 25
49: METHINKS IT IS SIKD G WEASEL -- score: 25
50: METHINKS IT IS LIKD G WEASEL -- score: 26
51: METHINKS IT IS LIKD G WEASEL -- score: 26
52: METHINKS IT IS LIKD G WEASEL -- score: 26
53: METHINKS IT IS LIKD G WEASEL -- score: 26
54: METHINKS IT IS LIKD G WEASEL -- score: 26
55: METHINKS IT IS LIKD G WEASEL -- score: 26
56: METHINKS IT IS LIKD G WEASEL -- score: 26
57: METHINKS IT IS LIKD G WEASEL -- score: 26
58: METHINKS IT IS LIKD G WEASEL -- score: 26
59: METHINKS IT IS LIKD G WEASEL -- score: 26
60: METHINKS IT IS LIKD G WEASEL -- score: 26
61: METHINKS IT IS LIKD G WEASEL -- score: 26
62: METHINKS IT IS LIKD G WEASEL -- score: 26
63: METHINKS IT IS LIKD G WEASEL -- score: 26
64: METHINKS IT IS LIKD G WEASEL -- score: 26
65: METHINKS IT IS LIKD G WEASEL -- score: 26
66: METHINKS IT IS LIKD G WEASEL -- score: 26
67: METHINKS IT IS LIKE G WEASEL -- score: 27
68: METHINKS IT IS LIKE G WEASEL -- score: 27
69: METHINKS IT IS LIKE G WEASEL -- score: 27
70: METHINKS IT IS LIKE G WEASEL -- score: 27
71: METHINKS IT IS LIKE G WEASEL -- score: 27
72: METHINKS IT IS LIKE G WEASEL -- score: 27
73: METHINKS IT IS LIKE G WEASEL -- score: 27
74: METHINKS IT IS LIKE G WEASEL -- score: 27
75: METHINKS IT IS LIKE G WEASEL -- score: 27
76: METHINKS IT IS LIKE G WEASEL -- score: 27
77: METHINKS IT IS LIKE G WEASEL -- score: 27
78: METHINKS IT IS LIKE G WEASEL -- score: 27
79: METHINKS IT IS LIKE G WEASEL -- score: 27
80: METHINKS IT IS LIKE G WEASEL -- score: 27
81: METHINKS IT IS LIKE G WEASEL -- score: 27
82: METHINKS IT IS LIKE G WEASEL -- score: 27
83: METHINKS IT IS LIKE G WEASEL -- score: 27
84: METHINKS IT IS LIKE G WEASEL -- score: 27
85: METHINKS IT IS LIKE G WEASEL -- score: 27
86: METHINKS IT IS LIKE G WEASEL -- score: 27
87: METHINKS IT IS LIKE G WEASEL -- score: 27
88: METHINKS IT IS LIKE G WEASEL -- score: 27
89: METHINKS IT IS LIKE G WEASEL -- score: 27
90: METHINKS IT IS LIKE A WEASEL -- score: 28