ultima problemă
grupă: micăsursă: OMI 2016
ultimul articol
autor: Prof. Radu Vişinescu
ultimul software
autor: Prof. Emanuela Cerchez
.campion
vecini
Timp maxim de executie/test:
0.1
secunde
Memorie totala disponibila/stiva:
16 MB/1 MB
Sa se determine
cate siruri de lungime n cu elemente
din multimea {0 , 1 ,
2 } au proprietatea ca diferenta
dintre oricare doua elemente vecine in sir este cel mult egala cu 1 .
Date
de intrare
Fisierul de intrare vecini.in
contine pe prima numarul natural n .
Date de
iesire
Fisierul de iesire vecini.out
va contine o singura linie pe care va fi scris un numar natural reprezentand
solutia problemei.
Restrictii
si precizari
0 < n <= 2000
Solutia va avea cel mult
1000 cifre.
Exemplu
vecini.in
vecini.out
Explicatie
3
17
Cele 17
solutii sunt:
000
001
010
011
012
100
101
110
111
112
121
122
210
211
212
221
222
prof. Emanuela
Cerchez
Liceul de Informatica
"Grigore Moisil " Iasi
Contact:emanuela.cerchez@gmail.com
Articole recomandate
Probleme recomandate
De la .campion 2007 : perechi , teanc , index , light , copaci , teren , pizza , grupe , cod , ecran , drum , soldati , factura , palma , decript , lbd , aven , cs , h , trenuri , sort , spam , complex , parent , holo , tren2 , gray , siruri , arce , pasi , cifre , mgo , firma , joc , cartonase , vikingi , anagrame , balbe , balaur , tribile , conflicte , criptmat , mesaj , maxim , magic3 , desen , plimbare , cutie , patrate , party , vagoane , robot , astre , trains , numere2 , friends , tricouri , furtuna , net , baby , scaune , 3d , axa , bile2 , vmem , pahare , termen , sablon , zapada , cuvinte , excursie , hd , pajura , pc , sir , cadere , pioni De acelaşi autor : celule , scp , vedete , film , ab , supertri , inginer , camp , sl , detinut , simetric , egal , gropi , ruleta , carti , tgv , uscat , afise , dezbateri , bunici , rv , onu , nspecial , secvop , cadou , chimie , reteta , piticot , petrol , checkin , teanc , index , teren , pizza , ecran , drum , text , lbd , aven , spam , pluricex , tren2 , gray , pasi , mgo , joc , anagrame , criptmat , maxim , cutie , party , friends , net , sablon , hd , pc , sir2 , aztec , scara , nr , robot2 , sah , formule , ed , bilete , hanoig , flood , matrice3 , erdos , grup , cd , kfactor , np , cuc , radio , honest , ref , nr01 , scor2 , convert , auto2 , compress , politics , pm , playlist , barbie , firma1 , submatrix , ham , pizza1 , exam , ants , teatru1 , cifre1 , bile1 , caini , secvreg , pasune , remi , m01 , sir23 , tren1 , joc5 , pachete , aedaro , windows , renju , latime , mere1 , piloti , peste , pitici , sirag1 , stive , turn1 , carti1 , program1 , spioni , kgb , lift , apel , lex , oras , homeless , subsir , dist , harta1 , adevar , joc10 , bare , zapezi , masina2 , perechi1 , raft , joc11 , joc12 , ferma , fni , tunel , lover , pepsi , transport , avion , monkey , premii1 , garaj , carti2 , tv , pact , fat , cafea , echipe1 , secvente , petrom , peg , scara1 , lant , ecuatii , stiva , bile4 , jungla , rj , poli , text1 , compus1 , rez , politie , anag , codul , coment , muzeu , seti , basm , timer , secvsir , dp , placa , prod3 , bursa , submdisj , sotron1 , fazan , secvpar , joker , lego , medalii , cfr , antipatie , figura , links , segm , colorare , brazi , mobil , distsir , guess , greiere , pestera , conferinta , chei , ny , nx , ghinion , sumb , drenaj , telecomanda , grupuri , mahjong , rotund , viena , sport2 , cos , monoton , micro , valet , nr0 , maxviz , anagramabil , nrpal , lista , dame , consiliu , adprod , arme , deal , prodnr , compar , latin , interviu , vintage , prize , nrdiv , arrows , tdrept , agenda , reziston , vot2 , tema , smiley , relatii , ech , scadere , nebuni , castig , expand , wb , prime2 , virgule , b210 Despre numere mari : fib , 2sir , test , sort , gray , siruri , div , sir2 , nrcuv2 , scor , hanoig , red , matrice3 , pavaj , depou , pm , sqr , set , albine , teatru1 , descfib , tub , m01 , soldati1 , euclid , mutare , munte1 , bifo , banda10 , sg1 , cutii , zumzi , numere7 , trapez , patrate6 , muguri , impozit , kbiti , m4 , numar3 , parbit , petrecere , randomizare , radical , ghinion , aliniere , sumb , cavaleri , camera616 , numar4 , pavari , asfalt , rotund , cos , risipa , xpn , dale , codpatrat , culori1 , plus , minm , pomi , cifrab , subsets , doitrei , conjectura , ech , inventie Despre recurenţă : nrbun2 , nrbun , grupe , palind , siruri , net , pioni , sir2 , perm , red , sume3 , pavaj , div3 , descfib , robot1 , soldati1 , expresii , agitatie , aparitii , apel , randuri , zidar , log , maxq , cover , dist , munte1 , sir1 , vizibil , csir , puncte2 , aranjari , numere5 , anticip , bsir , evantai , sg1 , zumzi , lant , perfect , cifru2 , numere8 , poarta , pviz , poli , desert , echitabil , patrate6 , kperms , jump , petrecere , rege , triunghi3 , sir9 , arbore1 , fibgcd , cds , wg , module , nr0 , cover1 , culori1 , flori2 , cntgcd , 2sah , matcnt , nmult
Software recomandat