#1383
Avioane
“Avioane pe hârtie” este un joc ce se joacă în doi, fiecare jucător având la dispoziţie o foaie de hârtie (de matematică) şi ceva de scris.
Dată fiind configuraţia caroiajului şi poziţiile loviturilor lansate de adversar, să se determine:
a. numărul total de avioane desenate în caroiaj;
b. numărul de avioane de fiecare tip;
c. numărul de avioane avariate, fără a fi doborâte;
d. numărul de avioane doborâte.
Micul programator - ian.2015
Problema | Avioane | Operații I/O |
![]() avioane.in /avioane.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
Id soluție | #58521527 | Utilizator | |
Fișier | avioane.cpp | Dimensiune | 2.58 KB |
Data încărcării | 13 Iunie 2025, 17:01 | Scor / rezultat | Eroare de compilare |
avioane.cpp: In function 'int main()': avioane.cpp:59:14: error: expected unqualified-id before '[' token auto [x, y] = pozitii[cod]; ^ avioane.cpp:60:34: error: 'x' was not declared in this scope char d = detect_directie(x, y, cod); ^ avioane.cpp:60:37: error: 'y' was not declared in this scope char d = detect_directie(x, y, cod); ^ avioane.cpp:78:14: error: expected unqualified-id before '[' token auto [cx, cy] = pozitii[cod]; ^ avioane.cpp:81:19: error: expected unqualified-id before '[' token for (auto [dx, dy] : offsets) { ^ avioane.cpp:81:19: error: expected ';' before '[' token avioane.cpp:81:20: error: 'dx' was not declared in this scope for (auto [dx, dy] : offsets) { ^ avioane.cpp:81:24: error: 'dy' was not declared in this scope for (auto [dx, dy] : offsets) { ^ avioane.cpp: In lambda function: avioane.cpp:81:28: error: expected '{' before ':' token for (auto [dx, dy] : offsets) { ^ avioane.cpp: In function 'int main()': avioane.cpp:81:28: error: expected ';' before ':' token avioane.cpp:81:28: error: expected primary-expression before ':' token avioane.cpp:81:28: error: expected ')' before ':' token avioane.cpp:81:28: error: expected primary-expression before ':' token avioane.cpp:81:28: error: expected ';' before ':' token
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Avioane 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ă.