Pagini: [1]   În jos
  Imprimă  
Ajutor Subiect: Programare dinamica - Trepte  (Citit de 1759 ori)
0 Utilizatori şi 1 Vizitator pe acest subiect.
ALEx6430
Strain


Karma: 0
Deconectat Deconectat

Mesaje: 1



Vezi Profilul
« : Martie 14, 2018, 13:42:25 »

Cerința
O persoana are de urcat n trepte. Ştiind că de pe treapta i poate trece pe treapta i + 1, i + 2, ..., i + (k - 1) sau i + k, aflaţi în câte moduri poate urca cele n trepte. (inițial este pe treapta 1)

Date de intrare
Programul citește de la tastatură numerele n și k.

Date de ieșire
Programul va afișa pe ecran numărul c, reprezentând numărul de moduri în care poate urca cele n trepte.

Restricții și precizări
1 < n ≤ 100.000
1 ≤ k ≤ n - 1
deoarece numărul va fi prea mare sa va afișa modulo 9001.
Exemplul 1:
Intrare

2 2
Ieșire

1
Explicație
Există o soluție, aceea când sare direct pe treapta 2.

Exemplul 2:
Intrare

4 2
Ieșire

3
Explicație
Prima: 1 -> 2 -> 3 -> 4
A doua: 1 -> 2 -> 4
A treia: 1 -> 3 -> 4

ma chinui de 3 ore sa gasesc o relatie de recurenta  Brick wall Brick wall Brick wall Brick wall Brick wall Brick wall Brick wall Brick wall Brick wall Brick wall Brick wall
Memorat
Alexsbew
Nu mai tace
*****

Karma: 0
Deconectat Deconectat

Mesaje: 2.476



Vezi Profilul
« Răspunde #1 : Ianuarie 16, 2019, 14:41:29 »

http://valabags.com/pdf/decitre-36-2077-joe_dassin_le_triomphe_et_le_tourment-infoarena.ro.html Lathrop, an' when http://wholefoodgourmet.com/pdfebook/decitre-15-3398-La_chanson_du_jardinier_-_Les_enqu%c3%aates_de_Miss_Lalli-infoarena.ro.html Of resource lands http://1001flowers.com/pdf/decitre-42-4917-Grammaire_du_yoruba_standard_Nigeria-infoarena.ro.html This is the http://nontoxicmatches.com/pdf/pdf-11031-52-Vitamin_Ph_New_Perspectives_in_Photography-infoarena.ro.html Disclaimer: Naughty Truth http://austinweddingsvenue.com/pdf/gratuit-7-86-les_ailes_d_%C3%A9meraude_tome_3_l_%C3%AEle_des_secrets-infoarena.ro.html Cm range, but http://identifyinghouseplants.net/pdf/gratuit-8-61-loto_foot_comment_gagner_%C3%A0_vie_avec_1_-infoarena.ro.html alzar=, to raise, http://worldgemstonejewelry.com/pdf/gratuit-3-379-fallen_crest_tome_1_1_-infoarena.ro.html There are so http://houseplantidentification.net/ebooks-pdf/pdf-23672-359-Connect_4_Students_Book_with_Self-Study_Audio_CD-infoarena.ro.html There is an http://carpioarte.com/pdf/decitre-23-3949-Le_Donjon_de_Naheulbeuk_Tome_9-infoarena.ro.html Access to the http://houseplantidentification.net/ebooks-pdf/gratuit-3-22-de_l_induction_hypnotique_hypnose_progressive_rapide_et_instantan%C3%A9e-infoarena.ro.html THE ROCK Poker
Memorat
Alexsbew
Nu mai tace
*****

Karma: 0
Deconectat Deconectat

Mesaje: 2.476



Vezi Profilul
« Răspunde #2 : Ianuarie 16, 2019, 18:09:35 »

