#1429
GenMat21
Scrieţi un program care citeşte de la tastatură un număr natural nenul n
şi construieşte un tablou bidimensional de dimensiune n
după o regulă precizată.
Variante Bacalaureat 2007
Problema | GenMat21 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #28273383 | Utilizator | |
Fișier | genmat21.cpp | Dimensiune | 680 B |
Data încărcării | 28 Februarie 2021, 14:17 | Scor / rezultat | 20 puncte |
genmat21.cpp: In function 'int main()': genmat21.cpp:11:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(i+j<n+1 and i+j==n or i+j>n+1 and i+j==n+2) a[i][j]=n-1; ^ genmat21.cpp:13:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(i+j<n+1 and i+j==n-1 or i+j>n+1 and i+j==n+3) a[i][j]=n-2; ^ genmat21.cpp:15:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(i+j<n+1 and i+j==n-2 or i+j>n+1 and i+j==n+4) a[i][j]=n-3; ^ genmat21.cpp:17:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses] if(i+j<n+1 and i+j==n-3 or i+j>n+1 and i+j==n+5) a[i][j]=n-4; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | OK. | 10 | 10 | ||
2 | 0 secunde | OK. | 10 | 10 | Exemplu | |
3 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 15 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 15 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 15 | 0 | ||
8 | 0 secunde | Caught fatal signal 11 | 15 | 0 | ||
Punctaj total | 20 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema GenMat21 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ă.