#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 | #49988638 | Utilizator | |
Fișier | avioane.cpp | Dimensiune | 2.05 KB |
Data încărcării | 22 Martie 2024, 11:23 | Scor / rezultat | 10 puncte |
avioane.cpp: In function 'int main()': avioane.cpp:20:29: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses] if(mat[i][j]==mat[i+1][j]==mat[i+1][j-1]==mat[i+1][j+1] && mat[i][j]!=mat[i-1][j]) ^ avioane.cpp:20:42: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses] if(mat[i][j]==mat[i+1][j]==mat[i+1][j-1]==mat[i+1][j+1] && mat[i][j]!=mat[i-1][j]) ^ avioane.cpp:26:34: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses] else if(mat[i][j]==mat[i][j-1]==mat[i-1][j-1]==mat[i+1][j-1] && mat[i][j]!=mat[i][j+1]) ^ avioane.cpp:26:47: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses] else if(mat[i][j]==mat[i][j-1]==mat[i-1][j-1]==mat[i+1][j-1] && mat[i][j]!=mat[i][j+1]) ^ avioane.cpp:32:34: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses] else if(mat[i][j]==mat[i-1][j]==mat[i-1][j-1]==mat[i-1][j+1] && mat[i][j]!=mat[i+1][j]) ^ avioane.cpp:32:47: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses] else if(mat[i][j]==mat[i-1][j]==mat[i-1][j-1]==mat[i-1][j+1] && mat[i][j]!=mat[i+1][j]) ^ avioane.cpp:38:34: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses] else if(mat[i][j]==mat[i-1][j+1]==mat[i][j+1]==mat[i+1][j+1] && mat[i][j]!=mat[i][j-1]) ^ avioane.cpp:38:49: warning: suggest parentheses around comparison in operand of '==' [-Wparentheses] else if(mat[i][j]==mat[i-1][j+1]==mat[i][j+1]==mat[i+1][j+1] && mat[i][j]!=mat[i][j-1]) ^ avioane.cpp:8:27: warning: unused variable 'lovituri' [-Wunused-variable] int mat[301][301]={0},lovituri[301]={0},cabine[301][2],v[301]={0}; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | Corect cerinta a | 10 | 1 | ||
1 | 0 secunde | Corect cerinta a | 10 | 1 | ||
2 | 0 secunde | Corect cerinta a | 10 | 1 | ||
3 | 0 secunde | Corect cerinta a | 10 | 1 | ||
4 | 0 secunde | Corect cerinta a | 10 | 1 | ||
5 | 0 secunde | Corect cerinta a | 10 | 1 | ||
6 | 0.004 secunde | Corect cerinta a | 10 | 1 | ||
7 | 0.004 secunde | Corect cerinta a | 10 | 1 | ||
8 | 0.004 secunde | Corect cerinta a | 10 | 1 | ||
9 | 0.008 secunde | Corect cerinta a | 10 | 1 | ||
Punctaj total | 10 |
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ă.