#1281
Se consideră o tablă de șah de dimensiune n. Să se plaseze pe tablă n regine astfel încât să nu existe două regine care să se atace.
| Problema | Regine1 | Operații I/O |
tastatură/ecran
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64087901 | Utilizator | |
| Fișier | regine1.cpp | Dimensiune | 835 B |
| Data încărcării | 16 Aprilie 2026, 11:50 | Scor/rezultat | Eroare de compilare |
regine1.cpp: In function ‘bool continuare(int)’: regine1.cpp:16:1: error: a function-definition is not allowed here before ‘{’ token 16 | { | ^ regine1.cpp:25:1: error: a function-definition is not allowed here before ‘{’ token 25 | { | ^ regine1.cpp:32:1: error: a function-definition is not allowed here before ‘{’ token 32 | { | ^ regine1.cpp:45:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 45 | int main() | ^~ regine1.cpp:45:9: note: remove parentheses to default-initialize a variable 45 | int main() | ^~ | -- regine1.cpp:45:9: note: or replace parentheses with braces to value-initialize a variable regine1.cpp:46:1: error: a function-definition is not allowed here before ‘{’ token 46 | { | ^ regine1.cpp:50:2: error: expected ‘}’ at end of input 50 | } | ^ regine1.cpp:6:1: note: to match this ‘{’ 6 | { | ^ regine1.cpp:14:5: warning: unused variable ‘s’ [-Wunused-variable] 14 | int s[11],n; | ^ regine1.cpp:14:11: warning: unused variable ‘n’ [-Wunused-variable] 14 | int s[11],n; | ^ regine1.cpp:50:2: warning: control reaches end of non-void function [-Wreturn-type] 50 | } | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Regine1 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ă.