|
|
Показать все ветки Спрятать все ветки Показать все сообщения Спрятать все сообщения | Is it solvable without long arithmetic? | Lomir | 1547. Перебор паролей | 5 авг 2018 03:53 | 5 | I Solved it with java BigInteger. Is there any solutions without long arifmetic? Only with java BigInteger :) Even if you manage to operate with letters directly, your code will turn into some weird base-26/27 long arithmetics with those letters as digits. I'm solve it with long arithmetics on C++ | Possible way to solve it (long arithmetic ) | Mahilewets | 1547. Перебор паролей | 14 май 2017 22:02 | 1 | Calculate powers of 26 and prefix sums of powers of 26. Calculate ranges by integer division. Calculate each password from left to right like you would calculate k-permutation using factorial digit system. | WA#6 | yaretsd | 1547. Перебор паролей | 15 мар 2012 23:34 | 6 | WA#6 yaretsd 12 май 2007 03:36 Re: WA#6 DixonD (Lviv NU) 8 мар 2008 19:26 I got also WA at #6 and made some tests on the input. It seems that the line if (N == 34 && M == 49) while (1); got TLE (6) so the test is 34 49. My answer to this test is a-niaacgvtxwdouniwkovyjlpaaaerlqkyo niaacgvtxwdouniwkovyjlpaaaerlqkyp-aaarepihxnlfzhjsqrzpokzcbpyfypjwat aaarepihxnlfzhjsqrzpokzcbpyfypjwau-aqaaaaaaaaiiovpgvvmsnhsbbrtjgmuqbw aqaaaaaaaaiiovpgvvmsnhsbbrtjgmuqbx-bejdhnxluhaaainzrkuauccrqbastmtecb bejdhnxluhaaainzrkuauccrqbastmtecc-bssejrqozpnkflharcuholuvjdvwynyaaa bssejrqozpnkflharcuholuvjdvwynyaaa-chbflvjseyarrdiqpnyomjekfzqbtgnktz chbflvjseyarrdiqpnyomjekfzqbtgnkua-cvkgnzcvkgnzcvkgnzcvkgnzcvkgnzcvkm cvkgnzcvkgnzcvkgnzcvkgnzcvkgnzcvkn-djthqcvyppbgonlwmkhcidxnzrelirsgaz djthqcvyppbgonlwmkhcidxnzrelirsgba-dycisgpbuxooafnmkvljgbhcwmyqdkhqrm dycisgpbuxooafnmkvljgbhcwmyqdkhqrn-emljukifaapbxjvblttjroekmwfuxvlxyx emljukifaapbxjvblttjroekmwfuxvlxyy-faukwobifopcxpqshrtxbwaaaxbkkpmjnr faukwobifopcxpqshrtxbwaaaxbkkpmjns-fpdlyrulkxckjhsigcydztjvnaayrhdnnv fpdlyrulkxckjhsigcydztjvnaayrhdnnw-gdmnachtlazghlttujryytfbucbeeqsbil gdmnachtlazghlttujryytfbucbeeqsbim-grvoczgrvoczgrvoczgrvoczgrvoczgrvv grvoczgrvoczgrvoczgrvoczgrvoczgrvw-hgepfczvawqgsjxebkkytlmodnpsxrwcmh hgepfczvawqgsjxebkkytlmodnpsxrwcmi-hunqhgsygfdoebytzvpfriwdajjxsklnct hunqhgsygfdoebytzvpfriwdajjxsklncu-iiwrjkmblnqvpuajygtmpgfrxfecndaxtf iiwrjkmblnqvpuajygtmpgfrxfecndaxtg-ixfslofeqwedbmbzwrxtndpguayhhvqijr ixfslofeqwedbmbzwrxtndpguayhhvqijs-jlotnryhwerknedpvdcalayvqwsmcoftaa jlotnryhwerknedpvdcalayvqwsmcoftaa-jzxupvrlbnerywfftoghiyiknsmqxgvdqp jzxupvrlbnerywfftoghiyiknsmqxgvdqq-kogvrzkogvrzkogvrzkogvrzkogvrzkohb kogvrzkogvrzkogvrzkogvrzkogvrzkohc-lcpwuddrmefgwgilqkovetbohkbamrzyxn lcpwuddrmefgwgilqkovetbohkbamrzyxo-lqyxwgwurmsohykbovtccqldefvfhkpjnz lqyxwgwurmsohykbovtccqldefvfhkpjoa-mfhyykpxwvfvtqlrngxjanusbbpkcdeuel mfhyykpxwvfvtqlrngxjanusbbpkcdeuem-mtraaaaaaadyagcaylnbwefjfiwhlkxzyt mtraaaaaaadyagcaylnbwefjfiwhlkxzyu-niaaaaaamqmtnchcwhigpdmsazucrszvdb niaaaaaamqmtnchcwhigpdmsazucrszvdc-nwjcevvhmutscsqniokdufxkroxymgzaaa nwjcevvhmutscsqniokdufxkroxymgzaaa-oksdgzoksdgzoksdgzoksdgzoksdgzoksh oksdgzoksdgzoksdgzoksdgzoksdgzoksi-ozbejdhnxluhaabhlcxuvdfatyrziklvtv ozbejdhnxluhaabhlcxuvdfatyrziklvtw-pnkflharcuholuvjdvwynyaabjmfvzjyxn pnkflharcuholuvjdvwynyaabjmfvzjyxo-qbtgnktuicuvxmwzchbflvjseyarrdiqpr qbtgnktuicuvxmwzchbflvjseyarrdiqps-qqchpomxnlidjeypacedivahvrcqaaaaaa qqchpomxnlidjeypacedivahvrcqaaaaaa-relirsgastvkuxaezdjthqcvyppbgonlwp relirsgastvkuxaezdjthqcvyppbgonlwq-rsujtvzdycisgpbuxooafnmkvljgbhcwnb rsujtvzdycisgpbuxooafnmkvljgbhcwnc-shdkvzshdkvzshdkvzshdkvzshdkvzshdn shdkvzshdkvzshdkvzshdkvzshdkvzshdo-svmlydlkitjhdzfaukwobifopcxpqshrtz svmlydlkitjhdzfaukwobifopcxpqshrua-tjvnacjothflsugpqhyezmsbiabaabensx tjvnacjothflsugpqhyezmsbiabaabensy-tyeockxqtkjwbjigrhfbxcysiulzgdmnax tyeockxqtkjwbjigrhfbxcysiulzgdmnay-umnpeoqtysxdnbjwpsjivaihfqgeawbxrj umnpeoqtysxdnbjwpsjivaihfqgeawbxrk-vawqgsjxebkkytlmodnpsxrwcmaivorihv vawqgsjxebkkytlmodnpsxrwcmaivorihw-vpfriwdajjxsklncmorwqvbkzhunqhgsyh vpfriwdajjxsklncmorwqvbkzhunqhgsyi-wdoskzwdoskzwdoskzwdoskzwdoskzwdot wdoskzwdoskzwdoskzwdoskzwdoskzwdou-wrxtndpguayhhvqijlabeukemqvwvdoaaa wrxtndpguayhhvqijlabeukemqvwvdoaaa-xgguphijzjlotnryhwerknedpvdcaaaaud xgguphijzjlotnryhwerknedpvdcaaaaue-xupvrlbnerywfftoghiyiknsmqxgvdqjmd xupvrlbnerywfftoghiyiknsmqxgvdqjme-yiywtouqkamdqxveesnfghxhjmrlpwfucp yiywtouqkamdqxveesnfghxhjmrlpwfucq-yxhxvsntpizlcpwuddrmefgwgilqkovetb yxhxvsntpizlcpwuddrmefgwgilqkovetc-zlqyxwgwurmsohykbovtccqldefvfhkpjn zlqyxwgwurmsohykbovtccqldefvfhkpjo-zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz Can anyone write the correct answer? Thank you Edited by author 19.03.2008 18:53 I don't understant what's wrong, here are the number of pieces each processor has: 34 49 27285448088939550474430463423979178157730683277 27285448088939550474430463423979178157730683277 27285448088939550474430463423979178157730683277 27285448088939550474430463423979178157730683277 27285448088939550474430463423979178157730683277 27285448088939550474430463423979178157730683277 27285448088939550474430463423979178157730683277 27285448088939550474430463423979178157730683277 27285448088939550474430463423979178157730683277 27285448088939550474430463423979178157730683277 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 27285448088939550474430463423979178157730683276 (26^34) % M = 10 so I distributed the 10 remaining strings on the first processors, according to the sample test (when the remainder was 2) Any hint? solved! 'bssejrqozpnkflharcuholuvjdvwynyaaa' on processor 5 and 6 is obviously wrong Re: WA#6 IgorKoval(from Pskov) 15 мар 2012 23:34 input: 34 49 output: a-niabcscehmgkraoxkdfwwinvutdtrojpm niabcscehmgkraoxkdfwwinvutdtrojpn-abrbdglfjpznwjcevvhmutscsqniokdufz abrbdglfjpznwjcevvhmutscsqniokduga-aqacfkeioymvibduugltsrbrpmhnjctewm aqacfkeioymvibduugltsrbrpmhnjctewn-bejdhnxluhacttfksrqaqolgmibsdvipmz bejdhnxluhacttfksrqaqolgmibsdvipna-bssejrqozpnkflharcuholuvjdvwynyadm bssejrqozpnkflharcuholuvjdvwynyadn-chbflvjseyarrdiqpnyomjekfzqbtgnktz chbflvjseyarrdiqpnyomjekfzqbtgnkua-cvkgnzcvkgnzcvkgnzcvkgnzcvkgnzcvkm cvkgnzcvkgnzcvkgnzcvkgnzcvkgnzcvkn-djthqcvyppbgonlwmkhcidxnzrelirsgaz djthqcvyppbgonlwmkhcidxnzrelirsgba-dycisgpbuxooafnmkvljgbhcwmyqdkhqrm dycisgpbuxooafnmkvljgbhcwmyqdkhqrn-emljukifagbvlxpcjgpqdyqrtisuycxbhz emljukifagbvlxpcjgpqdyqrtisuycxbia-faukwobifopcxpqshrtxbwagqemzsvmlyl faukwobifopcxpqshrtxbwagqemzsvmlym-fpdlyrulkxckjhsigcydztjvnahenobwox fpdlyrulkxckjhsigcydztjvnahenobwoy-gdmnavnoqfpruztyeockxqtkjwbjigrhfj gdmnavnoqfpruztyeockxqtkjwbjigrhfk-grvoczgrvoczgrvoczgrvoczgrvoczgrvv grvoczgrvoczgrvoczgrvoczgrvoczgrvw-hgepfczvawqgsjxebkkytlmodnpsxrwcmh hgepfczvawqgsjxebkkytlmodnpsxrwcmi-hunqhgsygfdoebytzvpfriwdajjxsklnct hunqhgsygfdoebytzvpfriwdajjxsklncu-iiwrjkmblnqvpuajygtmpgfrxfecndaxtf iiwrjkmblnqvpuajygtmpgfrxfecndaxtg-ixfslofeqwedbmbzwrxtndpguayhhvqijr ixfslofeqwedbmbzwrxtndpguayhhvqijs-jlotnryhwerknedpvdcalayvqwsmcoftad jlotnryhwerknedpvdcalayvqwsmcoftae-jzxupvrlbnerywfftoghiyiknsmqxgvdqp jzxupvrlbnerywfftoghiyiknsmqxgvdqq-kogvrzkogvrzkogvrzkogvrzkogvrzkohb kogvrzkogvrzkogvrzkogvrzkogvrzkohc-lcpwuddrmefgwgilqkovetbohkbamrzyxn lcpwuddrmefgwgilqkovetbohkbamrzyxo-lqyxwgwurmsohykbovtccqldefvfhkpjnz lqyxwgwurmsohykbovtccqldefvfhkpjoa-mfhyykpxwvfvtqlrngxjanusbbpkcdeuel mfhyykpxwvfvtqlrngxjanusbbpkcdeuem-mtraaojbcdtdfinhlsbpylegxxjowvueux mtraaojbcdtdfinhlsbpylegxxjowvueuy-niabcscehmgkraoxkdfwwinvutdtrojplj niabcscehmgkraoxkdfwwinvutdtrojplk-nwjcevvhmutscsqniokdufxkroxymgzabv nwjcevvhmutscsqniokdufxkroxymgzabw-oksdgzoksdgzoksdgzoksdgzoksdgzoksh oksdgzoksdgzoksdgzoksdgzoksdgzoksi-ozbejdhnxluhacttfksrqaqolgmibsdvit ozbejdhnxluhacttfksrqaqolgmibsdviu-pnkflharcuholuvjdvwynyadicgmwktfzf pnkflharcuholuvjdvwynyadicgmwktfzg-qbtgnktuicuvxmwzchbflvjseyarrdiqpr qbtgnktuicuvxmwzchbflvjseyarrdiqps-qqchpomxnlidjeypasfmjsthbtuwlvybgd qqchpomxnlidjeypasfmjsthbtuwlvybge-relirsgastvkuxaezdjthqcvyppbgonlwp relirsgastvkuxaezdjthqcvyppbgonlwq-rsujtvzdycisgpbuxooafnmkvljgbhcwnb rsujtvzdycisgpbuxooafnmkvljgbhcwnc-shdkvzshdkvzshdkvzshdkvzshdkvzshdn shdkvzshdkvzshdkvzshdkvzshdkvzshdo-svmlydlkitjhdzfaukwobifopcxpqshrtz svmlydlkitjhdzfaukwobifopcxpqshrua-tjvnahenobwoprgqswauzfpdlyrulkxckl tjvnahenobwoprgqswauzfpdlyrulkxckm-tyeockxqtkjwbjigrhfbxcysiulzgdmnax tyeockxqtkjwbjigrhfbxcysiulzgdmnay-umnpeoqtysxdnbjwpsjivaihfqgeawbxrj umnpeoqtysxdnbjwpsjivaihfqgeawbxrk-vawqgsjxebkkytlmodnpsxrwcmaivorihv vawqgsjxebkkytlmodnpsxrwcmaivorihw-vpfriwdajjxsklncmorwqvbkzhunqhgsyh vpfriwdajjxsklncmorwqvbkzhunqhgsyi-wdoskzwdoskzwdoskzwdoskzwdoskzwdot wdoskzwdoskzwdoskzwdoskzwdoskzwdou-wrxtndpguayhhvqijlakmpuoszixfsloff wrxtndpguayhhvqijlakmpuoszixfslofg-xgguphijzjlotnryhwerknedpvdcalayvr xgguphijzjlotnryhwerknedpvdcalayvs-xupvrlbnerywfftoghiyiknsmqxgvdqjmd xupvrlbnerywfftoghiyiknsmqxgvdqjme-yiywtouqkamdqxveesnfghxhjmrlpwfucp yiywtouqkamdqxveesnfghxhjmrlpwfucq-yxhxvsntpizlcpwuddrmefgwgilqkovetb yxhxvsntpizlcpwuddrmefgwgilqkovetc-zlqyxwgwurmsohykbovtccqldefvfhkpjn zlqyxwgwurmsohykbovtccqldefvfhkpjo-zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz | To admin:please add this test. | yuyan | 1547. Перебор паролей | 9 апр 2009 15:21 | 2 | The test is 2 27 I found that some AC solution output like that: a-z {-az ba-bz It means that the testdatas do not strong enough. Please add this. By the way,I guess the test 10 may be have some characters that do not in ['a'..'z','-'] Please check it. At last,sorry for my poor English. Thank you. Test 10 is correct.I'm sorry. | WA #9 | kkk1860 | 1547. Перебор паролей | 26 ноя 2007 22:05 | 2 | WA #9 kkk1860 12 окт 2007 14:48 I attempted to solve this problem using c++, but I got WA #9, I want to ask a question that if there is no key to compute, how to output it, such as input 1, 30. The first 26 CPUs should test one password, and the last 4 got nothing ,so how can I output it? You've been assured that there'll be no input where M< the tot no of words possible. Did you write the program without using long arithmetic? Coz i program in c++ and cant think of a way to handle integers of the order of 10^50. Let me know if you know any method or have implemented any class to handle such numbers. |
|
|
|