Вызов Кода — Напишите Решатель «Висельник»

  • Автор темы 1975kisa
  • Обновлено
  • 20, Oct 2024
  • #1

Вам необходимо написать решатель Hangman. Тестирование против этот список английских слов[1], побеждает тот, кто решит наибольшее количество слов, при этом решающим фактором является количество неверных предположений. Все слова в списке слов будут проверены в случайном порядке.

[1]: Этот список слов взят из здесь, затем удаляются цифры, затем удаляются слова длиной 1 или с неалфавитными символами, затем в качестве этого списка слов выбираются наиболее часто встречающиеся 4096 уникальных слов.

Подробности:

Ваша программа будет взаимодействовать с игровой программой, которая через стандартный ввод выдаст вам символы подчеркивания и правильно угаданные буквы. Ваша программа выдаст на стандартный вывод ваши предположения, и на основе входных данных она должна сделать вывод, было ли предыдущее предположение правильным или неправильным. После шести ошибок ваша программа проигрывает. Ваша программа должна быть готова к следующей игре после окончания каждой игры (после победы или поражения).

Длина вашего кода должна быть строго меньше 2048 байт, и ваша программа не должна использовать какие-либо внешние ресурсы (включая, помимо прочего, доступ к списку слов в локальном хранилище или из Интернета).

Пример: (Вводу предшествует

 
 
 python ./game.py ruby ./solver.rb 
here only for clarification - it is not actually present in the input)

python ./game.py [yoursolverprogram]

Предположим, вы ошиблись 6 раз, вы получите окончательный ввод, который означает, что ваше предположение неверно, и ваша программа должна быть готова начать новый раунд (т. е. принять еще один ввод).

Если ты выиграешь,

import sys, random, subprocess proc = subprocess.Popen(sys.argv[1:], stdin=subprocess.PIPE, stdout=subprocess.PIPE) def p(x): proc.stdin.write(x+'\n') proc.stdin.flush() wordlist=[] f=open('wordlist.txt', 'r') for i in f: wordlist.append(i[:-1] if i[-1]=='\n' else i) # wordlist=[i[:-1] for i in f] random.shuffle(wordlist) score=0 totalerr=0 for s in wordlist: s2=[] for i in s: s2.append('_') err=0 p(''.join(s2)) while err<6 and '_' in s2: c=proc.stdout.readline().strip() nomatch=True for i in range(0, len(s)): if s[i]==c: s2[i]=c nomatch=False if nomatch: err+=1 totalerr+=1 p(''.join(s2)) if err<6: score+=1 p('END') sys.stderr.write('score is '+str(score)+', totalerr is '+str(totalerr)+'\n')

Узнав, что вы выиграли (поскольку во входных данных нет подчеркиваний), вы должны быть готовы принять следующий раунд.

Ваша программа должна завершить работу, когда она получит входные данные END .

Если ваша программа не является детерминированной (зависит от случайности, псевдослучайности, системного времени, температуры окружающей среды, моего настроения и т. д.), вы должны явно указать это в своей заявке, и ваша оценка будет засчитана 10 раз (мною, если не указано иное) и усреднено.

Примечание: если вы используете такие языки, как Python, явно сбрасывайте стандартный вывод после каждого оператора печати.

Программа игры следующая (благодарность неоннео):

>_angman h >hangman >_____ // new round

Использование: >_______ // 7 underscores a // Now you wait for input again >_a___a_ e >_a___a_ // Implies that your guess is wrong >_____ // new round, this will be given ONLY IF you already have 6 losses

Пример: >

Это должно работать как старая программа оценки, но не зависит от именованных каналов, поэтому может работать на других платформах. Если вас интересует старая версия, обратитесь к истории изменений.

#код-вызов #игра

1975kisa


Рег
21 Aug, 2007

Тем
84

Постов
223

Баллов
663
  • 26, Oct 2024
  • #2

Python: 2006 байт, оценка = 1501.

1885 байт, оценка=1337

1961 байт, оценка=1207

Вот моя подача:

 
 
 
 
 
 
 
 
 
score is 2813, totalerr is 17539

Результат вывода:

 
score is 656, totalerr is 22962

Эта программа полностью детерминирована. Гигантский объект (который представляет собой фрагмент кода в кодировке Base64).

 
score is 987, totalerr is 21964
compressed data) is a list of decision trees (one tree per word length). Each decision tree encodes a complete binary tree with a depth between 2 and 5. Each internal node is a single character, and the decision proceeds based on whether the character is present or not in the hangman word.

Каждый листовой узел двоичного дерева содержит оптимизированную таблицу частот, специфичную для этой ветви поиска в дереве. Таблица специально оптимизирована для завершения определенных слов и полного игнорирования других (до которых она не может добраться из-за ограниченного «неудачного» бюджета). Таблица не оптимизирована для минимизации ошибок, поэтому общее количество ошибок программы велико, несмотря на (относительно) хорошую оценку.

Оптимизатор, который не показан, использует недетерминированный нелинейный оптимизатор, использующий стратегию рандомизированного градиентного спуска для создания таблиц частот.

 

Mcdime


Рег
14 Oct, 2007

Тем
72

Постов
200

Баллов
570
  • 26, Oct 2024
  • #3

Руби

Совместная заявка от пользователя ПрагТоб и я.

 
 
 
 import std.stdio, std.random, std.array, std.math, std.algorithm;

alias double[char] Hash;
alias uniform U;

bool first = true;
Hash cons, vowel;
char[] guessed;
Mt19937 rng;

int fails;

void main()
{

rng.seed( unpredictableSeed );

auto get() { return stdin.readln.replace( "\r", "" ).replace( "\n", "" ); }

string input, last;

while( ( input = get ) != "END" )

{

if( first ) last = input;

if( input == last && !first ) ++fails;

if( fails == 6 || !input.any!( x => x == '_' ) )

{

fails = 0;

last = null;

guessed = [];

first = true;

continue;

}

stdout.writeln( guess );

stdout.flush;

if( !first ) last = input;

if( first ) first = false;

}
}

char guess()
{

reroll:

Hash group;

double min, max;

bool useWeight = U( 0, 2, rng ) == 1;

if( guessed.filter!( c => vowel.keys.any!( x => x == c ) ).count < vowel.length && U( 0, 2, rng ) == 1 )

{

group = vowel;

min = useWeight ? 2.758 : 0;

max = useWeight ? 12.702 : 4;

}

else

{

group = cons;

min = useWeight ? 0.074 : 0;

max = useWeight ? 9.056 : 20;

}

double choice = U!( "()" )( min, max, rng );

char chr;

if( useWeight )

{

foreach( k, v; group )

if( v < choice )

chr = k;

}

else

{

int counter = 0;

foreach( k, v; group )

{

if( counter == cast( int )choice.floor )

{

chr = k;

break;

}

++counter;

}

}

if( guessed.any!( x => chr == x ) || chr == char.init )

goto reroll;

else

{

guessed ~= chr;

return chr;

}
}

K keys( K, V )( V[K] a )
{

K[] ks;

foreach( k, v; a )  ks ~= k;

return ks;
}

static this()
{

cons = [ 't': 9.056, 'n': 6.749, 's': 6.327, 'h': 6.049, 'r': 5.987, 'd': 4.253, 'l': 4.025, 'c': 2.782, 'm': 2.406, 'w': 2.360, 'f': 2.228, 'g': 2.015, 'y': 1.974, 'p': 1.929, 'b': 1.492, 'v': 0.978, 'k': 0.772, 'j': 0.153, 'x': 0.150, 'q': 0.095, 'z': 0.074 ];

vowel = [ 'e': 12.702, 'a': 8.167, 'o': 7.507, 'i': 6.966, 'u': 2.758 ];
}
 

Результат:

25.7; totalerr: 24,529.9 (average of 10 tests).

В нем 1672 символа, и он еще не используется, поэтому у нас есть достаточно возможностей для улучшения алгоритмов.

Сначала мы сохраняем хэш частот символов (вычисленных из списка слов), сгруппированных по длине слова.

Затем в каждом раунде мы просто сортируем все символы по частотам для текущей длины и пробуем их от самого распространенного до наименее распространенного. Используя этот подход, мы, очевидно, терпим неудачу в каждом отдельном слове, имеющем хотя бы средний общий характер.

 

Lialpigo19


Рег
07 Nov, 2010

Тем
65

Постов
203

Баллов
538
  • 26, Oct 2024
  • #4

Обновлять Используя метод, аналогичный @nneonneo, я прихожу к этому коду: ровно 2047 символов.

Счет:

score is 2854, totalerr is 19482

Код:

