#384
Saritura_Calului1
Să se determine o modalitate de parcurgere a unei tablei de către un cal care se deplasează în maniera specifică piesei de șah, astfel încât acesta să nu treacă de două ori prin aceeaşi poziţie.
Problema | Saritura_Calului1 | Operații I/O |
saritura_calului1.in /saritura_calului1.out
|
---|---|---|---|
Limita timp | 1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #53676251 | Utilizator | |
Fișier | saritura_calului1.cpp | Dimensiune | 1.04 KB |
Data încărcării | 08 Noiembrie 2024, 08:20 | Scor / rezultat | Eroare de compilare |
saritura_calului1.cpp:4:14: warning: missing terminating " character [enabled by default] ifstream cin("saritura_calului1.in); ^ saritura_calului1.cpp:4:1: error: missing terminating " character ifstream cin("saritura_calului1.in); ^ saritura_calului1.cpp:5:15: warning: missing terminating " character [enabled by default] ofstream cout("saritura_calulul1.out); ^ saritura_calului1.cpp:5:1: error: missing terminating " character ofstream cout("saritura_calulul1.out); ^ saritura_calului1.cpp:6:7: error: 'm' has not been declared int n,m,v[102][102],x0,y0,ok=1; ^ saritura_calului1.cpp:6:9: error: 'v' has not been declared int n,m,v[102][102],x0,y0,ok=1; ^ saritura_calului1.cpp:6:21: error: 'x0' has not been declared int n,m,v[102][102],x0,y0,ok=1; ^ saritura_calului1.cpp:6:24: error: 'y0' has not been declared int n,m,v[102][102],x0,y0,ok=1; ^ saritura_calului1.cpp:6:27: error: 'ok' has not been declared int n,m,v[102][102],x0,y0,ok=1; ^ saritura_calului1.cpp:6:29: error: default arguments are only permitted for function parameters int n,m,v[102][102],x0,y0,ok=1; ^ saritura_calului1.cpp:6:31: error: expected ')' before ';' token int n,m,v[102][102],x0,y0,ok=1; ^ saritura_calului1.cpp:6:31: error: expected ')' before ';' token saritura_calului1.cpp: In function 'int inMat(int, int)': saritura_calului1.cpp:9:20: error: 'n' was not declared in this scope if(x<1||y<1||x>n||y>m) ^ saritura_calului1.cpp:9:25: error: 'm' was not declared in this scope if(x<1||y<1||x>n||y>m) ^ saritura_calului1.cpp: In function 'int valid(int, int)': saritura_calului1.cpp:15:8: error: 'v' was not declared in this scope if(v[x][y]!=0) return 0; ^ saritura_calului1.cpp: In function 'void afis()': saritura_calului1.cpp:19:20: error: 'n' was not declared in this scope for(int i=1;i<=n;i++){ ^ saritura_calului1.cpp:20:24: error: 'm' was not declared in this scope for(int j=1;j<=m;j++){ ^ saritura_calului1.cpp:21:13: error: 'cout' was not declared in this scope cout<<v[i][j]<<' '; ^ saritura_calului1.cpp:21:19: error: 'v' was not declared in this scope cout<<v[i][j]<<' '; ^ saritura_calului1.cpp:23:9: error: 'cout' was not declared in this scope cout<<'\n'; ^ saritura_calului1.cpp:25:5: error: 'cout' was not declared in this scope cout<<'\n'; ^ saritura_calului1.cpp: In function 'void backt(int, int, int)': saritura_calului1.cpp:28:8: error: 'ok' was not declared in this scope if(ok==0) return ; ^ saritura_calului1.cpp:32:13: error: 'v' was not declared in this scope v[l][c]=k; ^ saritura_calului1.cpp:34:19: error: 'm' was not declared in this scope if(k==m*n){ ^ saritura_calului1.cpp:34:21: error: 'n' was not declared in this scope if(k==m*n){ ^ saritura_calului1.cpp:36:17: error: 'ok' was not declared in this scope ok=0; ^ saritura_calului1.cpp: In function 'int main()': saritura_calului1.cpp:46:10: error: 'n' was not declared in this scope cin>>n>>m>>x0>>y0; ^ saritura_calului1.cpp:46:13: error: 'm' was not declared in this scope cin>>n>>m>>x0>>y0; ^ saritura_calului1.cpp:46:16: error: 'x0' was not declared in this scope cin>>n>>m>>x0>>y0; ^ saritura_calului1.cpp:46:20: error: 'y0' was not declared in this scope cin>>n>>m>>x0>>y0; ^ saritura_calului1.cpp:47:5: error: 'v' was not declared in this scope v[x0][y0]=1; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Saritura_Calului1 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ă.