#770
Se dă o matrice cu n linii şi m coloane şi elemente numere naturale. Să se permute coloanele matricei circular spre stânga cu o poziție.
| Problema | PermCol | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64658390 | Utilizator | |
| Fișier | permcol.cpp | Dimensiune | 374 B |
| Data încărcării | 21 Mai 2026, 00:12 | Scor/rezultat | Eroare de compilare |
permcol.cpp: In function ‘int main()’: permcol.cpp:6:2: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 6 | for(i = 0; i <n;i++) | ^~~ permcol.cpp:9:6: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 9 | for(i=0;i<n;i++) | ^~~ permcol.cpp:10:11: error: ‘v’ was not declared in this scope 10 | {int aux=v[i][1]; | ^ permcol.cpp:11:11: warning: range-based ‘for’ loops with initializer only available with ‘-std=c++20’ or ‘-std=gnu++20’ [-Wc++20-extensions] 11 | for(i=0;i<m-1:i++) | ^ permcol.cpp:11:16: error: expected ‘;’ before ‘:’ token 11 | for(i=0;i<m-1:i++) | ^ | ; permcol.cpp:11:12: warning: statement has no effect [-Wunused-value] 11 | for(i=0;i<m-1:i++) | ~^~~~ permcol.cpp:13:10: warning: suggest parentheses around assignment used as truth value [-Wparentheses] 13 | a[i][m]=aux; | ~~~~~~~^~~~ permcol.cpp:14:2: error: expected primary-expression before ‘}’ token 14 | } | ^ permcol.cpp:13:15: error: expected ‘)’ before ‘}’ token 13 | a[i][m]=aux; | ^ | ) 14 | } | ~ permcol.cpp:11:6: note: to match this ‘(’ 11 | for(i=0;i<m-1:i++) | ^ permcol.cpp:14:2: error: expected primary-expression before ‘}’ token 14 | } | ^ permcol.cpp:15:1: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 15 | for(i=0;i<n;i++) | ^~~ permcol.cpp:18:5: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 18 | cout << endl; | ^~~~
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema PermCol 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ă.