00000000: efbb bf49 3d72 6177 5f69 6e70 7574 0a61 ...I=raw_input.a 00000010: 3d49 2829 0a77 6869 6c65 275e 273c 613a =I().while'^'<a: 00000020: 0a20 633d 673d 2727 0a20 7768 696c 6520 . c=g=''. while 00000030: 6c65 6e28 7365 7428 6729 2d73 6574 2861 len(set(g)-set(a 00000040: 2929 3c36 616e 6427 5f27 696e 2061 3a0a ))<6and'_'in a:. 00000050: 096d 3d33 3433 310a 0977 6869 6c65 2063 .m=3431..while c 00000060: 2069 6e20 673a 633d 2727 2778 da05 c101 in g:c='''x.... 00000070: 62a8 3808 04d0 b322 1923 bf04 b230 b1f5 b.8....".#...0.. 00000080: f6fb 1e42 6c73 475a e2e1 277d 3d19 d0c1 ...BlsGZ..'}=... 00000090: 5f9e d177 4f21 50d6 67ab 49b2 9ce1 09cb _..wO!P.g.I..... 000000a0: b4ca 793e ab4a 49a6 c567 e530 b9bf 41a9 ..y>.JI..g.0..A. 000000b0: 61b1 4dcc 77a1 7a3a c5a8 cb6a 3008 5958 a.M.w.z:...j0.YX 000000c0: fc15 ff50 d515 e0b3 326f 44d7 aecf 32fb ...P....2oD...2. 000000d0: 4050 03b0 3302 5e1c f038 1ea2 bf04 19f6 @P..3.^..8...... 000000e0: a847 1a8a 2571 47a3 0c68 a6c6 4b5c 72ed .G..%qG..h..K\r. 000000f0: e463 a51a 509b aae2 bd85 dc96 5ca7 dbb0 .c..P.......\... 00000100: a5af bddc 6b77 f9ef 020c 86c1 8bba 2734 ....kw........'4 00000110: 4cb6 20bb e2b6 68af ba5d 5d4a 44ce 73a7 L. ...h..]]JD.s. 00000120: 5c72 4ad8 1d3a 0eed ea63 9629 9c56 518f \rJ..:...c.).VQ. 00000130: e51b 32fa 2f4f da18 3592 de3c 335d edae ..2./O..5..<3].. 00000140: 1f1f cd86 bedb cb3b 44c5 cf91 8047 d8b4 .......;D....G.. 00000150: 33c2 aeff eea6 3184 5332 09bb a051 1191 3.....1.S2...Q.. 00000160: 18dc f1dc a3a5 4220 36d7 c95c 7bb4 fc2d ......B 6..\{..- 00000170: a518 9d56 937d bb35 b962 2e6d bdb6 dc07 ...V.}.5.b.m.... 00000180: 5b10 ca25 275b 2523 d57c 1363 5ad7 f9ca [..%'[%#.|.cZ... 00000190: 249e 8ea2 83c6 6af4 3de3 1fea 15ba ec1d $.....j.=....... 000001a0: e70c 96b8 38d8 b225 62a4 63d0 fa2e 5c72 ....8..%b.c...\r 000001b0: 6057 ecf8 3db2 9f7d 185c 72ee 8e5a e519 `W..=..}.\r..Z.. 000001c0: 02db bfbb c25a c738 d2b6 b454 8d56 5ab6 .....Z.8...T.VZ. 000001d0: 11ae 27cc e476 81e8 2321 9135 c833 3a4b ..'..v..#!.5.3:K 000001e0: 8a89 919e 26e8 3623 e44d aaec 59db 6f6e ....&.6#.M..Y.on 000001f0: 79da 3941 29e8 d274 7eb6 0aac 3249 8b1b y.9A)..t~...2I.. 00000200: b25d 1ff1 c496 f75c d125 e2aa f3b4 21a0 .].....\.%....!. 00000210: 7a55 d31d 4939 8433 ea97 f927 f9f3 0954 zU..I9.3...'...T 00000220: a861 2baa 7568 e1ce d489 f59d 1365 a69e .a+.uh.......e.. 00000230: fc22 bef1 a0cc 7dfc a320 7ad5 fa39 3f5d ."....}.. z..9?] 00000240: 16b0 58b0 253c c54b f4d8 5729 cfb6 2371 ..X.%<.K..W)..#q 00000250: c328 c5ab 1315 fcc2 27ad 8462 b5d5 d6f8 .(......'..b.... 00000260: 76aa fb12 c775 1733 24df 98f9 dd86 cbbe v....u.3$....... 00000270: 0c6e eb38 695f 705b 062d e231 3812 bdc4 .n.8i_p[.-.18... 00000280: 4664 ae0e 30a9 2cfb 3cf2 84dc 806e eb86 Fd..0.,.<....n.. 00000290: 7988 d147 1bc9 f7b3 ad1f 1914 2d97 99c2 y..G........-... 000002a0: d096 711b 4f24 74d3 ebd9 8d11 7a4a 6518 ..q.O$t.....zJe. 000002b0: e25a 9c0c 79b2 661c 8188 6a88 7315 ed7e .Z..y.f...j.s..~ 000002c0: b7ce 6d18 b06a 34d0 0a89 de1c 0509 65b4 ..m..j4.......e. 000002d0: ae5d 303d d2f2 7e98 cf07 ebb6 a4c0 e311 .]0=..~......... 000002e0: 13c4 1133 9b69 ecb6 9da7 75c8 1806 c136 ...3.i....u....6 000002f0: 2531 acbe aaa1 9353 fa13 ff28 fa62 999b %1.....S...(.b.. 00000300: b59f f13d 47ca a7f5 e706 06f1 9374 78b1 ...=G........tx. 00000310: 649a ea19 a156 efe0 084a b06b 31c0 d86d d....V...J.k1..m 00000320: c913 a3d4 dbb0 6248 851f 688f 11fb cd91 ......bH..h..... 00000330: f339 9fb9 c9fe 0ecc acfc 6eeb 1544 6469 .9........n..Ddi 00000340: 223c 5d5e 14bd caaf f3ca fc4c 6cc4 b2a2 "<]^.......Ll... 00000350: ade5 5656 df3f 7046 c9ab cd63 3c5a caf3 ..VV.?pF...c<Z.. 00000360: eec4 23ce aeb0 5aa8 7273 c1a7 d5b3 627a ..#...Z.rs....bz 00000370: 4b5b ec3b 7f87 48cb 5740 51d8 79aa f4cd K[.;[email protected]... 00000380: 5315 f53b ed89 2d7f 5736 d4f4 12e1 f1a0 S..;..-.W6...... 00000390: 7d5b f45b 8323 4bd8 37fb 173e ed3e e85d }[.[.#K.7..>.>.] 000003a0: 7f82 e83d de15 2925 cbb4 702f 04c4 b8f0 ...=..)%..p/.... 000003b0: 4998 b5f4 7ad3 b8f3 9ad3 5008 1722 c7ee I...z.....P..".. 000003c0: ca10 40f2 3fb1 8f2b 2262 f70e 8358 c2ac ..@.?..+"b...X.. 000003d0: 0b78 4ca2 163b 2f74 3c02 df67 a4eb f9f9 .xL..;/t<..g.... 000003e0: 799c b5c4 14b6 d672 54d5 37c3 6a7d 1675 y......rT.7.j}.u 000003f0: f219 bd6e ee58 eda8 3af1 6989 c8c9 f1a8 ...n.X..:.i..... 00000400: eeeb dcfa bed7 eef5 4ea7 50ff bde8 92f8 ........N.P..... 00000410: 6648 2980 ebf9 7645 84d9 0ef5 1192 c672 fH)...vE.......r 00000420: 254f e460 8da5 79d6 0fbc 2138 1edf b1ad %O.`..y...!8.... 00000430: 355a 98ab 548b db38 43ef 12db ef01 b93c 5Z..T..8C......< 00000440: 933a cbf1 44e6 2b85 f22c f6db e922 e1e3 .:..D.+..,...".. 00000450: 113e 803f 562c 83df 898c 3dca 86fc c809 .>.?V,....=..... 00000460: c09d 8585 87b0 4a78 8908 fc4f e0f3 4731 ......Jx...O..G1 00000470: 671f c4de 53f3 a85f 8954 fed5 ee2c 99c4 g...S.._.T...,.. 00000480: f091 6feb 5307 4f70 7df4 2620 d7d9 dca4 ..o.S.Op}.& .... 00000490: 4644 a948 4016 44bc 80df 7d6f c686 6499 [email protected]...}o..d. 000004a0: a4bc 75d0 2506 bf1d 2747 6b54 95be cfb1 ..u.%...'GkT.... 000004b0: 7b4b d70a 89b0 ac68 e2c4 1394 ba20 4d01 {K.....h..... M. 000004c0: 204c 64f3 721f 2a53 862d 89f5 59df b273 Ld.r.*S.-..Y..s 000004d0: 7c32 470f 7055 ef6e 2167 d4dd f546 9c0e |2G.pU.n!g...F.. 000004e0: 9eda bf3a 78ce d946 28b5 2c8d f79f 7c31 ...:x..F(.,...|1 000004f0: f940 d75d 8940 aca2 f6af f538 1eaf 6ef7 .@.][email protected]. 00000500: c81d 56c5 955c 0506 7474 fa7d 4627 b6fe ..V..\..tt.}F'.. 00000510: 4aa9 9abd 825d 166f 852c 8a4b b87e 727f J....].o.,.K.~r. 00000520: 43c6 d657 eeb5 46cb 449b ce1b cc11 a25c C..W..F.D......\ 00000530: 72b1 8ccd 7feb ac50 8c21 a75c 30cb a3a7 r......P.!.\0... 00000540: ebc3 326c 0a9e 8b3a 513e 560b 2c31 cb61 ..2l...:Q>V.,1.a 00000550: c6bc 6748 90e1 6e3c ae15 8e37 9264 f73f ..gH..n<...7.d.? 00000560: 696b 3c62 47a8 f091 82a7 0f4e 2f7d 1343 ik<bG......N/}.C 00000570: d202 b436 3e36 7825 7fc7 8b0b 2543 cdff ...6>6x%....%C.. 00000580: 2a33 08af e34a 652e d547 d87d 0c4f b6d8 *3...Je..G.}.O.. 00000590: 5105 ad4b 47e9 31ad 2bec 98f0 d6aa 487d Q..KG.1.+.....H} 000005a0: d26b 33fa 651c 67b7 f189 7c01 cf87 24ee .k3.e.g...|...$. 000005b0: f2d5 3634 49f3 6aad 898c 914f e6fe 202d ..64I.j....O.. - 000005c0: 8f18 2e3b a1dc fe8c 624c 3d66 27ca 54da ...;....bL=f'.T. 000005d0: 1183 c790 96fa f357 bee8 6171 d69e 451d .......W..aq..E. 000005e0: 5aad 5bd5 681a 0cc1 b6ce c3d4 82d9 d7a6 Z.[.h........... 000005f0: e269 4bac bbff c406 7388 85d6 6dda f2c4 .iK.....s...m... 00000600: 0f75 e17c dd1d acfd 6086 904c c59c 935b .u.|....`..L...[ 00000610: 0a8f cef8 c935 51ad d44a d9b2 aa0b e01c .....5Q..J...... 00000620: 3ff9 bb87 3190 b4cc 2fed 4bd1 58a1 f06b ?...1.../.K.X..k 00000630: ee44 1a6c 435d ae3a e7ef a501 a30e 6def .D.lC].:......m. 00000640: 21ea 3b89 32e1 631b 53f8 c14a f636 51f9 !.;.2.c.S..J.6Q. 00000650: d662 ef32 b386 ed27 6b87 5b5e 8f5b 9776 .b.2...'k.[^.[.v 00000660: dfe0 e83d 1f29 fbf2 dc5b b843 60bf cbc8 ...=.)...[.C`... 00000670: aa9a 9ad2 f94e 2ea9 96b0 296c 937e 65a3 .....N....)l.~e. 00000680: eafd a4d0 85b5 9f4a c671 7ece 5811 c7b7 .......J.q~.X... 00000690: d3c6 75e0 70b3 224d c9aa d8f1 fb6e f4ea ..u.p."M.....n.. 000006a0: 1d7a cef7 5fc7 5a98 7fd5 28b5 753f 7c43 .z.._.Z...(.u?|C 000006b0: da79 9d90 1a51 33ae ca7a d5ea a990 fed3 .y...Q3..z...... 000006c0: 5ff5 2975 7b99 8333 44c2 a7fa 17a3 875d _.)u{..3D......] 000006d0: 70ef 2361 6d5a 1cc8 13a7 d482 30c6 2b84 p.#amZ......0.+. 000006e0: 4d4a a765 c81b 2e16 3e62 08d8 ce5a 2beb MJ.e....>b...Z+. 000006f0: a823 42ef 633f 7858 cdaa 755c 3097 f029 .#B.c?xX..u\0..) 00000700: 2afa 06d8 47c0 2714 f3fa 1554 d8a5 1a8b *...G.'....T.... 00000710: 77ac b319 ac47 9b5e 5ba7 a5ae 7dc7 c86f w....G.^[...}..o 00000720: e73b 2a62 7a3e 7b29 6583 b227 0417 bb6e .;*bz>{)e..'...n 00000730: 98ef 9097 6f9b c655 8f20 32ce a60e 6556 ....o..U. 2...eV 00000740: ce62 c8c9 afab c30e 6908 5675 19c6 5019 .b......i.Vu..P. 00000750: 62dd 131b 9c2d 3968 3f42 5b96 e7c9 1e23 b....-9h?B[....# 00000760: f1b0 0280 9ce9 f9cc 92ec 7eb5 a7c6 9619 ..........~..... 00000770: 5aab b832 b7cf 865c 72f1 9454 e33a 9975 Z..2...\r..T.:.u 00000780: 5b8a d8e8 5f46 0a22 2397 7d77 f70a 33b7 [..._F."#.}w..3. 00000790: 5183 5d5e 7267 54c5 a204 1e2f 470a dad2 Q.]^rgT..../G... 000007a0: a554 e493 7f06 7ff9 5fdd dfff 8428 a74f .T......_....(.O 000007b0: 2727 272e 6465 636f 6465 2827 7a69 7027 '''.decode('zip' 000007c0: 295b 696e 7428 612e 7265 706c 6163 6528 )[int(a.replace( 000007d0: 275f 272c 2731 2729 2c33 3629 256d 5d3b '_','1'),36)%m]; 000007e0: 6d2d 3d36 0a09 7072 696e 7420 633b 672b m-=6..print c;g+ 000007f0: 3d63 3b61 3d49 2829 0a20 613d 4928 29 =c;a=I(). a=I()
Старая запись

Результат:

-u

Это не среднее значение, поскольку этот алгоритм является детерминированным, то есть он всегда дает одинаковую оценку для любого перетасованного списка слов.

Вот моя запись в Python 2.7; гольф (717 символов)

python ./game.py python -u ./solver.py

Здесь используется идея, аналогичная @m.buettner, где хранится упорядоченный список букв, по которому будут делаться предположения. Но здесь не используются данные о частоте напрямую, а просто пробуются почти все возможные перестановки букв, моделируется игра и, наконец, выбирается перестановка, которая дает лучший результат.

Эта версия оптимизирована с использованием первых 9 букв, поэтому для слов из 2 и 3 букв перестановка уже является оптимальной в классе алгоритмов, где информация из предыдущего ввода игнорируется. В настоящее время я все еще работаю над кодом для десяти самых популярных букв, оптимизируя четырехбуквенные слова (а также находя лучшее решение для более длинных слов).


Неверная запись

Для моего сравнительного анализа вот код, который использует полное дерево решений, 11092 символа.

Счет:

python -u

Код:

xxd -r ||answer||

Perl, 1461 байт, счет=1412, тотал=21050

