#3859
Cai
Se dă N
, în câte moduri putem plasa 2
cai pe o tablă de șah de N
pe N
astfel încât să nu se atace?
Problema | Cai | Operații I/O | tastatură/ecran |
---|---|---|---|
Limita timp | 0.01 secunde | Limita memorie |
Total: 0.1 MB
/
Stivă 0.1 MB
|
Id soluție | #50971010 | Utilizator | |
Fișier | cai.cpp | Dimensiune | 185 B |
Data încărcării | 16 Mai 2024, 15:11 | Scor / rezultat | 0 puncte |
cai.cpp: In function 'int main()': cai.cpp:7:15: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses] cout<<2*(n^2-3)+4*(n^2-4)+2*(n-3)*(n^2-5)+2*(n-4)*(n^2-7)+(n-4)*(n-4)*(n^2-9)/2; ^ cai.cpp:7:25: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses] cout<<2*(n^2-3)+4*(n^2-4)+2*(n-3)*(n^2-5)+2*(n-4)*(n^2-7)+(n-4)*(n-4)*(n^2-9)/2; ^ cai.cpp:7:41: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses] cout<<2*(n^2-3)+4*(n^2-4)+2*(n-3)*(n^2-5)+2*(n-4)*(n^2-7)+(n-4)*(n-4)*(n^2-9)/2; ^ cai.cpp:7:57: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses] cout<<2*(n^2-3)+4*(n^2-4)+2*(n-3)*(n^2-5)+2*(n-4)*(n^2-7)+(n-4)*(n-4)*(n^2-9)/2; ^ cai.cpp:7:77: warning: suggest parentheses around arithmetic in operand of '^' [-Wparentheses] cout<<2*(n^2-3)+4*(n^2-4)+2*(n-3)*(n^2-5)+2*(n-4)*(n^2-7)+(n-4)*(n-4)*(n^2-9)/2; ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
1 | 0 secunde | Raspuns gresit. | 5 | 0 | Exemplu | |
2 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 5 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 20 | 0 | ||
10 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Cai 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ă.