#2822
Scrieți un program care citește de la tastatură un număr natural, n
(n∈[2,10
2
]
), și construiește în memorie un tablou bidimensional, cu n
linii și n
coloane, astfel:
[1,n]
;n
;Subiect Bacalaureat 2016, sesiunea iunie-iulie
Problema | GenMat25 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58515736 | Utilizator | |
Fișier | genmat25.cpp | Dimensiune | 1.42 KB |
Data încărcării | 13 Iunie 2025, 08:28 | Scor / rezultat | Eroare de compilare |
genmat25.cpp:2:10: error: stray '#' in program Problema #2822 – GenMat25 – Rezolvari PBInfo ^ genmat25.cpp:2:1: error: stray '\342' in program Problema #2822 – GenMat25 – Rezolvari PBInfo ^ genmat25.cpp:2:1: error: stray '\200' in program genmat25.cpp:2:1: error: stray '\223' in program genmat25.cpp:2:1: error: stray '\342' in program genmat25.cpp:2:1: error: stray '\200' in program genmat25.cpp:2:1: error: stray '\223' in program genmat25.cpp:6:1: error: stray '\305' in program Cerinţa ^ genmat25.cpp:6:1: error: stray '\243' in program genmat25.cpp:7:1: error: stray '\310' in program Scrieți un program care citește de la tastatură un număr natural, n și construiește în memorie un tablou bidimensional, cu n linii și n coloane, astfel: ^ genmat25.cpp:7:1: error: stray '\233' in program genmat25.cpp:7:1: error: stray '\310' in program genmat25.cpp:7:1: error: stray '\231' in program genmat25.cpp:7:1: error: stray '\304' in program genmat25.cpp:7:1: error: stray '\203' in program genmat25.cpp:7:1: error: stray '\304' in program genmat25.cpp:7:1: error: stray '\203' in program genmat25.cpp:7:1: error: stray '\310' in program genmat25.cpp:7:1: error: stray '\231' in program genmat25.cpp:7:1: error: stray '\310' in program genmat25.cpp:7:1: error: stray '\231' in program genmat25.cpp:7:1: error: stray '\303' in program genmat25.cpp:7:1: error: stray '\256' in program genmat25.cpp:7:1: error: stray '\310' in program genmat25.cpp:7:1: error: stray '\231' in program genmat25.cpp:9:1: error: stray '\304' in program prima coloană conține, în ordine strict crescătoare, numerele naturale din intervalul [1,n]; ^ genmat25.cpp:9:1: error: stray '\203' in program genmat25.cpp:9:1: error: stray '\310' in program genmat25.cpp:9:1: error: stray '\233' in program genmat25.cpp:9:1: error: stray '\303' in program genmat25.cpp:9:1: error: stray '\256' in program genmat25.cpp:9:1: error: stray '\304' in program genmat25.cpp:9:1: error: stray '\203' in program genmat25.cpp:11:1: error: stray '\310' in program oricare alt element este obținut prin însumarea celor două elemente vecine cu el, aflate pe coloana anterioară, unul pe aceeași linie cu el, iar celălalt pe linia următoare. ^ genmat25.cpp:11:1: error: stray '\233' in program genmat25.cpp:11:1: error: stray '\303' in program genmat25.cpp:11:1: error: stray '\256' in program genmat25.cpp:11:1: error: stray '\304' in program genmat25.cpp:11:1: error: stray '\203' in program genmat25.cpp:11:1: error: stray '\304' in program genmat25.cpp:11:1: error: stray '\203' in program genmat25.cpp:11:1: error: stray '\310' in program genmat25.cpp:11:1: error: stray '\231' in program genmat25.cpp:11:1: error: stray '\304' in program genmat25.cpp:11:1: error: stray '\203' in program genmat25.cpp:11:1: error: stray '\304' in program genmat25.cpp:11:1: error: stray '\203' in program genmat25.cpp:13:1: error: stray '\310' in program Programul citește de la tastatură numărul n. ^ genmat25.cpp:13:1: error: stray '\231' in program genmat25.cpp:13:1: error: stray '\304' in program genmat25.cpp:13:1: error: stray '\203' in program genmat25.cpp:13:1: error: stray '\304' in program genmat25.cpp:13:1: error: stray '\203' in program genmat25.cpp:15:1: error: stray '\305' in program Date de ieşire ^ genmat25.cpp:15:1: error: stray '\237' in program genmat25.cpp:16:1: error: stray '\310' in program Programul afișează pe ecran tabloul construit, câte o linie a matricei pe câte o linie a ecranului, elementele fiecărei linii fiind separate prin câte un spaţiu. ^ genmat25.cpp:16:1: error: stray '\231' in program genmat25.cpp:16:1: error: stray '\304' in program genmat25.cpp:16:1: error: stray '\203' in program genmat25.cpp:16:1: error: stray '\303' in program genmat25.cpp:16:1: error: stray '\242' in program genmat25.cpp:16:1: error: stray '\303' in program genmat25.cpp:16:1: error: stray '\242' in program genmat25.cpp:16:1: error: stray '\304' in program genmat25.cpp:16:1: error: stray '\203' in program genmat25.cpp:16:1: error: stray '\303' in program genmat25.cpp:16:1: error: stray '\242' in program genmat25.cpp:16:1: error: stray '\305' in program genmat25.cpp:16:1: error: stray '\243' in program genmat25.cpp:18:1: error: stray '\305' in program Restricţii şi precizări ^ genmat25.cpp:18:1: error: stray '\243' in program genmat25.cpp:18:1: error: stray '\305' in program genmat25.cpp:18:1: error: stray '\237' in program genmat25.cpp:18:1: error: stray '\304' in program genmat25.cpp:18:1: error: stray '\203' in program genmat25.cpp:19:1: error: stray '\342' in program 2 ≤ n ≤ 20 ^ genmat25.cpp:19:1: error: stray '\211' in program genmat25.cpp:19:1: error: stray '\244' in program genmat25.cpp:19:1: error: stray '\342' in program genmat25.cpp:19:1: error: stray '\211' in program genmat25.cpp:19:1: error: stray '\244' in program genmat25.cpp:24:1: error: stray '\310' in program Ieșire ^ genmat25.cpp:24:1: error: stray '\231' in program genmat25.cpp:2:1: error: 'Problema' does not name a type Problema #2822 – GenMat25 – Rezolvari PBInfo ^ genmat25.cpp:10:1: error: 'toate' does not name a type toate elementele ultimei linii au valoarea n; ^ genmat25.cpp:11:1: error: 'oricare' does not name a type oricare alt element este obținut prin însumarea celor două elemente vecine cu el, aflate pe coloana anterioară, unul pe aceeași linie cu el, iar celălalt pe linia următoare. ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GenMat25 face parte din prima categorie. Soluția propusă de tine va fi evaluată astfel:
Suma punctajelor acordate pe testele utilizate pentru verificare este 100. Astfel, soluția ta poate obține cel mult 100 de puncte, caz în care se poate considera corectă.