#993
GenMat20
Scrieţi un program care citeşte de la tastatură un număr natural n
şi construieşte în memorie o matrice cu n
linii şi n
coloane în care fiecare linie a matricei să conţină o permutare a mulţimii {1,2,...,n}
, astfel încât pe linii diferite ale matricei să se afle permutări diferite.
Problema | GenMat20 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #23022728 | Utilizator | |
Fișier | genmat20.cpp | Dimensiune | 381 B |
Data încărcării | 18 Mai 2020, 22:47 | Scor / rezultat | Eroare de compilare |
genmat20.cpp:7:4: error: stray '\302' in program for (j=1; j<=n; ++j) ^ genmat20.cpp:7:4: error: stray '\240' in program genmat20.cpp:9:3: error: stray '\302' in program for (i=2; i<=n; ++i) ^ genmat20.cpp:9:3: error: stray '\240' in program genmat20.cpp:10:3: error: stray '\302' in program {for (j=1; j<n; ++j) ^ genmat20.cpp:10:3: error: stray '\240' in program genmat20.cpp:11:2: error: stray '\302' in program a[i][j]=a[i-1][j+1]; ^ genmat20.cpp:11:2: error: stray '\240' in program genmat20.cpp:11:2: error: stray '\302' in program genmat20.cpp:11:2: error: stray '\240' in program genmat20.cpp:11:2: error: stray '\302' in program genmat20.cpp:11:2: error: stray '\240' in program genmat20.cpp:12:1: error: stray '\302' in program a[i][j]=a[i-1][1]; ^ genmat20.cpp:12:1: error: stray '\240' in program genmat20.cpp:12:1: error: stray '\302' in program genmat20.cpp:12:1: error: stray '\240' in program genmat20.cpp:12:1: error: stray '\302' in program genmat20.cpp:12:1: error: stray '\240' in program genmat20.cpp:13:1: error: stray '\302' in program }for (i=1; i<=n; ++i) ^ genmat20.cpp:13:1: error: stray '\240' in program genmat20.cpp:13:1: error: stray '\302' in program genmat20.cpp:13:1: error: stray '\240' in program genmat20.cpp:14:2: error: stray '\302' in program {for (j=1; j<=n; ++j) ^ genmat20.cpp:14:2: error: stray '\240' in program genmat20.cpp:15:1: error: stray '\302' in program cout << a[i][j] << " "; ^ genmat20.cpp:15:1: error: stray '\240' in program genmat20.cpp:15:1: error: stray '\302' in program genmat20.cpp:15:1: error: stray '\240' in program genmat20.cpp:15:1: error: stray '\302' in program genmat20.cpp:15:1: error: stray '\240' in program genmat20.cpp:16:2: error: stray '\302' in program cout <<n; ^ genmat20.cpp:16:2: error: stray '\240' in program genmat20.cpp:16:2: error: stray '\302' in program genmat20.cpp:16:2: error: stray '\240' in program genmat20.cpp:16:2: error: stray '\302' in program genmat20.cpp:16:2: error: stray '\240' in program
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GenMat20 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ă.