#4489
isomorpheus
Cele două pastile ale lui Morpheus sunt formate din N1
, respectiv N2
molecule, cu N1-1
, respectiv N2-1
legături între ele. Molecula principală este cea cu eticheta 1
în cazul ambelor pastile. Se garantează că există o singură modalitate de a parcurge legăturile din orice moleculă în oricare alta. Ei bine, Morpheus are Q
întrebări de forma a b
, unde vrea să afle dacă subpastila a
din pastila roșie este identică structural cu subpastila b
din pastila albastră. Ajută-i pe Neo si Morpheus să repare această catastrofă și îți vor mulțumi cu 100
de puncte!
Problema | isomorpheus | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.2 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #48184726 | Utilizator | |
Fișier | isomorpheus.cpp | Dimensiune | 2.32 KB |
Data încărcării | 17 Ianuarie 2024, 21:42 | Scor / rezultat | Eroare de compilare |
isomorpheus.cpp: In function 'void compute_hashes(nod*, int)': isomorpheus.cpp:40:20: error: 'struct nod' has no member named 'st' if (tree[node].st != 0) { ^ isomorpheus.cpp:41:41: error: 'struct nod' has no member named 'st' compute_hashes(tree, tree[node].st); ^ isomorpheus.cpp:42:61: error: 'struct nod' has no member named 'st' tree[node].subtree_hashes.push_back(tree[tree[node].st].hash_val); ^ isomorpheus.cpp:45:20: error: 'struct nod' has no member named 'dr' if (tree[node].dr != 0) { ^ isomorpheus.cpp:46:41: error: 'struct nod' has no member named 'dr' compute_hashes(tree, tree[node].dr); ^ isomorpheus.cpp:47:61: error: 'struct nod' has no member named 'dr' tree[node].subtree_hashes.push_back(tree[tree[node].dr].hash_val); ^ isomorpheus.cpp: In function 'int main()': isomorpheus.cpp:60:12: error: 'n1' was not declared in this scope cin >> n1 >> n2 >> q; ^ isomorpheus.cpp:60:18: error: 'n2' was not declared in this scope cin >> n1 >> n2 >> q; ^ isomorpheus.cpp:60:24: error: 'q' was not declared in this scope cin >> n1 >> n2 >> q; ^ isomorpheus.cpp:68:20: error: 'struct nod' has no member named 'st' if (red[a].st == 0) { ^ isomorpheus.cpp:69:20: error: 'struct nod' has no member named 'st' red[a].st = b; ^ isomorpheus.cpp:71:24: error: 'struct nod' has no member named 'dr' if (red[a].dr == 0) ^ isomorpheus.cpp:72:24: error: 'struct nod' has no member named 'dr' red[a].dr = b; ^ isomorpheus.cpp:80:21: error: 'struct nod' has no member named 'st' if (blue[a].st == 0) { ^ isomorpheus.cpp:81:21: error: 'struct nod' has no member named 'st' blue[a].st = b; ^ isomorpheus.cpp:83:25: error: 'struct nod' has no member named 'dr' if (blue[a].dr == 0) ^ isomorpheus.cpp:84:25: error: 'struct nod' has no member named 'dr' blue[a].dr = b; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema isomorpheus 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ă.