#210
Chenar
Să se parcurgă în sensul acelor de ceasornic chenarul exterior al unei matrice pătratice.
Variante Bacalaureat 2009
Problema | Chenar | Operații I/O |
chenar.in /chenar.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #52991054 | Utilizator | |
Fișier | chenar.cpp | Dimensiune | 884 B |
Data încărcării | 15 Octombrie 2024, 08:46 | Scor / rezultat | Eroare de compilare |
chenar.cpp:11:1: error: 'ifstream' does not name a type ifstream fin("chenar.in"); ^ chenar.cpp:12:1: error: 'ofstream' does not name a type ofstream fout ("chenar.out"); ^ chenar.cpp: In function 'int main()': chenar.cpp:17:5: error: 'fin' was not declared in this scope fin>>n; ^ chenar.cpp:18:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for (i=0;i<=n-1;i++){ ^ chenar.cpp:19:22: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for (j=0;j<=n-1;j++){ ^ chenar.cpp:20:20: error: invalid types 'int[int]' for array subscript fin>>a[i][j]; ^ chenar.cpp:23:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for (j=0;j<=n-1;j++) ^ chenar.cpp:24:13: error: 'fout' was not declared in this scope fout<<a[0][j]<<" "; ^ chenar.cpp:24:22: error: invalid types 'int[int]' for array subscript fout<<a[0][j]<<" "; ^ chenar.cpp:25:19: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for (i=1;i<=n-1;i++) ^ chenar.cpp:26:9: error: 'fout' was not declared in this scope fout<<a[i][n-1]<<" "; ^ chenar.cpp:26:18: error: invalid types 'int[int]' for array subscript fout<<a[i][n-1]<<" "; ^ chenar.cpp:27:13: error: invalid conversion from 'int (*)[23]' to 'int' [-fpermissive] for (j=n-2;j>=0;j--) ^ chenar.cpp:28:9: error: 'fout' was not declared in this scope fout<<a[n-1][j]<<" "; ^ chenar.cpp:29:13: error: invalid conversion from 'int (*)[23]' to 'int' [-fpermissive] for (i=n-2;i>=1;i--) ^ chenar.cpp:30:9: error: 'fout' was not declared in this scope fout<<a[j][0]<<" "; ^ chenar.cpp:30:18: error: invalid types 'int[int]' for array subscript fout<<a[j][0]<<" "; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Chenar 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ă.