#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 | #64284344 | Utilizator | |
| Fișier | mall.cpp | Dimensiune | 602 B |
| Data încărcării | 28 Aprilie 2026, 08:11 | Scor/rezultat | Eroare de compilare |
mall.cpp: In function ‘int main()’: mall.cpp:20:10: warning: this ‘for’ clause does not guard... [-Wmisleading-indentation] 20 | for(int i=1;i<=n;i++) | ^~~ mall.cpp:22:13: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘for’ 22 | if(codul==1)(cod=1;c=j;) | ^~ mall.cpp:22:31: error: expected ‘)’ before ‘;’ token 22 | if(codul==1)(cod=1;c=j;) | ~ ^ | ) mall.cpp:22:13: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] 22 | if(codul==1)(cod=1;c=j;) | ^~ mall.cpp:22:32: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 22 | if(codul==1)(cod=1;c=j;) | ^ mall.cpp:22:36: error: expected primary-expression before ‘)’ token 22 | if(codul==1)(cod=1;c=j;) | ^ mall.cpp:26:29: error: expected ‘;’ before ‘return’ 26 | else printf("NU EXISTA") | ^ | ; 27 | return 0; | ~~~~~~ mall.cpp:5:13: warning: unused variable ‘z’ [-Wunused-variable] 5 | int x,y,z,k,i,j; | ^ mall.cpp:6:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%d%d",&n,&m); | ~~~~~^~~~~~~~~~~~~~ mall.cpp:9:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 9 | scanf("%d%d",&x,&y); | ~~~~~^~~~~~~~~~~~~~
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ă.