1

(Обратите внимание: после удаления большого количества необязательных пробелов это 1461 байт. В напечатанном виде он примерно на сотню тяжелее, но все равно значительно меньше 2000.)

Я попробовал несколько более «тонких» подходов, но этот в итоге победил их всех. Две строки данных представляют собой просто ранжированные списки символов, которые, скорее всего, будут следовать за каждым символом, и символов, которые, скорее всего, предшествуют каждому символу (при этом орграфы, которые не встречаются в списке слов, не представлены вообще). _ and score is 2111, totalerr is 20751 используются для обозначения начала и конца слова. В качестве примера: I=raw_input a=I() while'^'<a: c=g='' while len(set(g)-set(a))<6and'_'in a: m=1879 while c in g:c='eunotitihencatpangnaottoesthesdoeitmbolocepnngcbelympvhanlrarnnccinatceaesdabceatelittlvuumineiltlatrnrttnomnnlnaildplttryliaxgtssclhemngfrssioninssenryinoeovortpcntapeetedlrruitardooiitacteutrsotdsoanedytsacnstshesmoeloluaiaceaceuhlortnegveprreanslrraneioeitslincssdsisuosycmieiebrinncrueoinytnabatepcciamenitnisecgaannehiphanotntnorvrvpcaddcdiittdnnieirsytescdeaaorfrerroleomdaeripmaandrgndipaimesctrsliavnopstmhiagamnimnlaaieceotlarscnbvnssvtaslplpisoiicinynriilirelaiohllvlndohenossvildgerltgterisahcreridsctnedainmteooeelnppeiemitceciyndetgfltrtsnatlrasrnsreiueletunsttainrctreydcpmiieecpedarulcaosoiulinrtpinoopptcpuarnioredabtilsnleoonslmltircninloaludrltrviocsatcgratduioeietnseaidltmmryalaaaorbctaglnlatatiosnloettuongaetlndesicircelunoeaofaciunhcdnnteeadtaadteairceneangugipadcrhaetftoloilisesaeaishtcinemcoleiibloyuoeiupovgtrccttsuttialnnnncatbamtrrndtperieonsavseoalncrrvvmctdmornstsunilnrscariranagloeoeciteptiplctpmadtnertslioractotlairneutorccaocletedoaammiiaurcadgdsmtmooaefmhedetvoelmoaemoaacoeieneislsaccllsunacnnspaomtdpnioocposrocniciicounnatosuvrsrodreacloapcansrsnrohlnotpiiptdneauaaatorofaatsnigiioegloreraiipaitnsssrststetomtoneifencntopxmstsruiosgopanriapiapelteeeelraaeeeipavauptneaalinnrlgipgoteienenrnfdmorouslpcaprmaeusnnnclltpcasrsitiuaictigsarsdenteetrtelnrecurupmautosotrssnisrdsnnulisrgomnpeatyotioipetalyanluatsoteoytirsmssyeatpryrtfclfnttniscloeuiaerasniracntfglaylurotngoaesuetillrrldnranosteldmpooonticteaprdcdmoecaafnftaivsmtrtlrpigcrnodueusmyepeotpnotltalgtltlvyhspphrtaliemyrtehrrdeiesoiiteptsptintnypmoinspsgiocacurarpruiardmnmrpgtpnoimtlsonpacrsnenpcinantayvryumpncyaelnrtrsisrdmnspgmarlttttptitsmeipuaervntgcunnncrtrnnitbltarssmaircptrenrerrerpceoiedchecefbrttutbumnbsnoeitaenutetreccosttofcdtgslgeaoacmicuiotelornahmticcsrdswaoignancoelrrsarnrnrrptiyadetilcricnasnoasenpstasiopdtnossrccllsoelirtfarrioemaeosioaeorcaesfnfsthklcsrdhlwakl'[int(a.replace('_','1'),36)%m];m-=6 print c;g+=c;a=I() a=I() means that "wa" is more common than "wi" is more common than "we" etc. -u , прямое сопоставление включает глобальный рейтинг, хранящийся как python ./game.py python -u ./solver.py . It's used for places where there are two unknowns in a row, or where all the digraphs in the wordlist are exhausted (so we must be dealing with a non-wordlist word).

Для каждой неизвестной позиции в слове он просматривает предыдущий символ и присваивает каждому возможному следующему символу оценку, начиная со 180 для самого высокого ранга и уменьшаясь до 80 в конце списка; затем то же самое делается для следующего символа. Все баллы всех персонажей суммируются и выбирается тот, у кого больше баллов.

После того, как буква угадана, она удаляется непосредственно из рейтинговых таблиц, поэтому ее нельзя угадать снова (пока мы не начнем новое слово и не инициализируем таблицы заново).

Обновлять: получил кучу очков, исправив ошибку (мы не удаляли буквы из обратной таблицы) и изменив способ падения очков по мере продвижения по списку.

 

Vizza


Рег
10 Jan, 2004

Тем
78

Постов
191

Баллов
591
  • 26, Oct 2024
  • #5

Python: 2046 байт, оценка=1365.

счет 1365, тотал 21343

python -u

Большая часть кода заимствована из Представление Python от nneonneo (без чего я бы не получил это ограничение в 2048 байт). Первоначально я думал, что это должно набрать еще около 200 баллов, но я обнаружил ошибку в своем инструменте создания строк данных. Теперь это исправлено, и мой результат стал гораздо более разумным — 1365.

Вместо того, чтобы создавать двоичные деревья на основе длины, я создал одно двоичное дерево для хранения информации о частоте. Дерево не имеет одинаковой глубины, поскольку нет смысла хранить информацию о частоте для чего-либо более глубокого, чем шесть неправильных предположений (но теоретически правильные предположения могут иметь глубину двенадцать для «значительно» и «неудобно»). Навигация по этому дереву неуклюжей формы осуществляется с помощью кода факториала (фактически с использованием комбинация функция). Чтобы сделать строку данных более сжимаемой, я дополнил все неиспользуемые индексы символом «s».

Я использовал сценарий для расчета хороших строк для хранения в виде d, и если кто-то сможет извлечь еще несколько символов из остальной части сценария, то вот несколько замен, которые должны привести к лучшим результатам. Верхняя строка — это строка, закодированная в приведенной выше программе.

