#3430
Gigel a descoperit noul joc Block Puzzle Jewel. Jocul constă în plasarea pe tabla de joc a unor piese de diverse tipuri și obținerea unui anumit scor. Dându-se o secvență de piese care se plasează pe tablă, determinați scorul final al lui Gigel.
idee proprie
| Problema | bpj2020 | Operații I/O |
bpj2020.in/bpj2020.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #58823995 | Utilizator | |
| Fișier | bpj2020.cpp | Dimensiune | 1.73 KB |
| Data încărcării | 16 August 2025, 12:58 | Scor/rezultat | Eroare de compilare |
bpj2020.cpp:7:7: error: expected unqualified-id before ';' token int n,; ^ bpj2020.cpp:11:1: error: 'vector' does not name a type vector<vector<pair<int, int>>> piese = { ^ bpj2020.cpp: In function 'bool valid(int, int, int)': bpj2020.cpp:20:15: error: expected unqualified-id before '[' token for (auto [dx, dy] : piese[tip]) { ^ bpj2020.cpp:20:15: error: expected ';' before '[' token bpj2020.cpp:20:16: error: 'dx' was not declared in this scope for (auto [dx, dy] : piese[tip]) { ^ bpj2020.cpp:20:20: error: 'dy' was not declared in this scope for (auto [dx, dy] : piese[tip]) { ^ bpj2020.cpp: In lambda function: bpj2020.cpp:20:24: error: expected '{' before ':' token for (auto [dx, dy] : piese[tip]) { ^ bpj2020.cpp: In function 'bool valid(int, int, int)': bpj2020.cpp:20:24: error: expected ';' before ':' token bpj2020.cpp:20:24: error: expected primary-expression before ':' token bpj2020.cpp:20:24: error: expected ')' before ':' token bpj2020.cpp:20:24: error: expected primary-expression before ':' token bpj2020.cpp:20:24: error: expected ';' before ':' token bpj2020.cpp: In function 'void plaseaza(int, int, int)': bpj2020.cpp:30:15: error: expected unqualified-id before '[' token for (auto [dx, dy] : piese[tip]) { ^ bpj2020.cpp:30:15: error: expected ';' before '[' token bpj2020.cpp:30:16: error: 'dx' was not declared in this scope for (auto [dx, dy] : piese[tip]) { ^ bpj2020.cpp:30:20: error: 'dy' was not declared in this scope for (auto [dx, dy] : piese[tip]) { ^ bpj2020.cpp: In lambda function: bpj2020.cpp:30:24: error: expected '{' before ':' token for (auto [dx, dy] : piese[tip]) { ^ bpj2020.cpp: In function 'void plaseaza(int, int, int)': bpj2020.cpp:30:24: error: expected ';' before ':' token bpj2020.cpp:30:24: error: expected primary-expression before ':' token bpj2020.cpp:30:24: error: expected ')' before ':' token bpj2020.cpp:30:24: error: expected primary-expression before ':' token bpj2020.cpp:30:24: error: expected ';' before ':' token bpj2020.cpp:35:5: error: 'scor' was not declared in this scope scor += piese[tip].size(); ^ bpj2020.cpp:35:13: error: 'piese' was not declared in this scope scor += piese[tip].size(); ^ bpj2020.cpp: In function 'void verifica_bonus()': bpj2020.cpp:39:5: error: 'vector' was not declared in this scope vector<int> linii, coloane; ^ bpj2020.cpp:39:12: error: expected primary-expression before 'int' vector<int> linii, coloane; ^ bpj2020.cpp:39:12: error: expected ';' before 'int' bpj2020.cpp:46:26: error: 'linii' was not declared in this scope if (linie_plina) linii.push_back(i); ^ bpj2020.cpp:47:28: error: 'coloane' was not declared in this scope if (coloana_plina) coloane.push_back(i); ^ bpj2020.cpp:50:17: error: 'linii' was not declared in this scope int total = linii.size() + coloane.size(); ^ bpj2020.cpp:50:32: error: 'coloane' was not declared in this scope int total = linii.size() + coloane.size(); ^ bpj2020.cpp:51:5: error: 'scor' was not declared in this scope scor += bonus[total]; ^ bpj2020.cpp:53:18: error: unable to deduce 'auto&&' from 'linii' for (int i : linii) ^ bpj2020.cpp:57:18: error: unable to deduce 'auto&&' from 'coloane' for (int j : coloane) ^ bpj2020.cpp: In function 'int main()': bpj2020.cpp:72:13: error: 'scor' was not declared in this scope fout << scor << '\n'; ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema bpj2020 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ă.