#643
DetDrum1
Se dă vectorul de tați al unui arbore cu rădăcină cu n
noduri și un nod k
. Determinați drumul de la rădăcina arborelui la nodul k
.
Problema | DetDrum1 | Operații I/O |
detdrum1.in /detdrum1.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #380549 | Utilizator | |
Fișier | detdrum1.cpp | Dimensiune | 1.26 KB |
Data încărcării | 03 Martie 2015, 13:52 | Scor / rezultat | Eroare de compilare |
detdrum1.cpp:37:13: error: redefinition of ‘std::ifstream fin’ ifstream fin("detdrum.in"); ^ detdrum1.cpp:5:10: error: ‘std::ifstream fin’ previously declared here ifstream fin("detdrum.in"); ^ detdrum1.cpp:38:14: error: redefinition of ‘std::ofstream fout’ ofstream fout("detdrum.out"); ^ detdrum1.cpp:6:10: error: ‘std::ofstream fout’ previously declared here ofstream fout("detdrum.out"); ^ detdrum1.cpp:40:5: error: redefinition of ‘int n’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:5: error: ‘int n’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:40:9: error: redefinition of ‘int k’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:9: error: ‘int k’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:40:21: error: redefinition of ‘int tata [105]’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:13: error: ‘int tata [105]’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:40:29: error: redefinition of ‘int v [105]’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:24: error: ‘int v [105]’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:40:32: error: redefinition of ‘int i’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:32: error: ‘int i’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:40:34: error: redefinition of ‘int j’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:34: error: ‘int j’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:40:36: error: redefinition of ‘int x’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:36: error: ‘int x’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp: In function ‘int main()’: detdrum1.cpp:44:5: error: redefinition of ‘int main()’ int main() ^ detdrum1.cpp:12:5: error: ‘int main()’ previously defined here int main() ^ detdrum1.cpp: At global scope: detdrum1.cpp:69:13: error: redefinition of ‘std::ifstream fin’ ifstream fin("detdrum.in"); ^ detdrum1.cpp:5:10: error: ‘std::ifstream fin’ previously declared here ifstream fin("detdrum.in"); ^ detdrum1.cpp:70:14: error: redefinition of ‘std::ofstream fout’ ofstream fout("detdrum.out"); ^ detdrum1.cpp:6:10: error: ‘std::ofstream fout’ previously declared here ofstream fout("detdrum.out"); ^ detdrum1.cpp:72:5: error: redefinition of ‘int n’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:5: error: ‘int n’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:72:9: error: redefinition of ‘int k’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:9: error: ‘int k’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:72:21: error: redefinition of ‘int tata [105]’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:13: error: ‘int tata [105]’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:72:29: error: redefinition of ‘int v [105]’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:24: error: ‘int v [105]’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:72:32: error: redefinition of ‘int i’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:32: error: ‘int i’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:72:34: error: redefinition of ‘int j’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:34: error: ‘int j’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:72:36: error: redefinition of ‘int x’ int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp:8:36: error: ‘int x’ previously declared here int n , k , tata[105], v[105] ,i,j,x; ^ detdrum1.cpp: In function ‘int main()’: detdrum1.cpp:76:5: error: redefinition of ‘int main()’ int main() ^ detdrum1.cpp:12:5: error: ‘int main()’ previously defined here int main() ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema DetDrum1 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ă.