score | length of encoded string | actual string 1365 | 1646 | ertanialuctrssssvsnoctmushsbmsmpyssssssssssssdgyssspvlshgxsmgvssndspcjssssstmplyushumrtsdnsdvvsllatsibhqyvgdkdwssucmssmssulcsmusscsssssogsdssssssspsssstlsupmsusgsdsulyncysvyssfsnhgsnyqscalusthrvpcncpssrhtpsssspsbgvfsssssobuysssdssssssssssssssscsssssssssssscsssopshcompidssbsssssysssssssssssssssgusxsssimssssssimydssssxscipyfuydhwyscbssssmsssssssssssbssdsssusssssvspmvmssssspcbissssbyitypmxcossdmcssssssssssssyssssssosvssssfcvsssssdghsssssdsmpvysssssopcmtysssssstaimcyphocvshmsysssssssssshssssskssssssocdphsssuxhssssssiocyfsssswacubsssdpuutcidmsssdppoitanoclussaodmacssspdssssspmssssssssssssssssssspssssssnpbissssssssssssssssssssfqssgssssssfdssssssvbssspumbydmsssspbsssigsssdmgysrsdvminscygsxgssssssssssgsssssodbsssssugssssodbssbcssmsssscumsspomssssfssssssssppfssbcuyrdympysssssssrsssssfsssssgkmsssmocugssmcosudhsmdssssssssspsgopssssspssfblsbvssssssynsouqssfgusssvnisssjfpysfssssmdfssssrslujsuucpombssssnsicussssopssscssmossbsdsssssssssssspssssmdsfssssssssssssfsgdhwdssssdlyssksssssysgsssssogsusssssmfssusslsuufcpyssssvyssssscyodsssmsspusssssdpssssusslubuysuumppwsssgssgidsssssdoussssssssssssspdssssozsssssdssdrscmcdomsssgospdiwudspmidsygfcsulcuysssfssssusssssshucssssschgfcsssschbmsssskuosinpmchvmpgmssssssrmucpslfpcrsssssssssssvoyssscssssscopslsspgcdflssssssrucmfgssslcpruysclysssblsgsssssscilugsdslsssvssssssupvlysssssssssssssosssscssssslgsssssdcvysssspndcssssmcsssssssssssssssssssslsssssrugssssssucnmsssscncigdpslmgshhosssssossssszrypboybsyfssmdssssssgihbudsospdcusmosmoindflyybvmfcsshrsghfowsdphossspscssssssgsssssscgssssscfmspmbhoyuhssuplsbhsssvnitocnusmdcucfmjssspssssssssssssomvsshsssssspssssssssssssssussssrgssssssolmfbsydmssssdsssssrdpsjdssssssssssssssssplasssmyssssssdsssssamlssssfssssssssssssssmpdmsssflsssssdslpyhgsrdssssssshssdlshpssssfsrsssssshrsxssssmlavssdlsnpruupysdprdliypoxmybssssssssxpmsssssssssssshguslsyssslrpflsssdbmsrcdspvsssypsamssmhsblssfssdbssssmsssssfdasssalpmsssamsshglysusssshglyspdsssunalcosydslkulbpofmdssxssssgsgufsssssdyssssdssssusmysspmdssvmsssssivsssssmpohsssshgopsssssinocdusyspvssssvssssssssssrgyssspmsvlmsrvssscfulyusdfssssssssssssssssssrpssspssrgoyssssgmhssssssssssssvssssssupssssqbvysssussysssapsuoscpmhssssssssssssdsrsssxssssssalbhmssdmsssssscmphssslfgrmchdgvdsosucdssfwsacdhsmpvvmsssssssssssplslssshrlhssmssvlbyssshdrgwkmssqcoglurspvlgcllascyphoudsrpusylfgsssspblyssssssbssssssomsslussrmvlussssfycossssssosphyssrscgshpragcscbchoralpbyssbsvdyssssssuxlssdlsssssssssssssssssssssdsssussmbdsssssamhssssssssssssssdsssssssdpssssssssssfsgsssssdlussslsusopxasmdspmssscpovdussvyslssmssussssssdmssssuspdlsssmftdglasssmalatmlocwvhpmgzssssussssssnyshsmlsunvsvlysstcnssssssssssssssspsssussssssdoyssssssfysssssshgpssssssdbunckgsssthylssycsubdssssssndsvsssssslyssugssssowssjuspxgusssshowcnuysloncsupdgfdsslsstacnslusfghwdlsbnsssspsussbyscsubssssslcghslsvddsmhssssjulynbyssssphugkousssowlcymns 1381 | 1662 | ertaniocvsplttushtpyutsudwbvumgdlatcpisppmgdsyusuqphplgpmypppplppppppuhslypppppppyvpppppsulcspommdbpppppppppppppppppppppnjpppppsgppppydncmpppppfsnhgpmuqycalinscyvpcncpppppspppppppppppppppppppposbpgpppisbhpmpgxyppppppodbdppppupppppvfpppppmulympppbusoybppfscipypslhppodbpdppppppffpppppppopfppppuppppypppmppppppppcbipppppyityfcvppppdmcpppppppppuvppppppppxbppppppocmxppldgmpyppppsmpobuppppopcmtypgpppstaimcyphpchmvxpppppplppppphpgpppkppppppocdphpppuxhpppppgiophyppppwacubpsdvmuutcivappubppoitanocluspaddmacopfpdgpppplvmpppppppppppppppppppuypppplpppppppgupppppppppppppbfqppsgpppppugpppppppvbbcpdmppppcumppbgpppppppppppprpppppmpppyppppppppppppppppppppppppppygnpppppppppppppppppppvpsfplmpyppppppppppppppbrpppxrdyppppppppppppppppppppppppppppppvyupsmpppppppppppppppcyppppcuypppppppsbpumpppspppfpsuqpgkmpponmocucuddpppcfujppmdcmcoprslujpuuppppppppbgppupppppppppppnupppfblsonppppppnsicupphbmdppppppppppppppfppppwdppppdlyppkppppppppppyppdspupdpppmfpbvpplsuppppyppgpppppogppghpppdspppuppgohdpspsdhpslubyppcumpppugppypppppufcpppvypppppyodpppppwppppppgidpppppdroupppppppppppppppppgozpppygdpppppcmcdompspfospdiwpuupmidpcppgfcpppppppppppgupppppucuhpppplchdigprmhchbmppcruuosinpmchvmpgmppdppppppppplppppplflpppppprucmfgppplcpruypbdspocgdpppppppppppppppkppblplfocdpppgxpppyppppppppppogppppcvpppplyupvlysgypppppcilybppplpcppppplgpppppdcvypppppndcrugomcpppppppppppppppppppslmphsoocdmsopppucnrypboxncigdpplmgppppppppouppppmzppppppvppppomybsdpuvgirsghfowpdcuppdppvindflyppvmfchbugdppfpcfoypgppoyuhsphopscxppppmpgoncusmpsspmbhppsupsuplbhppppvnitoclaspdcucyffqpppppppuppppppprjdpppppppomvppppppppdppppprdpppppppphsppppppmuppbpppppmyppuppsdpgsppfppolmfbppddmpppppppppmpppvppflsupppxpruyppppppppppppppppppppppppppmppppppspppppppuslpppdmlrshyppypppppmppppyhppppspafspppchpppppumpppppppmpppppppslpybpdlycsrcupsducymliypuyvybppppppppppppnpppmppdppmppppudnyoxmpmhglyppppuahglyfdapppunalcosyddlkulpuppmdpusppppvpppppppppppppppppppppbpofpppgufpppppppppppppppppppphpppppyppmdpmvpppppppsdypppsppdpprvpsvgrdgysgmrpppmpmppppxmpohpppphgopppqupinocdushppvscfurgoyfvlmfppppppmpgsppppyppppppmpxdpppbusmyppmsyypppppposcpmhsppppppppplypprpppvpppadppppppppdmppppppcmphhupgfgrmchppsalosucddpfwschdswppppxppppppddvgppluvmppprdgacdlpprvgxlfpprgwkpppphgglursplubcllascyphohmdfylppgfpcosulxpgplgpppbpbhmlvumppppvbrmyppufpyrypdpppppdosphyppgppfshpragcpvmchoralpbyppbpvdyppdplupppppmpppppdfpppppplpbypmppppppmbdpppppppppppppppppppppuppppplappppvllyppppamhspppppppppppppppppspplpppppsppppppfsgpppppdlupmppppsospxappppxuuppppppmmftpvplppppuvyppppumqppppmcpovudppddglanyppppatmlocsvotcnspppppxmgzpppppdlpppppplgpyvmwgpppbfyppphpphpgpppunpdbusvlypppthuglypncfbsppgpppwspuppppppdoypppppppppppfudppwgsdjupppcnuyppppsyupdfnpsoumytacnslupgghwdlpvlpsdpppppyoypppppxpppppphowlppypsoncvboculynbcsubpphuglcghpppplcymnpppdjdvalutcrspgppknmcpypowodppppguppppppbchgxpsysppoctmduppppsmpnryppppkppsyrhppppupprtsdnsuqlwp 1382 | 1796 | ertaniocvsluuuuuluouuuuflbvuuuurucmfguuulcpruyubuuuuuudsuuuuupgohcuuuygnuuuuuuuuuuuuuuuuuuuuuuuuuuuuouuuuuuuuuuuuuuuuuuuuyuuuuuybuuuuudmuuuuuuuuuuuuuouuuuusmuuuuuruguuuuosuuuuudmuuuuuuuuuuuusbpumuuusohuuupmrypblouoyfuuucnuuuuucfuuouupcnmoulonbuvuuuuuuybsduuusprsghuuuvqhopsuuuuuusonpuufownsicuudhbluvbuuuuuoyhuuuuuysfyuuuumpconcusmlxfmumcuuuuuuuuuuduuumuuuuuuuuuuuuuupuguuuuuoguuuuguuulrvmuuuuuuuuuuuuujvyuuduycyordpumuuuuguuuuuuuuuuuububuuusguuupwsduuuugidvbuuudouuuusdvmuugumyuuuuuufluuuuuopruyuuucdomuuuguspdiwuuupmiduumuuuuuusuuuuuuuusllpuuulrshcuuuuchidguuuuchbmuuuuuuosinpmchvmpgmuuuuuupydcumuuuslpybuugfvsrcdbuuccymcdyuuuuuuuuucgduuuuuuuuuuuuumpvuubluudncduuunhglyuguuuuhglyryguuuunalcosydulyupvuuumduuuuuuuuuuvuguuuuupvuuuuudcvkmuuupndcuuuumcuuduuuhmuuuulmpyuuduluuuuxucpmuuuuvucnmucyuxncimoculmgdurdgyuurpuuuufbuuuuugdpuuuumduuguzpgihbudvufpdcuuuurgoindflgkuvmfcpyuuuuuuuuuyuuymuuuucubvyuugsusyuuugsuuoscpmspmhbuuufusuplbhuuruvnitoclaumdcudmfuuuupcmphudugfgrmchuuuduosucduyfwschdswuuuuuuuuuspuuuuuulufcuuvrgdhuuuuprvuuuuuurgwkuuuuhgglurspyxpcllascyphoudsrpguusyguuuuuuuhguuuuubsuuuuupduuuuufmryuuuuuurypdulcuduosphypmuudfshprgfuucychoralpbyuuspadvyuuuuuuyuuuuubuuuumuuuuuuuuufsuuuuuuuuuuuuuuuuuuuukuuyuulfoyuuuuuuuuuuuuumuuuucmpuuucopuuuupgcuuuuuuuuauuuufdausuualpmuulduuuuusguuuuuuciluguuuluuuuuuuuxuumftuuuuuuuuuyuuuugsuuuuuuuuuuuuuuduuunusmyuupunvtymuyutcnsuuuuuuuumdsuuusvguuuusgmhuuymxuuuufyuuuuuuhpguuuuuqdbunckvlmuthugscfulfbsdfucpuwsuuuuuuuuuuyulyuuuuuuuuuuuuhwguuuuuuucnuyuuovuuupdfnuupluutacnsluuushwdaduuuuuuuluuuuyuuuuuuuhuuuuuxuuuuuualbhmuudvlynbuuuuuuhuguyuuuuudlcymnuvmuuuualcautlrsxgxnmcpyuhsuuuuuomduuuudsuuuuulhuuysuualvbyfughcossulquvdyluntryuuuufurtsdbfluuuomutsdyuxuuuvcyyrhtmuluguytnguuuuuuuuuuuuuuuuuuuushuuuudhpuuuufuuuuuuuuuuuuuuuuuuuumudluumbdupsluuuuliypoxmybuuuuuuuuuplauuuuvluuuuuuamhsuuuuuuuuuuuuuuuuuuuuluvuuuuuuuuuufsguuuuudluuuuuuusopxadbpuluuuuuuuuuuuuuuulubpofuuugufudmuuuuuupdluuuualdglahuuuhoatmlovavopmgzsdypuuuuuuuuuuuuuuuuuuuuuuuuuuivuuuuumpohuuuuhgopcuuuuinocdusyupvuuuucwhuuuguuuuuuuuuuuuuuuuuuuuuuuuuuufuduuuusdjuuuuuuuuuuuuuuuuspuuuuuuuucopuuuuguuuuuuulpsuuuuupypuuuuuuuuuuuuuuuuuuupsuuuuubocsuuuucsubuuuuulcghuyuuddvghuuuuuuuuuuuuuuuuuuklfuuuuowoduuuugusuuuubbchgxmpvuupoctmpuuuuusmpkuuuuuuuuuuuuuuuuusduuuuuusqulyuuusuquvuuuhltmpyuuuydtsubqlyuugdlatisbhdpmgdsuyuuuuuuuuuuuuuuuuuuuuudflyuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuslpbvfuuuuyuuuuuuuuuuuvuuuguvluudoupspumcopduuuuuuuuuuuuuuuuuuuumuuuydusuvydcuxpuuucoguuuuuuuumuuuuumuuuuulumquuuhgcpovdxyuuuuuubsouyuuuuscipyfuuvguuuuuuusuuuuuuuuuuuuubuuuuumuuuuuuuupmuuuuuuupcbhluuuuyityfcvuuuudmcuuuuuuuuuuusvluuuuuxbdoyuupocmxuuudghuuuuuusmpobuuvuuopcmsyuuuuustaimcythmlhmvuuuuuuuuuuuuuhuupuukuuuuuuocdphuuuuxhuuuuonuidouuuuuwacubuuupjgitcivauuudppoitanoclusuaddmacoufpduuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuusofquuuuuucvsyuuuuuuuuuuuuuuuuumyuuuupbspduuuhwkuuuurupcpmuuuusmvuuuuuuuuuuuuuuuuuuuujuuuuuysuuuuuususmcuuvuulcssfuucuuuuuuuuuuuuuuuubpuuudrdyuuuusguruuuuncyuhuuufsnhguuqyucalinscyvpcncvluuugpuuuupuumuuuuuuuuuuuuucugusuufuusuquuufguuuuodbuujfuuufuuuodmdfuuuurslujuuupbuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuopfuuuuuuuuumduuuuuuuuuuuuuufuuuuwduuuudlyuukuuuuuuuuuuuuvuuuuuuuuumfuuuuulsuuuupyumpyuuuuuuuuuuuuuuuuupuuuuuudpsuuuuuslubyuuuumpuuuuuuuuuuuguuuuuuuuuuuuuuuuuuuuuuuuuugouuuuuuuudruuuuuuuuuuuuuuuupubcuuumcygfcuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuugfcuuuuuuuuuuuuuuuuuuouuuuuuuduuuuuurmucpupupcrupuuuuuuuuu 1388 | 1800 | ertanioclcpruyuuuuuuuuuuuuuuuuouugohucmfguuulbvuuuuuuygnuuuuuuuuuuduouuuuuuuuuuuuuuuuuuuuyuuuuuybuuuuvsuuuuuuuuuuuuuuouuubusmuuuuurugupmuoduuuuuuuuuuuuuuuuuuuuhsouuuusouuuuuurpsumbuuyfuuuuuuuuuuuuuuonuuuusvuuuuuycfuuuucybsonuduhrsghobdvqhodmouuyuuvuuuuufwduuupslhsonpuuuuunscifyohbuvsyfuuubuuooncusmpuuumucuuuuuuuuuuuuuuuuuuuuuuuulxuuuuuuunuuuuuuuuuuumudrjduuyoduuuuuuhouuuuupombugrduplvuyuufuuogiuuuuuubuuumumyuuuuusduuugufuuuuuupwuuuubugidsguumpuuuuufluuuvbuprdmuuuusdvmuxgduuuuuuucdomuuuuyspdiospupmimdusluuuuulrshyzuuuuucuuguuhucuuuuuchlpuuucuchbmuumuuuosinpmchvmpgslpybuumuusrcduuugchmcdbuucumuumuuuupyducvuuufluucgduuuuuudnyuuuuuhglybluuuuhglyrupvuuunalcosydulkuluuuhcduuulmupvlyuuuuuuuuuuuuuuuuuucuuuuulguuuupdcvyuuuupndcuuuumcuvyuuuxuuuupmuuuuuuulucyuuuccuyuurvucmnrdgyxncigdpfumguugkmuuuumocuguzduuuupvuuuuumrpuuuuugirhbududpdcufbluuuindflyuuvmfcoyuuuuuduuuuuumpyuuucuuoscpgsuuuuuugsuuuuuumspmbmhuufusuplbhudmuvnitoclaumdcucgrmchupfhuosucduufwschdswuuumpduuuuurgduuuluuuuudgrdhuuuuprvuuuusurgwkspuuhuglurspgyucllascyphoudsrpuuuuuguuuuuuuuvuuuusbuuuhguomuxufcurmyuuuuuurypduuuuudosphypduuufshpragcycycporalpbyuubgvdyuuuudsuuufsspamuuubuuumuuuuuuuuuuufuuyhuuuuuuuuuuuuuuuuuuuuuukuuuuuuuyuuuuuuuuuuuuvuuuuulfoyuuumpuuuuuuuuuuuuucsuuuucuaopuupxauuuualpmuuufduuuuuuuuuuuuugcumftusguuuuuuciluguuuluuuuuuuuuyuugsxunyuuuuuuunvtyuuuutcnsuupmdsuduuuuuuuuuuusmyuumuuyuusvgufyusgmhuhpmxuuuuudbunckguuuthuglquyufbsvlmuuuwsscfulyuydfuuuuuuuuuuuuuuuuuwguuuuuuucnuyuuuuuuupdfnuuuluutacnsluuughwdluuuuuuuuuuuuvypamovuuuuuuuuuuuuuuusmhduuuuulyhouuualbhuguxuuunbulcymnuuusyumalutcrsuuuvmnmcpyuacdlhsuxgxuuuudvguuuugvysuuuuulnrgsuulvonhcumdyflssyrhcosulubrtsdnquuuwlputsdyuuuyuucyyrhtmuuuuxuunguuuuuuuuuuguuuuuuuuuuuuuuuuuuuuuuuuuuuuuuduuuuuuuuuuuuuuuuuhpuuuuuuuumuuuuuumbduuuuuuuuudluuuuuupsluuuuliypoxmybvluuuuuuamhsuuuuuuuuuuuuuuuuuuuuluuuuulmfbuuufsguuvuudluuuuuuusopxauupuldbuuuusuuuuuuuuluuuuuuuuuuuudmuuubpopdlugufaldglafdmualatmlocwvhpmgzuyuuuuuuvushuuhusdypuuufgyuupuuuuuuuuuuuuuuuuuivuuuuumpohuuuuhgopuuuuuinocdusyupvuuuuuuuuuuuuuuuufduuuuguuuuuusdjuuuuuuuuuuuuuuuuuuuuuuuuuucopuuusguuuuuuulpsuuuuupyuupuuuuuuuuuuuuupuuuyuuuuuubocsuuuucpsuuuuuulcghuuuusdvguuuuuuuuuuuuuuuuuuukowduuuowuuuuuugulfuuuubchgxuuuuupoctmuduuuusmpksuuuuubuuuuuuuuuuupuuuuuusqulyuuusuquuuuuhltmpyuuuydtsulpmuuugdlatisbhddkgdsypblvmpuuuuuuuuuuuuuuuuuuuluuuuupmuuuuudflyuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuvfuuuuuuuuuuuuuuuuuuuuguuuuudouuuuumcopduuuuuuuuspuuuuuuuuuuuuuuyduuuuudcuuumuucogusuvyuuuxpuuuuuuuuuuuuuumuuhuumuuuxylumquubsocpovduscipyfuuvguuuuuuyuuuuuuuuuuuuuubusuuuuuuuuuuuupmuuuuumupcbiuuuuuyityfcvuuuhdmcuusvlyuuuuuuuuuuuuuxbuuuuupocmuuuudghdoyuuusmpobuuuuuopcmtyuuuuustaimcyphshhmvuuusoumyuuulyhuuvuukuuulyuocdphuuhuxhuuupxuiophyhowlwacuboncvmuutcivauuudppoitanoclusuaddmacoufpduuwuuuuuuuuuuuuuuuuusyuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuufquuuuuuuuuuuuuuuuspduuuuushuuuuluupbuuuuuuuuuuuygruuuvpmuuuymgvuuuuupcjuuuuusduuuuuuuuuuuuuuuuuuuumuuuuuuyvuuusfusucmuuuuuulcspuuucbruuuurdyuuuuuuuuuuuuunyuuuuusguuuuuuncyuuusmfsnhguuqyucalinscyppcncpuuumupuuuuuuuuusuuuuusuquuufgguuuuuuuujfuuufuuuuumdfuuuurslujuuupuuodbuuuuuuuuuuuuuuuuuuuuuuuuuuuuodbuuuuuuuuuuuuumduuopfuuuuuuuuufuuuuwduuuudlyuukuuuuuuuuuuuuuuuuuuuuuumfuuuuvlsuuuupyuuuuuuuuuuuuuuuuumpyupuuuuuudpsuuuuuslubyuuuumpuuuuuuuuuuuuuuuuuuuuuuuuuuuguuuuuuuuuuuuuuuuuuuudruuuugouuuuuuuuuuuuuuuuuuuygfcuuupubcuuumcouuuuuuuuuuuuuuuuuugfcuuuuuuuuuuuuuuuuuuuuuuuuuuduuuuuurmpucuuupcruuuuuuuuuuuuuuuuupuuuuuuuuuluuuuuufluuuuuur 1392 | 1848 | ertaniocvslogppppppppppppppppppppppppppvypppppcyopmppmppppppppppdppppuprvppuprdgyppwrpppppgidpppppdouppppppppppppmppppppozpppppdrgoypcdcmopfpmppspdiwpdhdmidfpmpopppkbvypppspsyupppppposcpmhppchuppppppchbrmpmppuosinpmchvmpdmlpppppcmphpppgfgrmchpppdposucdpplwschpslhbppppfpcgdppppyplpppppprdgppblpprvcdpppprgwkpppphgglurspgypcllascyphoupsrvlypppgppppppppppvpppbppplgcolmpdcvyrmyppndcurypmlvmppdosphypppppfshprauypcyccoralpbyucnmvdypxncigdpblmgpsgpdppppppmpppzpvbpppdmppppsdvmpxgfgihbudppppdcuplppppindflyppvmfgvppppdppppppppgpppppcppppppgspppslpgsppppppmspmbhpppfpsuplbhppppvnitoclaumdcufmtppppppdpcumppppppppppppugpvpdppppnvtypmppmnybcppsptcnsppppppppvppvpppppppppppppphypppgupfyplmpyphpgppppppdbunckghgxthuglyycpfbsppppppwspppppppppppppvyppppppppppppwgpppppcycnsucuypppupdfnpppppptacnslupsphwdlpppymocugppgkyppppyhppppppuppppampsmhpppppflynbppppuyhugpppppppplcymnpppmpppalutcrspppppnmcpypfbppppppppppfdappppalpmyspxppppnryppppdsnhcmappppssyrhpppxppprtsdnapppwpyutsdgspppppcyyrhtmppdypppusmypppmdspvmghppupppppufcppdpppppsvgppppsgmhpppmxppppppppppppppupppppqupppppvlmgppppscfulyupdfppppppsppppppdpppppppppppppppppppplcppppgfpppppudvppppsbppppppppppppppppppppadpppppppppppppppppppphuppppxspppppalbhmppdvppppppkppppplfyoppppdvgppppvmpppppcacdlpcoxgxpppgcppppppppppppppplhppppplvbylypmdylsgpgfpcocisulxpllgpppfpppppvppppppppppppppppppppgppppppppppppppppppppppppppppppppppppppppppppppdpppppppppppppppppppppppppppmppppppmbdpppphpppppppppppppppppppppplappppvlppppamhspppppppppppppppppppplppppppppppppfsgppgppdlulugpppsopxapppplppppppppppppppplpppppuppppppdmpppppppdlpphoaldglappppalatmlocwpvpmgzpomvppvppppppphppppppppppppphupppppolmfbppdmpppppppppppppppppppppppppppppppgpppppppppppppppppppppppppppfudppppsdjuppppppdmpppppppppppppppppcopppppgpshpppplpuslppppypppppppppppppppppppphpppppphdlppppyliypoxmpblcowkdgpppppppppppppppppppppppppppppcshgpppppdguppvppppchgxppppppoctmppdbppsmusppppppppppppppppppdupppppsbpofpppsdylpppphlduymppppptsubqlypppplatisbgupmgdsusdypppfyvpypppppppppppppppppppivpppppmpohpppphgohpppppinocdusyppvppppupppppvfppppppppppppppppppppgpppppdopppppmcopdppppppppppppppspppppppppydpppppdcppppupcogupppppppppppppppppppppppppppsuppppxyppppppbsouyppppscipyfppvgpppppppppppppppppppppblfppppuppppppppmsppppbupcbimpvppyityfcvppppdmcppppppppppppppppppsxbppppppocmxpppdghpvppppsmpobpppppopcmtypppppstaimcyphpchmvppppppppppppphpppppkppdflyocdphpppuxhppppppiophyppppwacubpppvmuutcivapppsppoitanocluspaddmacopfpdpppvluppppspppppbplyppppppppppppppppppmppppppsuvypppxpuppfqpppppppppmpppppmppppplumqpppggcpopvdupppppppbppprpppppmpppypppppppppppspppppppppppppppppppmppppppppppppppppppsfhlpppsvlyppppppppppbrpppprdypppppuppppppdoypppppppppppppppppppsmpppppvppppppsyupppppsoumyppplypppppppppsppppdsuqpphfguppppxpppjfphowlppppmoncupprsldfppuppppppppppppppppppppppppppppppujppppppppppppppppppmdppppppppppppppfppppwdvsypdlyppkppppppppppppppppupspdpmfpushplsulpppypppppppppppygppppvlpppupmgvpdpsppcjpslubyppuumppppppppppppppppmupppppyvppppppsucmpppppulcsppppcdrppppppppppppppppppppnypppygsgfcppppncypppppfsnhgppqypcalinscgfpcncpppppppppppppppppcpppppdpppppprmucpppppcrppppppppppyppppppppppppodbylppppppflpppppprucmfgppplcpruypypppppppppppppppppppopfppppppppppppppppppppppppppppppoppppppppppppppppppppypuvppybppppppppppppppppppppompyppsmppppprugppppodmppppppppppppppppppphsoppppsopppppprypbopppyfppppppppppppgpouppgomoppppphwdpppppybsdpppgprsghfowdqmcopppppppppppppppppppcubppppcfoyppppoyuhpppppsfyppppmpconcusmppfmumcppppppppppppppppppppppppppppppppppppppppppppoppprjdbvppppppppppppppppdppppprdpppdsppppppgohcpppygnbppppmypppppsdpppppfpppppppppppppppppppppmppppppflpppppppruypppppppppppppppppppppppuppmppppppspppppppuslppppplrshyppppsbpumpppppppppppppppppponppppcumppppcfpyducpcnuslpybbmkfvsrcdvppccymcdyonphoppppppombppppsonppppmpnsicupudhuvbppnhglypppnyphglyrpppppunalcosydplkulppppmdpppppdppppppppppppppp 1396 | 1865 | ertaniocvsluuuuuuuuuuuuuuuuuuuuuuuvyupmucyoduuuuuuuuuuuuuuurvuugurdgyuuurpuupwuuuuuugiduuuuudouuuuuuumuuuuuufuuuuuozrgoyuduukgucmcdomudmuospdiwuuupmiduuumfouuuuusyuuuuuuuoscpmhhucuuuuuchdigurluchbmuuuuuuosinpmchvmpgmdrcguuuuugrmchuuuuuosucpmufwschdswuudulbuuupslhucgdduuuuuurdgyuuuuprvbluuuurcluuuuxhgglurspyuuuulascyphovdsrpuupvllxuuugduuuuyuuubuuucumomulguuurmdcvuuuurpndcuuuumosphyulvyufshpragcucychoralpcduubuvducnmuuguxncigdpulmguubmuuusguuuuuuzuuuuupvvbuuudmuuuusdgiuhgbduupdcuuuuuuuindflyuuvmfcuuuuuuvuuuuuuuguuuuucuuuuubgsuuuuuugsuumvuumspmbhuuufusuplbhuuyuvnitoclmftdlucyfquuuuupuuuubcucumuuuuuuuuuuunyuuuuuuunvtyuuutcnsuuuuuuuuuuuuuupuuuuuuupvuuuyuuuuuufyuuhuuuhpguuuulmdbunckguuuthuglyycafbsuuuuuuwsuuuuupyuuuuuuuuuxuuuuuuuuvywguuuuuudcnuyuuuusyupdfnucyluutacnsluupghwdlspafuyhuugkmuyuumocugudmduuuuuuuuusmhuuuuuulynbuuuuuuhuguuyuuuuulcymnuuuuuuualutcrsumpuunmcpyuuuuuumuuuuuuuauuuffdauuysalpmubnryuuuudunhcuuuuuussyrhpuuuuuurtsdnuuuuwuputsdyxuuyugcyyrhtmuuuuuuunguuuuusymuupmdsuvmuusuduuuuuuuuuudufcuusdghuuusgmhuuumxuuuuuuuuuuuuuuuuuuuuquuuuuuvlmuuuuuscfulyuudfuuuuuuuuuuuuguuuuupduuuuuuuuuuuuuuuuuuuulcuuuugfuvuuuudsuuuusbuuuuuuuuuuuuuuaduuuuuuuuuuuuuuuuuuuuhuuuuuxuuuuuualbhmuudvuuuuuuuuuuuuukyuuulfdvguuuuvmuuuuuuacdlucuxgxucopuuuupgoyuuuuuuuulhuuuuulvbycuumdylyfugfucosulxuvciluguuusguuuuuuuuuuuuuuuuuuuuuuguuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuduuuuuuuuuuuuuuuuuuuuuuuuuuumuuuuuumbduuuuuuuuuuuuhouuuuuuuuuuuuplauuuuvluuuuuuamhsuuuuuuuuuuuuuuuuuuuuluupuuuuuuuuufsguuuuudlusuuuuuspoxauvuumuuuuuuuuuuuuuuuluuuuuuuuuuuudluuuuuulafuuuugudglaouuuuuatmlocwvopmgzuuuuuupomvuuuuhuuuuuuuuuuuuupuuuuuhhuuuuuolmfbuudmuuuuuuguuuuuuuuuuuuuuuuuuguuuuuuuuuuuuuuuuuuuuuuuuuuufuduuuusdjuuuuuuuuuuuuudmuuuuuuuuuuucopuuuuguuuuuuulpsuuuuhpyuuuuuuuuuuuuuuuuuushyuuuugybocsuuupcsubuuliylcghybuuddvguuuuuuuuuuuuuuuuuuukowduuuowuuuuuuguuuuuuubchgxuuuuupoctmpuuuuusmpkuuuuusuuuuuuuuuuuuduuuuuusqulyuubsuquuuguhltmpyupoydtsubqlyuugdlatisbhdpmgdsypdxuuusdyuuuuuvuuuuuuuuuuuuvuuuuuuuuivuuuuumpohuuuuhgopuuuuuinocdusydpvuuubvfuuuuuuuuuuuuuuuuuuuuguuuuudouuuuumcopduuuuuuuuuuuuuuuuuuuuspuuyduuuuudcuuuuuucoguuuuuuuuuuuuupuuuuuuuuuuuuuhuuuuupsuuuuuuubsouyuuupscipyfuuvguuuuuuuuuuuuuuuuuuuuubuuuuuuluuuuuuupmuuuuuufpcbibuuuuyitpmvuuugudmcuuuuuuuuuuuuuuuuuuuuuuuuuuxcyouuuufycvuuususmpsblyuuuopcmtyuuuuustaimcyphvmhmvuuuuuuuuuuuvuhuuulukuuusluocdfuuuuuxhuuuuuuiophyuuuuwacubuuuvmuutcivauuudppoitanoclusuaddmacoufpduuuuuuuuuuuuuuuuspuuuuuuuuuuuuuuuuuuuuuuuuuumlyuuuusuvyuufxpuuuuuuuuuuuuuumuuuqumuuuuulumquupbgcpovduuuuuuuruuuupmuuuyuuuuuuuuuuuuuuuusuuuuuuuuuuuuuuuuuuumuuuuuuuuuuuuusfuuuuuhluuuusvlyuuuubruuuurdyuuuuuuuuuuuuuuuuuudoyuuuuuuuuuuuuusmuuuuuuuuuuuvuuuuuusyuuuuuusoumyuuulyuuupuuuuusuquudfguuuhwuuuujpxuufuuuhomdfuuuuosrpndcuuduuuuuuuuuuuuuuuuuuuuuuuuuuuuuuvuuuuuuuuuuuuuuuuuulujuuuuuuuuuuuuuuuuuumduuuuumpcuufuuuuuuuuuuuuuuudguuuuluuuuuudrunhuupuuuuuuuuuuuuuuulyyguulumcuuumrfuuuuslcnvcypypuuuuuuuuuuuuuuuuuuuuuuuuuuuuupjuuuuuupyvuuuuululcsgfyuubuuuuuuuuuuuuuuupuuuuubyuuuuusguuuuunncyuuudrfsnhguuqyucalinscyvpcncyluuuupuuuuuuuuuuuuuuuuuuuuuuugupcruuuuuuuuuuuuuuuodbuuuuuuuuuluodbuufluuuuuurucmfguuulcpruyubuuuuuuuuuuuuuuugfcuuuuuuuopfuuuuuuuuuuuuuuuuduuuuuurmucpuuuduuuuuuuuuuuuuouuuuuybuvuuuuuuuuuuuuuuuuuuouuuuusmpyuuuruguuuuodmuuuuuuuuuuuuuuuuuuuhsouuuusouuuuuurypbouugyfuuuuuuuuuuuuuuouuuuumouugouhwduuuuuybsduuugprsghfowduhospuumcouuupbcuuuuuuucuuuuuucfoyuuuuoyuhuuuuusfyuuuumpconcusmpufmumcuuuuuuuuuuuuuuuupuuuuupuuuuuuuuuuuuuuuuuuuuuuuuurjduuuuuubvuuuuuuuuuuduuuuurdpuuuuuuuudsuuuuupgohbuuuygmyuucuusduuuuufuuuuuuuuuuuuuuuuuuuuumpuuuuufluuuuuupruyuuuuuuuuuuuuuuuuuuuuuuuuuumuunuuusuuuuuuuusluuuuulrshyuuuuuuuuuusbpumuuuuuuuuuuuucuuuuuoumuuucuupyducfuuuslpcnuuufvsrcdvuuuybmcdyuyhgkbuuuhouuuuupombuuuusonpuuuuunsicuuuhbumbuuuuuuuhglyruuuumunalcosyluykuluuuuduuuuuuuuuuuuduuuuuuuuuuuuuuuuuuuug 1402 | 1909 | ertaniocvslpppkgpwppppppgidpppppumfoppuppsyppppppposcpomhppppdpppppzmcdomrpppospdiwpuupmdmipppfocmphpppgfgrmcupppdposuchphfwchcdswpppcmpoppppiuosinpmchdgpgmpppppvprvpppppdrgwkpppphgglurspyppcllascyphoudsrdscgppgppppppppppppppblppppcgpplpppprmypppppprypddlbppdsophlypupcfshprafcppymcoralpbyvlbpvdlglyppydcvypppppndcppppmcpppppppppppgpppppppplppppppcdppppppucnmppppxncigdpplmgppppppppppplpxpzppppppvpppppmdpppsppgihbudpvbpdcuqpppmpindflyppvmfcpuupppppppmftpgvmpppcdmpppusdgugxgpgscpyuppuspmnyplyfpsuplbhppppdnitoclaumvcucyfqpbhppppppppnvtypppmvfpvpppjdpbcupppppptcnspppppsthugllypppbspvppppppubcppcumpppppppppppppppppppwghppppppcubckgpxppupsycmlppnltacnspvppdhwdlppmpppphppppguppplmpypppppupppppppsmhpppxpplynblupppphugppppspamlcymnmppppvyalutcrsfyhppnmcpyppcyppppcuypppppppppppppyuspppfpnrypgkmpfnhmocugudssyrhpdpmppprtsdnppppwpputsdypppyppcayrhtmpppppppngpfblppppppppppppypppppppppppppppppmpppppppppppppppppppppuappppfdappppulpmpppdapppppppppxppppgspppppmdspdmsgmhpppplusmpppppppppdsupppppqupppppvlmpppypscfuufcldfppupgpppppppppppppyppppppppppppppppppppppppppppppvpgppppppppppppppppppppspppadpdpppppppppppppppppphulcppxpgfpppaludsppdvsbppppppppppppbhmpppdvgppppvmppppppacdlpppxgxppppppkppppppppppppplhppppplvbypplmdylfvpgfpcosulxppplgppppppcoppppppgcpppppppppppppgpppppfoypppplypppppsgpppppccilugppplppppppppppdpppppppppppppppppppppppppppmppppppmbdppppppppppppppppppppppppppplappppvlppppppamhspppppppppppppppppppplpppppphoppppfsgpppppdluppppppsopxapppplppppppppppppppplpppppuppppppdmpppppppdlppppamdglappspalatmlocwvhpmgzpspppppppppppphppppppppppppppppppppppppomvpppppppppppppppppppppppphspppppppgppppppppppppupppppgspppppolfudppdmsdjupppppppppppppppppppppppppmbpppppgcoppppplpsupppppyppppppppppppppppppppypdmpppbocsppppcsubppppplcghppshddvgphpppppfpppppppppppkowdpppowppdlppgupupslpbchliypoxmpoctmpypbppsmpkppppppppppppppgxppduppmppsqulypppsuqpvppphltmpyuppydtsubqlyupgdlatisubppmgdsuypppppppppppppppppbpofgufmppppppppppppppppppphppmppyppppppvpppppppsdyppppppdopppppppppppppppppppibhppppmpohpppmhgopppvfpinocdusyppvppppppppcopdpppdyppppppcogupppppppppppppppppppppppppphppppppxyppspppbsouyppppscipyfppvgpppppppppppppppppppppbppppppuppppsuppmppppppppcbipppppyityfcvppppdmcpppppppppppppppppppxlfbppppocmxpppdghppppbusmpompvpppopcmtypppppstaimcyphpchmvppppppspppppphpppppkppppppocdphpppuxhppppppiophyppppwacubpppvmuutcivapppdppoitanocluspaddmacopfpdpppppppvppppppppppppppppppppppppppppppppslpbyppppppppppppfqpppupppppvlupppppflyppppppppppppppbppppppppppspprpppspmpppyxpupppppppppppppppppppuvyppppumqppppmcpovdupppppppsfpppppppppppppppppppbrpppsrdyppppppppppppppppmpppppppppppppppppsmphlppppsvlyppppppppppppppppppppppppupppsppdoysuqpppfguppppppppjfpppfpppvpmdfppsyrslujpsoupppuplyppppppppppppppmypppphwppppppxpppppphowlpppmdoncvsyppfdppppfppppwdppppdlyppkppppppppppppppppupppppmfppppplsuppppypppppppppppppppppppuppupppppdpspppppslubyppuumpspdppppushpppplpppppppppppppppygppppvlpppppmgvppdrppcjpppppsdppppppppppppppygfcppmupppppyvppppppsucmpppppulcspgfccppppppppppppppppppppppnypdpppsgprmucpncypcrppfsnhgppqypcalinscyvpcncpplppppppflpppppprucmfgppplcpruypbppppppppppppppppgpppppppppodbpodbpppppppppppppppppppoppppppppppppppppppppypppppybppppopfpppppppppppppopppppsmppppprugppppodmpppppppppppppppppuvhsoppppsopppppprypbopppyfmpypppppppppppouppppmoppppphwdpppppybsdpppgprsghfowdqhospgpppppppppppppppppcppppppcfgoppppoyuhpppppsfypppompconcusmppfmmcouppppppppppppbcppppppppppppppppppppppppppppppppprjdppppppppppppppppppdppppprdppppppppppppppppppppbpppppmypppppsdpppppbvppppppppppppppppppppmppppppflppppppprsdhppyggnpppppohcpppppppppppuypppppsppppppmuslppppplrshypppppppppppppppppppppppppppcppppppumuppppppyducvpppslpybpppfvsrcdpppccsmcdyppyppppppppppppppppubpppompppppcfudnyppcnuhglynbmkpphglyrpppppunalcosydplkulpombmdppsonppppppnsicdpphbuvbppppppppppppppppppppppppppppppppppppppppppppppppuppppppppppppppppppppmpppppogrdypprppppppppppppppppppppvypppppcyodpppmfppppppprgoy