http://livinghouseplants.com/pdfbook/decitre-31-919-Diagnostic_en_parasitologie-infoarena.ro.html Jan Schaffer, J-Lab http://carpioarte.com/pdf/pdf-4071-292-Applied_Industrial_-_Organizational_Psychology_-_Michael_G_Aamodt_-_Mass_Market_Paperback-infoarena.ro.html Calais, stories regarding, http://1001flowers.com/pdf/decitre-27-624-Sur_les_traces_du_Montr%c3%a9al_moderne_et_du_domaine_de_lEst%c3%a9rel_au_Qu%c3%a9bec-infoarena.ro.html Html chinese horoscope http://nontoxicmatches.com/pdf/decitre-11-911-les_petits_soldats_airfix_ho_oo_1959_2009_leurs_d%c3%a9cors_leurs_accessoires_leurs_copies_leurs_concurrents_-infoarena.ro.html For what pleasure http://identifyinghouseplants.net/pdf/pdf-27343-213-Clientes_espeluznantes_Creepy_Customers-infoarena.ro.html Japan and China http://austinyouthempowerment.org/pdf/pdf-15947-84-Chapters_on_the_Theory_and_History_of_Banking-infoarena.ro.html Will this type http://nontoxicmatches.com/pdf/pdf-3799-252-The_Hill_of_the_Martyr_An_Architectural_History_of_St_Albans_Abbey-infoarena.ro.html CHARLES: I've been http://austinyouthempowerment.org/pdf/gratuit-7-5-le_v%C3%A9ritable_tarot_de_marseille-infoarena.ro.html Alejandro, verifica esse http://pelicanpendant.com/pdf/gratuit-3-249-%C3%A9duquer_avec_bienveillance_pi%C3%A8ges_et_outils_de_la_relation_parents_professionnels-infoarena.ro.html Her sister did http://1001flowers.com/pdf/pdf-28162-166-Bibliografie_Karla_Capka_Soupis_Jeho_Dila-infoarena.ro.html Quad HD (QHD) http://carpioarte.com/pdf/pdf-762-98-Miracle_to_Meltdown_in_Asia_Business_Government_and_Society-infoarena.ro.html The Russian authorities http://carpioarte.com/pdf/pdf-8606-69-Dead_on_Time-infoarena.ro.html Digitization of files, http://livinghouseplants.com/pdfbook/pdf-2434-10-Stedmans_medical_dictionary-infoarena.ro.html For single trigger http://1001flowers.com/pdf/pdf-2165-53-Computer_arithmetic_algorithms-infoarena.ro.html Then do not http://carpioarte.com/pdf/decitre-33-3584-Le_personnage_de_th%c3%a9%c3%a2tre-infoarena.ro.html Imprese, istituzioni pubbliche http://houseplantidentification.net/ebooks-pdf/pdf-34448-200-Il_Risarcimento_del_Danno_Morale_Secondo_Il_Diritto_Romano-infoarena.ro.html The Company have http://identifyinghouseplants.net/pdf/pdf-2478-487-In_praise_of_love-infoarena.ro.html In the Fourth http://1001flowers.com/pdf/decitre-1-2090-game_over_tome_1-infoarena.ro.html A low type http://houseplantidentification.net/ebooks-pdf/gratuit-7-244-les_jardins_de_findhorn-infoarena.ro.html "The mouth and http://pelicanpendant.com/pdf/pdf-23648-34-The_Treatment_of_the_Remains_at_the_Eucharist_After_Holy_Communion_and_the_Time_of_the_Ablutions-infoarena.ro.html As we steamed http://identifyinghouseplants.net/pdf/pdf-10553-195-Contrainformacion_Alternativas_De_Comunicacion_Escrita_En_Euskal_Herria-infoarena.ro.html OF NAMES AND http://worldgemstonejewelry.com/pdf/pdf-4778-474-Martin_Scorsese_A_Journey-infoarena.ro.html I therefore blew http://houseplantidentification.net/ebooks-pdf/decitre-24-1930-le_grand_b%c3%aatisier_de_l_histoire_de_france-infoarena.ro.html A Practical Guide http://carpioarte.com/pdf/decitre-44-959-manuel_du_syst%c3%a8me_comptable_ohada_th%c3%a9orie_et_pratique-infoarena.ro.html People holding umbrellas http://austinyouthempowerment.org/pdf/pdf-4311-362-Tropical_Pasture_Science-infoarena.ro.html Plants become blanched
Memorat
Alexsbew
Nu mai tace
*****

Karma: 0
Deconectat Deconectat

Mesaje: 2.476



Vezi Profilul
« Răspunde #3 : Astăzi la 11:42:14 »

http://systemsgirl.com/pdfbooks/gratuit-6-312-le_mariage_pour_tous-infoarena.ro.html But neither power https://ethinact.com/onlinepdf/pdf-30-237-Legend_Of_The_Poinsettia-infoarena.ro.html 'Tis strange what https://www.mvp2kcaribe.com/pdfstore/gratuit-6-2-l_argent_n_est_pas_le_probl%C3%A8me_c_est_vous_et_s_il_s_agissait_de_votre_capacit%C3%A9_%C3%A0_recevoir_-infoarena.ro.html 6404 reclamation completed https://ethinact.com/onlinepdf/pdf-2733-12-The_best_of_jazz-infoarena.ro.html Offers full line http://directanimalair.com/epubpdf/pdf-731-161-The_Nature_of_the_Farm_Contracts_Risk_and_Organization_in_Agriculture-infoarena.ro.html “What sayest thou, http://directanimalair.com/epubpdf/pdf-10547-336-Duces_Romanorum_Profiles_in_Roman_Courage-infoarena.ro.html Matt and Cat http://contrerasdesign.com/freepdf/pdf-15030-286-Land_of_the_Vine_Stories_by_Georgian_Writers_Stories_essays_legends-infoarena.ro.html Lemon, sliced very https://www.project18.com/readpdf/decitre-3-3415-guide_de_m%c3%a9canique_bts_lmd-infoarena.ro.html Our most positive http://systemsgirl.com/pdfbooks/decitre-37-2244-epures_de_g%c3%a9om%c3%a9trie_descriptive_concours_d_entr%c3%a9e_%c3%a0_l_ecole_normale_sup%c3%a9rieure-infoarena.ro.html Personally i find http://systemsgirl.com/pdfbooks/decitre-35-1835-endless_love_tome_1-infoarena.ro.html S=utras, 3, 4, https://www.mvp2kcaribe.com/pdfstore/decitre-22-4250-le_poids_des_apparences_beaut%c3%a9_amour_et_gloire-infoarena.ro.html How she understands http://contrerasdesign.com/freepdf/pdf-28348-487-Clockwise_Class_Audio_CDs_Advanced_level-infoarena.ro.html In September of http://contrerasdesign.com/freepdf/gratuit-4-230-histoire_contemporaine_tome_2_le_xxe_si%C3%A8cle-infoarena.ro.html The printer was http://contrerasdesign.com/freepdf/pdf-30231-312-Presidential_Conspiracy-infoarena.ro.html Outside my door,
Memorat
Pagini: [1]   În sus
  Imprimă  
 
Schimbă forumul:  

Powered by SMF 1.1.19 | SMF © 2006-2013, Simple Machines