#1551
Se dă mulțimea V a arcelor unui graf orientat cu n vârfuri.
Să se determine drumul simplu de lungime maximă cu extremitatea inițială în vârful p din graf.
folclor
| Problema | DSLM | Operații I/O |
dslm.in/dslm.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 2 MB
/
Stivă 2 MB
|
| Id soluție | #63882486 | Utilizator | |
| Fișier | dslm.cpp | Dimensiune | 879 B |
| Data încărcării | 24 Martie 2026, 14:08 | Scor/rezultat | Eroare de compilare |
dslm.cpp: In function 'int conditii(int*, int)': dslm.cpp:5:14: error: 'retutn' was not declared in this scope if(k>m+1)retutn 0; ^ dslm.cpp:5:21: error: expected ';' before numeric constant if(k>m+1)retutn 0; ^ dslm.cpp:7:25: error: invalid types 'int[int]' for array subscript if(a[s[k-1][s[k]]==0) ^ dslm.cpp:7:29: error: expected ']' before ')' token if(a[s[k-1][s[k]]==0) ^ dslm.cpp: In function 'void back(int)': dslm.cpp:18:11: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses] if(conditii(s,k)) ^ dslm.cpp: In function 'int main()': dslm.cpp:32:5: error: 'file' was not declared in this scope file *f=fopen("dslm.in","r"); ^ dslm.cpp:32:11: error: 'f' was not declared in this scope file *f=fopen("dslm.in","r"); ^ dslm.cpp:33:11: error: 'g' was not declared in this scope file *g=fopen("dslm.out","w"); ^ dslm.cpp:35:28: error: 'x' was not declared in this scope while(fscanf(f,"%d%d",&x,&y)==2) ^ dslm.cpp:35:31: error: 'y' was not declared in this scope while(fscanf(f,"%d%d",&x,&y)==2) ^ dslm.cpp:37:5: error: 'nr' was not declared in this scope nr++; ^ dslm.cpp:41:39: error: unable to find string literal operator 'operator"" smax' for(int i=1;i<=lmax;i++)fprintf(g,"%d "smax[i]) ^ dslm.cpp:42:9: error: expected ';' before 'fclose' fclose(g); ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema DSLM 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ă.