Скрипт, который я использовал для генерации строк данных: здесь, вдруг кому пригодится!

 

Shelina57


Рег
04 Apr, 2020

Тем
77

Постов
204

Баллов
649
  • 26, Oct 2024
  • #6

Python 2, оценка=2111

Беги с import sys from math import factorial as f z=lambda r,x:f(r+x)/f(r)/f(x) d='eJxtVouWwygI/dYEV03rg5Fg63z9Apo+ZtczZ5JU5HG5gP+0cyvHlhjORrI6lQpnZoq0Z8o46GO5\noJ/YE8XwpBw6UXGEcLPdM2MacpBzO8kVcr1TSttJxx5/Rg/u7h5EDJlI/jgBiRkCO1sDuWUETVci\nxkxM+junUWBQF+OeSgxUxg+B+ExnbB2hgJxp8cR5fA/dT6U7q7+Ovhf8/ahIEWrGQyR3+3X8ORKY\nnvI48vw88jClT4IDh+fh4mMQ2Nn8cWyfxpkmspj73EXYD9sfxzkwP6GKYP7ya3lQ5ZgsD30lIM6n\nZKZPkYqQzyV9bkeGgbGKeMyfUcxj96UUHOoP/IwrngrDIHtswBqFQ+YTDpftHeshJKkggNNWXd7U\nU5yw4me818L5KDjD/Lv8jyC6XldyulpFzvswm4T6faiQy0K6JmTKRyEYgZ7hrWm+VjezxuH1tcPK\nBLA8sNq7f/mHXkV4NDfeFG/0Fgp3PZErqM4s+WEXKb+ZhBQqXrH6PdE+E0SjUGWJzwfNei8KwM2L\nDdObnZ+WEt+IGcQxc73QAcYSU6q+V2XPF3NxKnhHMb0Nwj2Tc2lcGR4XMGFxL3tjoRQVe5gBL/rA\nqHpaQZqizuyoMGv5MGfEx4Q6HNMhV/nTh0WF+js35a8RZHAGeqiyfTxY2kSW4yN40NK3wvTLkq7I\nk/4QVcJedkvanSsdBTPEnjEstrUs2FHyCO3Dj14HXeUNgmQS1wI4n9YhaT1egUmATRwABYwkd4tQ\ncCTWdqPiK5ssve67F1R6mUjznIMJJRZnv3/X8bXScmHZYiiTngWOIJCnHCjG+jZBv23gXsdOWpkX\n88IRd4FSMRW+CElyPYoEOMbes+IWG4Xo60PSaNrw6nZXjPMJPks+9lgHR41S+KutQOh6ViiiWdSL\nzI1etbyiz/3qJd8bK49tmakpe/F81vL0vUmUt7+tmDBtCtnCeG5v2cDy35IZTdtKpmQJh0yCdmmM\nWgAUcZ5crBA0nnY2bd32iySehf8Om0vHwPrMY78sPL97WZQKTtZDU0Mz64SRDYTJyo6B4qiojsog\nddZ9tH/vNKwtmUYVi0F4xFOtvFnFcNmSdBYZJenOacfqNc3mcJCJM+N34wUMG06oQmuOHH1BU+NU\nvXrSIc3asfhunl5kngmyCZ6pJ4lFN8CzTm33B24TVm06WoMVFoUcP7dfNaL/f3arAp6Ta0OSsgX8\nPuAsL8/5saVdRhS5hTlkG0nJhyal7kJXlrOATf5BG2j3xd4/EySk1aTElqLB3tOupqNr4aHd+wdq\nSNz0uhJA7iFkk1Gqp0mnG8k6gcyZq74XDbRp6ZxruSfLlx9Q1xZhHNq8pYgiti2AjHyItUme1fRO\n3S1l/EzGt/9b60aQ94vt8b/79vwoML/q15lP0sZlUDw3bQvGMJkjXfKtPT3Ny9VSYXix0E1dyf50\nYdbbJteynCo8esQcfqeUrTKklKQAuXSy3ndC+RMAvqVdXQH79Yxhee12LnBXr884xPqQtr8i1jvj\n4o4aWFNbZsxNPH2GWSX1IX1IwqlFDqILelFIesMRdwQEH2TqSdcq0yHWuxSpiakW5J6UJB2OJro3\nvULus01HDncbYPWRYORC/wJ6k9G1\n'.decode('base64').decode('zip') D=len(d) R=raw_input def G(c):print c;sys.stdout.flush() def P(w): if'END'==w:exit() i,l,X=0,'e',6 r=x='' while 1: if l not in r+x: G(l);w=R() if l in w:r+=l else:x+=l;X-=1 if not(X and'_'in w):return if l in w:j=1 else:j=z(12-len(r),X) i=(i+j)%D;l=d[i] while 1:P(R()) . (Для тестирования с данным контроллером $d{''} .) Это 2044 байта кода + 1 на %d = 2045 bytes.

