#211
Spirala
Să se parcurgă o matrice pătratică în spirală în sensul acelor de ceasornic.
Problema | Spirala | Operații I/O |
spirala.in /spirala.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #51456187 | Utilizator | |
Fișier | spirala.cpp | Dimensiune | 843 B |
Data încărcării | 19 Iunie 2024, 21:19 | Scor / rezultat | Eroare de compilare |
spirala.cpp: In function 'int main()': spirala.cpp:12:5: error: expected ',' or ';' before 'ofstream' ofstream out("spirala.out") ^ spirala.cpp:14:11: error: 'n' was not declared in this scope in >> n; ^ spirala.cpp:17:13: error: 'j' was not declared in this scope for(j = 0; j < n; j++) ^ spirala.cpp:22:11: error: 'd' was not declared in this scope for ( d = 0; d < (n + 1) / 2; d++) ^ spirala.cpp:24:14: error: 'nt' was not declared in this scope for (nt j = d; j < n - d;j++) ^ spirala.cpp:24:17: error: expected ';' before 'j' for (nt j = d; j < n - d;j++) ^ spirala.cpp:24:24: error: 'j' was not declared in this scope for (nt j = d; j < n - d;j++) ^ spirala.cpp:26:13: error: 'out' was not declared in this scope out << a[d][j] << " "; ^ spirala.cpp:30:13: error: 'out' was not declared in this scope out << a[i][n - 1 - d]<< " "; ^ spirala.cpp:34:13: error: 'out' was not declared in this scope out << a[n - 1 - d][j] << " "; ^ spirala.cpp:38:13: error: 'out' was not declared in this scope out << a[i][d] << " "; ^ spirala.cpp:43:5: error: 'out' was not declared in this scope out.close(); ^ spirala.cpp:44:13: error: expected '}' at end of input return 0; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Spirala 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ă.