#587
Într-un mall sunt n centre comerciale, numerotate de la 1 la n, unite între ele prin coridoare unidirecționale. Să se determine, dacă există, un centru comercial în care se poate ajunge din oricare altul.
| Problema | Mall | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64105611 | Utilizator | |
| Fișier | mall.cpp | Dimensiune | 732 B |
| Data încărcării | 17 Aprilie 2026, 10:22 | Scor/rezultat | Eroare de compilare |
mall.cpp: In function ‘void rw()’: mall.cpp:7:17: error: ‘n’ was not declared in this scope 7 | for(k=1; k<=n; k++) | ^ mall.cpp:10:21: error: ‘a’ was not declared in this scope 10 | if(!a[i][j]) | ^ mall.cpp:10:17: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 10 | if(!a[i][j]) | ^~ mall.cpp:12:21: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 12 | for(i=1;i<=n;i++) | ^~~ mall.cpp:12:32: error: ‘n’ was not declared in this scope 12 | for(i=1;i<=n;i++) | ^ mall.cpp:13:9: error: ‘a’ was not declared in this scope 13 | a[i][i]=0; | ^ mall.cpp: In function ‘int gradint(int)’: mall.cpp:18:9: error: ‘i’ was not declared in this scope 18 | for(i=1;i<=n;i++) | ^ mall.cpp:18:16: error: ‘n’ was not declared in this scope 18 | for(i=1;i<=n;i++) | ^ mall.cpp:19:13: error: ‘a’ was not declared in this scope 19 | s=s+a[i][x]; | ^ mall.cpp: In function ‘int main()’: mall.cpp:24:10: error: ‘n’ was not declared in this scope 24 | cin>>n>>m; | ^ mall.cpp:24:13: error: ‘m’ was not declared in this scope; did you mean ‘tm’? 24 | cin>>n>>m; | ^ | tm mall.cpp:25:9: error: ‘i’ was not declared in this scope 25 | for(i=1; i<=m; i++) | ^ mall.cpp:27:14: error: ‘x’ was not declared in this scope 27 | cin>>x>>y; | ^ mall.cpp:27:17: error: ‘y’ was not declared in this scope 27 | cin>>x>>y; | ^ mall.cpp:28:9: error: ‘a’ was not declared in this scope 28 | a[x][y]=1; | ^ mall.cpp:32:9: error: ‘i’ was not declared in this scope 32 | for(i=1;i<=n;i++) | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Mall 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ă.