#939
sum00
Să se scrie un program care citeşte de la tastatura două numere naturale şi determină suma lor.
Problema | sum00 | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #24864169 | Utilizator | |
Fișier | sum00.cpp | Dimensiune | 1.67 KB |
Data încărcării | 21 Octombrie 2020, 14:35 | Scor / rezultat | Eroare de compilare |
sum00.cpp: In member function 'std::vector<int> Graph::dijkstra(int)': sum00.cpp:30:27: error: expected unqualified-id before '[' token for (auto [nghb, cost] : ad[node]) ^ sum00.cpp:30:27: error: expected ';' before '[' token sum00.cpp:30:28: error: 'nghb' was not declared in this scope for (auto [nghb, cost] : ad[node]) ^ sum00.cpp:30:34: error: 'cost' was not declared in this scope for (auto [nghb, cost] : ad[node]) ^ sum00.cpp: In lambda function: sum00.cpp:30:40: error: expected '{' before ':' token for (auto [nghb, cost] : ad[node]) ^ sum00.cpp: In member function 'std::vector<int> Graph::dijkstra(int)': sum00.cpp:30:40: error: expected ';' before ':' token sum00.cpp:30:40: error: expected primary-expression before ':' token sum00.cpp:30:40: error: expected ')' before ':' token sum00.cpp:30:40: error: expected primary-expression before ':' token sum00.cpp:30:40: error: expected ';' before ':' token sum00.cpp: In function 'int main()': sum00.cpp:45:16: error: expected unqualified-id before '[' token for (auto& [x, y] : edg) { ^ sum00.cpp:45:16: error: expected ';' before '[' token sum00.cpp:45:17: error: 'x' was not declared in this scope for (auto& [x, y] : edg) { ^ sum00.cpp:45:20: error: 'y' was not declared in this scope for (auto& [x, y] : edg) { ^ sum00.cpp: In lambda function: sum00.cpp:45:23: error: expected '{' before ':' token for (auto& [x, y] : edg) { ^ sum00.cpp: In function 'int main()': sum00.cpp:45:23: error: expected ';' before ':' token sum00.cpp:45:23: error: expected primary-expression before ':' token sum00.cpp:45:23: error: expected ')' before ':' token sum00.cpp:45:23: error: expected primary-expression before ':' token sum00.cpp:45:23: error: expected ';' before ':' token sum00.cpp:50:16: error: expected unqualified-id before '[' token for (auto& [x, y] : pth) ^ sum00.cpp:50:16: error: expected ';' before '[' token sum00.cpp:50:17: error: 'x' was not declared in this scope for (auto& [x, y] : pth) ^ sum00.cpp:50:20: error: 'y' was not declared in this scope for (auto& [x, y] : pth) ^ sum00.cpp: In lambda function: sum00.cpp:50:23: error: expected '{' before ':' token for (auto& [x, y] : pth) ^ sum00.cpp: In function 'int main()': sum00.cpp:50:23: error: expected ';' before ':' token sum00.cpp:50:23: error: expected primary-expression before ':' token sum00.cpp:50:23: error: expected ')' before ':' token sum00.cpp:50:23: error: expected primary-expression before ':' token sum00.cpp:50:23: error: expected ';' before ':' token sum00.cpp:58:15: error: expected unqualified-id before '[' token for (auto [x, y] : edg) { ^ sum00.cpp:58:15: error: expected ';' before '[' token sum00.cpp:58:16: error: 'x' was not declared in this scope for (auto [x, y] : edg) { ^ sum00.cpp:58:19: error: 'y' was not declared in this scope for (auto [x, y] : edg) { ^ sum00.cpp: In lambda function: sum00.cpp:58:22: error: expected '{' before ':' token for (auto [x, y] : edg) { ^ sum00.cpp: In function 'int main()': sum00.cpp:58:22: error: expected ';' before ':' token sum00.cpp:58:22: error: expected primary-expression before ':' token sum00.cpp:58:22: error: expected ')' before ':' token sum00.cpp:58:22: error: expected primary-expression before ':' token sum00.cpp:58:22: error: expected ';' before ':' token sum00.cpp:57:9: warning: unused variable 'ans' [-Wunused-variable] int ans = 1e9; ^ sum00.cpp:66:1: error: expected '}' at end of input } ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema sum00 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ă.