"w[aiehonrlsdtkfy]"

Результат

>

Как это работает

Программа заменяет все < s with $|++; while(!eof) { $l = $pg = ''; %d = "[eaitrnoslcdupmhygfbvwkxjqz]<[scpardetmfbilwhognuvjkyqz]a[tlrncsidbpgmyuvkfwxzhoj]b[leoairusytjvmb]c[oetahiulrkcysq]d[eiaourlyvdgsmfwjnhqt]e[rnaslcdtmxevpfgqiwyobhkzju]f[ieoauflrty]g[erhiaunolygsmtdb]h[eaoituyrnldmbcw]i[notsclvdagrmefbpzxkuq]j[uoea]k[einaslywftogd]l[eyialoutdfvskcmpbwnr]m[eaipombuysnftl]n[tgedcsaionvufkylmhjqwxp]o[nrumlstwpocvdgfbaikyexjh]p[reoaliptuhsymdbfw]q[u]r[eaiotymdsruncgvklpbfwh]s[teisuhpoacmlykwfqndbr]t[iearhoyultcmwnsfbpg]u[rnstliceampbgdfyok]v[eiaoyu]w[aiehonrlsdtkfy]x[pctiaehuy]y[esomatpcwbildgrn]z[eoaiy]" =~ /(.?)\[(.*?)\]/g; %r = ">[etynrldgshmkpcwfoabxui]a[retclmnphisfvwbudgoxykjz]b[aiumoerylbhgspt]c[ienaouscrxtlyh]d[neairoludhsywgpk]e[rtldsvcmnphgefibkuwyzjox]f[eifnoalrustdmkwp]g[niaeroudgykt]h[tcsgwpenrxado]i[trsldnacmfhvpugwbekoxyz]j[nbdeao]k[carnosilewu]l[aeliobpuctfsrdgnwhkym]m[oeiarumstdynlghbp]n[oieaurngwkhtmsldy]o[icrplthmsfnobdwvgejyuzak]p[msaoepuixrlynt]q[eisncd]r[eaotpuigcrbdfhwlys]s[iesaunorbydclptmkgw]t[ansicreuolthpfxbygkwmd]u[ostcqlrfdbpagnmjhixev]v[ieoanrdlb]w[oaesrtydnlkph]x[eiaon]y[ltradcnsheomfbgpkuvzxw]z[iae]" =~ /(.?)\[(.*?)\]/g; while (<>) { chomp; last if !/_/ or /^END$/; $l++ unless /$pg/; last if $l>5; s/$pg//g for values %d, values %r; $_ = "<$_>"; my %s; while (/([^_]?)_/g) { $x = $d{$1} || $d{''}; $s = 180; for (split //, $x ){ $s{$_} += $s; $s -= 100 / length $x } } while (/_([^_])/g) { $x = $r{$1} || $d{''}; $s = 180; for (split //, $x ) { $s{$_} += $s; $s -= 100 / length $x } } ($pg) = sort { $s{$b} <=> $s{$a} } a..z; print $pg, $/ } } s в текущем состоянии, обрабатывает результат как целое число по основанию 36 и принимает его по модулю 1879, давая нам грубую хэш-функцию. Он выбирает букву для угадывания, индексируя это значение хеш-функции в длинную строку букв. Если он уже угадал эту букву раньше, он уменьшает модуль на 6 (поэтому он всегда остается относительно простым, равным 36) и выбирает другую букву, повторяя это до тех пор, пока не найдет букву, которую он еще не угадал.

Я разработал эту стратегию так, чтобы в ней было много настраиваемых переменных (отдельные буквы длинной строки), большинство из которых независимо друг от друга незначительно влияют на окончательный результат. Это делает его хорошо подходящим для оптимизации в стиле восхождения на холм — я использовал Диверсифицированный поиск поздней приемки.

Python 2, оценка=2854

Благодаря свободному использованию непечатаемых байтов и встроенному сжатию мы можем втиснуть гораздо больше информации.

Декодировать с помощью import sys,re R=raw_input F=';;;topenayri;elsatrodin;eatslroncih;eastrinclodu;etnocsiralupd;enostciarldpmu;eitnoasrclupmdy;einocstarlpumdyg;itacslnorepumdgyv;intaoslecrupymdgfh;nitaoerclsmudpygfvh;itneaorscmpdlfuvybh;ratdgfihosw;;ceimontalu'.split(';') G=[''.join('.'*int(c)if i%2 else c for i,c in enumerate(re.split(r'(\d+)',w)))if w else''for w in 'eJw1momWqyyzhm8pgENc/9UoNGILSoto3Fd/nsq3zt49pBNlKKreAfzf//afbZycWkJQs6l+U8n4/smbKubuV9VNRZ3m7B/VFmNSpw41qPN/48+xn8/PcpbpnE5Vzzu7Oitnf9RtnsllFzb1TEEtZpt+lDP2fWx5o7FpjiqYe1rUY0I/20V5M/eT6r0956LmPKvJ+N+oNhP72Qd+f/pf1cZpYmihT6r1pg3RqWS9OkygzZUhx+PhUttX1S7TL28d2kSjbP6hg9hnWjBq6dV669NYF5jf2cfkGW/sg2q3+aM+Sk2qfYzabFS7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jWFW7J3Pc9jgfDCDAmT/1QBqg7eOfoT0LCLaF331q9sGu9RB63Jfvo8pCIjvOPiz85uWgvW5petswfSZdTmkCmzMjy2k896v5AG11fOSO7GRfuVP/9QoqxzAJ/Txk62UJ5Gu5gaqYbJKn8t0HZBGmLQcCiD0ygUqpsTejs+9Ik4ZtBy3FtQ7X1KrZSf32UXX/YED7spT7sqX7Abaenrd/bHysnFVIaJDF5oI0kePlJHUKgF4g+0L8O2XwMrTzmCqFl9xN/jqaRh2ddK1kJ0Pv4Y99DewyNPKN0RPyIgMp/G2z9IKfWiuV+/ve///0fiWqMOQ=='.decode('base64').decode('zlib').split(';')] while 1: w=R();i=0 if'END'==w:break f=0;l=len(w);g=set() if G[l]: while i<len(G[l]): c=G[l][i];print c;sys.stdout.flush();g.add(c);x=R();i=2*i+2-(w==x);f+=w==x;w=x if'_'not in x or f>5:i=0;break if i>=len(G[l]): for c in F[l]: if c in g:continue print c;sys.stdout.flush();x=R();f+=w==x;w=x if'_'not in x or f>5:break , and run with import sys class S(): def __init__(s): s.l=6 s.g=set() s.p='' F=[0,0,'onastifeybhmudgkprw','topenayridsubwglfhcmkxjv','elsatrodinphmcukwbfgyvjxzq','eatslroncihudpgmfbywvkqxjz','eastrinclodumphygbfvwkxjqz','etnocsiralupdmgyhfbvwkxqjz','enostciarldpmuygvhfbwxqkjz','eitnoasrclupmdyghfvbwxkjqz','einocstarlpumdygvbhfxwqkj','itacslnorepumdgyvfbhxkqw','intaoslecrupymdgfhvbqxjwz','nitaoerclsmudpygfvhbqxj','itneaorscmpdlfuvybh','ratdgfihosw',0,'ceimontalu'] s=S() while 1: c=raw_input() if c=='END':sys.exit() if '_' not in c:s=S();continue if c==s.p:s.l-=1 if s.l==0:s=S();continue s.p=c for x in F[len(s.p)]: if x not in s.g: s.g.add(x) print x try: sys.stdout.flush() finally: break . (For testing with the given controller, import sys,re R=raw_input F=';;;topenayr;elsatrodin;eatslroncih;eastrinclodu;etnocsiralupd;enostciarldpmu;eitnoasrclupmdy;einocstarlpumdyg;itacslnorepumdgyv;intaoslecrupymdgfh;nitaoerclsmudpygfvh;itneaorscmpdlfuvybh;ratdgfihosw;;ceimontalu'.split(';') G=[''.join('.'*int(c)if i%2 else c for i,c in enumerate(re.split(r'(\d+)',w)))if w else''for w in 'eJwdlA2S4yoMhK+0CpPJ28ppQPxuQFBITMq3f52JXY5TdpC69TXP50ziQ6RWKxV3stBw+XEtIXXvx4u+g5I5e1x0V+fGN236S/b0aU+7UjMNFoyOvVc8hSInersrxBWr0BUqNSchUXT835YlWCyUTtW9Q6PL1UfhRtmVR3gm72dvu/Vts3c+sqPFoSaWbUWqqi9dylLXe65MWM12/CEdkcLX6LVXU7HBuQXSqDyMKTOjgX40Dty966CXY66Q2H/r7b3b7qat2zF8NLbWZ1QpTLvXWN+1NancuPdoE8sXNi1DqrtssxY+7RzRdxUWa5FLDVPzJJnWpTZW4xN4Uay1BFvUIxNKtz2le7/N47Bt3XedKjyttQgl/dhlcfvNZaNkFN8OnsrULiPQGqeeOsZRPZVl+sXsT61413rvqr751pbIBR/CSyWWs+JLrl66li+lM1j2JVDQowzxlUeo451DGDXOnDlD5Dw+7jcrnC855BmvCr8jGpzsa1P/E0VeWqKGwWGtEKVNiodj/4mTRXtgUDQChs4k7UWZ/py7ldsbv5WZ44ugjdj735MDzpFDffPgtQruJdO6vT7rVwYMQa+dCc7xCgVyJ57+65bH6yxj43/D7cxl3vaPAS/YEGfzo/Ess2iINV5To1/5VbMqrXMsV7ZYZJU1KPAZH4rrUNA/pK8MjlCcYAipoCYryaesw1wbD6SFb2+n7YfOZ6xexOb0RZv34Kprn743BtGwYsnZXbadfX3Yw8jAFGtbYGxxc1p08LF4bbbDdYdsvA7wyPUVm3GD70u9t9I9q8oAMUPbaVdV/oXKNwNUIkCCTDyAnd46e21yAyJQFFRn35+G5i97rXeZwuW+tcPYa0VesXNAXzguNviOKGEyEbYjkT56VehF14eRgNYHSjePNnl3L3CAJsMDhNhP072ng0sRvk0Gq0LeMHqRvRUj3/xQNwt3cyBiaEH0we28VZ4LMIse/O34T32sybiAlf1sCXHEzgUNU3wiqOt74zXdqc/pOpXC1UIffoyNUCAjiyfjFb8fehue6hbaPKjXgI4RwIVgBAmXeiC5J5ihGFZKnGAFxLF/WmpxJ6HPtuXTdM1D8m3iWfKPSQFKQPEdmSL/+WA7vItr9JuMKGWsi/7kTrzGLXDoPzvy/jjxq4gMi0E+87xnz7SS+p08EXbM7h32M5QOxRNk3py6TdrHd0kftelzravf4MDBcrCGWvJu4toejG9Ok75SffANw9hp3/6Osegr6L1hfx4YRXoCVUrkXbwFecx74on+P/VTUoewuekqaRrP5/N/1MpqAw=='.decode('base64').decode('zlib').split(';')] while 1: w=R();i=0 if'END'==w:break f=0;l=len(w);g=set() if G[l]: while i<len(G[l]): c=G[l][i];print c;sys.stdout.flush();g.add(c);x=R();i=2*i+2-(w==x);f+=w==x;w=x if'_'not in x or f>5:i=0;break if i>=len(G[l]): for c in F[l]: if c in g:continue print c;sys.stdout.flush();x=R();f+=w==x;w=x if'_'not in x or f>5:break .) This is 2047 code bytes + 1 for score is 625, totalerr is 23196 = 2048 байт.

MAX_TURNS = 6 frequencies = {?t=>[3,48,145,214,252,266,249,223,191,142,63,44,16,1,0,1],?h=>[2,14,81,125,85,91,60,42,30,14,11,6,1,1],?e=>[5,49,260,316,456,408,328,279,202,125,50,32,12,0,0,1],?a=>[4,60,211,259,249,266,253,192,152,111,51,42,15,1,0,1],?n=>[4,30,120,136,214,252,238,214,189,128,59,45,16,0,0,1],?d=>[1,25,100,104,131,123,131,81,63,36,14,15,7,1],?f=>[2,13,51,58,64,67,41,40,28,18,11,9,3,1],?o=>[9,44,150,165,195,220,214,168,155,104,46,37,14,1,0,1],?r=>[1,25,140,246,312,310,263,206,150,95,45,32,11,1],?y=>[3,29,41,58,86,94,83,63,52,31,21,12,2],?u=>[2,23,67,117,126,154,107,97,85,48,27,16,2,0,0,1],?b=>[2,22,53,60,72,59,41,30,36,16,7,6,1],?i=>[3,38,143,179,223,299,270,241,205,134,64,44,16,1,0,1],?s=>[3,23,129,176,195,208,177,136,117,71,44,23,13,1],?c=>[0,12,68,122,146,194,180,163,130,85,49,25,7,0,0,1],?l=>[0,18,153,172,190,196,164,131,125,67,35,20,5,0,0,1],?g=>[1,19,42,75,82,104,78,60,39,30,12,10,0,1],?w=>[1,21,56,56,40,41,18,16,6,2,1,0,0,1],?m=>[2,10,77,68,119,94,104,76,68,45,15,17,8,0,0,1],?p=>[1,24,82,84,94,129,105,88,99,56,24,11,7],?k=>[1,6,65,37,28,24,6,10,3,4],?j=>[0,5,5,6,7,6,5,6,2,0,1,1],?x=>[0,6,4,7,15,22,13,16,9,9,2,2],?v=>[0,3,21,39,47,58,63,42,40,23,10,9,2],?z=>[0,0,3,3,3,5,2,3,0,0,1],?q=>[0,0,1,9,5,13,8,3,5,4,3,2]} while !(input=gets.chomp)['END'] current_turns = MAX_TURNS won = false chars = frequencies.keys.sort_by {|c| -(frequencies[c][input.length-2] || 0) } i=0 while (current_turns > 0) && !won c=chars[i] i += 1 puts c $stdout.flush old_input = input input = gets.chomp if input == old_input current_turns -= 1 # else # frequencies[c][input.length-2] -= 1 end won = !input[?_] end end

Результат

zlib ||answer||

Д язык программирования — мой выбор для решения этой задачи.

Немного не дотягивая до ограничения в 2048 байт, хотя в некоторых частях он слегка изменен, чтобы уменьшить отсчет байтов, вся тяжелая работа остается прекрасно читаемой. Этот решатель не очень хорош в своей работе, и я ожидаю, что его будет легко победить, но это просто для того, чтобы сдвинуть дело с мертвой точки. Приступить к делу, так сказать.

РЕДАКТИРОВАТЬ № 1: Как уже отмечалось, исходный код склонен умереть ужасной смертью, когда исчерпает все гласные. Поскольку он не работает должным образом, я заменил его несколько более грубым подходом к случайному угадыванию.

РЕДАКТИРОВАТЬ № 2: Исходный код исправлен и теперь действует.

Счет:

score is 1501, totalerr is 21608

Как это работает

Этот решатель полностью случайный. Даже случайность случайна, веселые времена!

Когда программа получает входные данные, она угадывает один случайный символ, который еще не угадан, и отправляет его в STDOUT.

Алгоритм угадывания работает следующим образом:

  1. Случайным образом выберите одну из двух групп символов (согласные или гласные).
  2. Случайным образом выберите один из двух режимов:
    • Использовать частота букв как вес в ГСЧ. Более высокая частота, скорее всего, будет выбрана.
    • Выберите символ по случайному индексу, не обращая внимания на частоту.
  3. Возвращает один символ в зависимости от режима, выбранного на шаге 2.
import sys b='eJwdVQuW4ygMvJdyGgwYtAGJQQKHOf2Wp9/rJqGxVaqP+HxUMlGx5F86/XoqsUuonzAz5cf5vqjJ6OlQudxOJR3ibJ8cwuSmsTX12daVht8ubj15miaEH/GrESXrQrXbl1K0m2hs6dRjMkp1PuS2/9JoVslkLmp2L6J6f5kij4s0nkSPni/5GZtixSuKcKd7lYvsfi7yNYxseKXqV6fURkc//KXe+P6Hc071xuZteixiSRtzMnavwNfqcydqSzb+9hMTlW/UQSNe5uRx1EVp1OhA7gXb0v+i0rKN1rYsGlWBufozlFbzP+i2KXCpNKNjfTwkytcBnv+OgoV6blJ/8NDjF6iqUd2ojqcbrScmIaurHJxs6yHjck96brZJwncsIOHhzwyemZurKFrkmpIX9yXSNGsKdF+F+rF2fam0+KAMj3YdoXFJR+nY7AL4y1jaopNuBhk6sl03pSd7x2IxoyeLO6dGedjp9V0inusji0EAyR4pBttN6dt+UR/SYBHCVwuxPZSvqNYpZhPIWXM3Segs30IFXKZKSzqDkcdORud59xVJ8o4WsJQelUqXnIAjV/2whDybo1mDmhYCeAjZV4552gSWOa5aSG3WZ0SaqZVe4Y+o7R+Ps5knum0pDGNxrKA3De3Lwo/si420aemw2g/tdq5sKN1HyltpLNeY/qPUYwsLatc/pwRq5eSwK4l5LhHEnSIZhhG9xsFqeqDMRctmTnVQRoamwUtloiLNrgV+a0uzHBKAyUYl61yD+m++GkgeW1eiuMDEoCR6504z32V9JHD25tPVHFyXOGOc+A2vABogIw9vfxWBatuHwaWggEELdS+8De8z7ZHhir70cLoQpYYDOgfMw+ASbrhnbrwQ27x4TNt/3qHBEPSmwzlagqlH5J4Bk2FBqEvc9fXORUnnnceiMAc2kALwNdOB4W87eAw2uAwsIncpu+IYutsJwsJ/JfusCZNipqyL8uwjNHuDN3MJQBSg/Sr1ppByfD9RWaAt/QhLGDDv2C1PxSvBbfyEFqNO5ZwZpE2yqd2PjEwueV1aJoBdGxNjSl8klx3nuWAAxgCxKePt0bykLrCcQWspM61K3qcNuJYa53VMBWKNJCsrYkzZGfZf49fotx3ZYURvyYQ+GR6iOVCfT6fB4hkehfOws/k3PjFo82ZgaE60TxccO4DqKEKDVXSsuknSmuzZwB8C+h7YBS3oaRPSyGvurfnNvM2bMustIxXMYsM/WdvAvLn8hIx5CMCJQxEM2P2yLuyWYHvZziC+T8IWooeMVWDnvoF6wcETdOUVYBFcFdCop/CJ07RpwyjNy1kslHYwdfNxGYGtX4lWduETDAFIeLJntoAk/sjHlLI5tIwp6mcLF5gxJOR2eugsO5/fey0EhMb72J+mrwyB3rkw2eT0cCPuAOUc5cw/b7mQi8942Eaig4nkYUE9xi3D+FTVRxd80XLL9MXhgISod0JBHxjPPCNirRsh/0TgWdrB/6u01zHbvUnBDc4yhknZxCXgrgSWdv8h1oQR3q8hjdbbE5zK6e4U9nhNkHxCwjCdN26sS9+BIMPe7+EDExPGccPLQYvC8+SY1ioz3AxVUWfdJi3RNjjEMyiWq31CjITE1cQPTO5En39bkFEzri7c2f8Dkow6qw=='.decode('base64').decode('zlib').split(';') R=raw_input def G(c):print c;sys.stdout.flush() def P(w): if'END'==w:exit() d=b[len(w)].split(':');l=len(d[0]);p=f=0 while p<l: G(d[0][p]);x=R();r=w==x;w=x;f+=r;p+=p+1+r if'_'not in x:return for c in d[p-l+1]+'zq': G(c);x=R();r=w==x;w=x;f+=r if'_'not in x or f>5:break while 1:P(R())
 

Handsfreet89


Рег
18 Oct, 2008

Тем
64

Постов
212

Баллов
542
Тем
403,760
Комментарии
400,028
Опыт
2,418,908

Интересно