#206
Scrieţi un program care citeşte de la tastatură două numere naturale nenule n
şi m
şi care construieşte în memorie şi apoi afişează o matrice A
cu n
linii (numerotate de la 1
la n
) şi m
coloane (numerotate de la 1
la m
) cu proprietatea că fiecare element A
ij
memorează cea mai mică dintre valorile indicilor i
şi j
.
Variante Bacalaureat 2009
Problema | GenMat1 | Operații I/O |
![]() |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51388808 | Utilizator | |
Fișier | genmat1.cpp | Dimensiune | 305 B |
Data încărcării | 12 Iunie 2024, 09:08 | Scor / rezultat | Eroare de compilare |
genmat1.cpp:1:21: warning: extra tokens at end of #include directive [enabled by default] #include <iostream> using namespace std; ^ genmat1.cpp:6:1: error: stray '\357' in program for(i=1; i<=n; i++) ^ genmat1.cpp:6:1: error: stray '\274' in program genmat1.cpp:6:1: error: stray '\210' in program genmat1.cpp:6:1: error: stray '\357' in program genmat1.cpp:6:1: error: stray '\274' in program genmat1.cpp:6:1: error: stray '\211' in program genmat1.cpp:7:1: error: stray '\357' in program for(j=1; j<=m; ]++) ^ genmat1.cpp:7:1: error: stray '\274' in program genmat1.cpp:7:1: error: stray '\210' in program genmat1.cpp:7:1: error: stray '\357' in program genmat1.cpp:7:1: error: stray '\274' in program genmat1.cpp:7:1: error: stray '\233' in program genmat1.cpp:7:1: error: stray '\357' in program genmat1.cpp:7:1: error: stray '\274' in program genmat1.cpp:7:1: error: stray '\275' in program genmat1.cpp:7:1: error: stray '\357' in program genmat1.cpp:7:1: error: stray '\274' in program genmat1.cpp:7:1: error: stray '\211' in program genmat1.cpp:10:1: error: stray '\343' in program ali』 ljl=i; ^ genmat1.cpp:10:1: error: stray '\200' in program genmat1.cpp:10:1: error: stray '\217' in program genmat1.cpp:10:1: error: stray '\357' in program genmat1.cpp:10:1: error: stray '\274' in program genmat1.cpp:10:1: error: stray '\233' in program genmat1.cpp:12:1: error: stray '\357' in program alij=]; ^ genmat1.cpp:12:1: error: stray '\274' in program genmat1.cpp:12:1: error: stray '\275' in program genmat1.cpp:12:1: error: stray '\357' in program genmat1.cpp:12:1: error: stray '\274' in program genmat1.cpp:12:1: error: stray '\233' in program genmat1.cpp:14:1: error: stray '\357' in program for(i=1; i<=n; i++) ^ genmat1.cpp:14:1: error: stray '\274' in program genmat1.cpp:14:1: error: stray '\210' in program genmat1.cpp:14:1: error: stray '\357' in program genmat1.cpp:14:1: error: stray '\274' in program genmat1.cpp:14:1: error: stray '\211' in program genmat1.cpp:15:1: error: stray '\357' in program for(j=1; j<=m; j++) ^ genmat1.cpp:15:1: error: stray '\274' in program genmat1.cpp:15:1: error: stray '\210' in program genmat1.cpp:15:1: error: stray '\357' in program genmat1.cpp:15:1: error: stray '\274' in program genmat1.cpp:15:1: error: stray '\211' in program genmat1.cpp:18:1: error: stray '\357' in program } ^ genmat1.cpp:18:1: error: stray '\275' in program genmat1.cpp:18:1: error: stray '\235' in program genmat1.cpp: In function 'int main()': genmat1.cpp:5:1: error: 'cin' was not declared in this scope cin>>n>>m; ^ genmat1.cpp:5:1: note: suggested alternative: In file included from genmat1.cpp:1:0: /usr/include/c++/4.8/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^ genmat1.cpp:6:7: error: expected '(' before 'i' for(i=1; i<=n; i++) ^ genmat1.cpp:7:1: error: expected ')' before 'for' for(j=1; j<=m; ]++) ^ genmat1.cpp:7:7: error: expected '(' before 'j' for(j=1; j<=m; ]++) ^ genmat1.cpp:8:1: error: expected ';' before '{' token { ^ genmat1.cpp:8:1: error: expected primary-expression before '{' token genmat1.cpp:8:1: error: expected ')' before '{' token genmat1.cpp:10:1: error: 'ali' was not declared in this scope ali』 ljl=i; ^ genmat1.cpp:10:8: error: expected ';' before 'ljl' ali』 ljl=i; ^ genmat1.cpp:14:7: error: expected '(' before 'i' for(i=1; i<=n; i++) ^ genmat1.cpp:15:1: error: expected ')' before 'for' for(j=1; j<=m; j++) ^ genmat1.cpp:15:7: error: expected '(' before 'j' for(j=1; j<=m; j++) ^ genmat1.cpp:16:1: error: expected ')' before 'cout' cout<<alilljl<' '; ^ genmat1.cpp:16:1: error: 'cout' was not declared in this scope genmat1.cpp:16:1: note: suggested alternative: In file included from genmat1.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ genmat1.cpp:16:7: error: 'alilljl' was not declared in this scope cout<<alilljl<' '; ^ genmat1.cpp:17:1: error: 'cout' was not declared in this scope cout<<endl; ^ genmat1.cpp:17:1: note: suggested alternative: In file included from genmat1.cpp:1:0: /usr/include/c++/4.8/iostream:61:18: note: 'std::cout' extern ostream cout; /// Linked to standard output ^ genmat1.cpp:17:7: error: 'endl' was not declared in this scope cout<<endl; ^ genmat1.cpp:17:7: note: suggested alternative: In file included from /usr/include/c++/4.8/iostream:39:0, from genmat1.cpp:1: /usr/include/c++/4.8/ostream:564:5: note: 'std::endl' endl(basic_ostream<_CharT, _Traits>& __os) ^ genmat1.cpp:4:10: warning: unused variable 'a' [-Wunused-variable] int n,m, a [25] [25],i,j; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GenMat1 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ă.