#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 | #59299633 | Utilizator | |
| Fișier | regine1.cpp | Dimensiune | 1.04 KB |
| Data încărcării | 24 Septembrie 2025, 12:23 | Scor/rezultat | Eroare de compilare |
regine1.cpp:3:2: error: invalid preprocessing directive #iclude #iclude <fstream> ^ regine1.cpp:46:22: warning: missing terminating ' character [enabled by default] break' ^ regine1.cpp:46:17: error: missing terminating ' character break' ^ regine1.cpp:5:11: error: variable 'std::ifstream f' has initializer but incomplete type ifstream f("date.in"); ^ regine1.cpp:6:11: error: variable 'std::ofstream g' has initializer but incomplete type ofstream g("date.out"); ^ regine1.cpp: In function 'int cont(int)': regine1.cpp:10:9: error: 'i' was not declared in this scope for(i=1,i<k,i++) ^ regine1.cpp:10:20: error: expected ';' before ')' token for(i=1,i<k,i++) ^ regine1.cpp:16:24: warning: declaration of 'void afisare(int)' has 'extern' and is initialized [enabled by default] void afisare (int k) ^ regine1.cpp:18:9: error: expected primary-expression before 'for' for(i=1,i<=k,i++) ^ regine1.cpp:18:9: error: expected '}' before 'for' regine1.cpp:18:9: error: function 'void afisare(int)' is initialized like a variable regine1.cpp:18:9: warning: the address of 'void afisare(int)' will always evaluate as 'true' [-Waddress] regine1.cpp:18:9: error: expected ';' before 'for' regine1.cpp:18:9: error: expected primary-expression before 'for' regine1.cpp:18:9: error: expected ')' before 'for' regine1.cpp:18:25: error: expected ';' before ')' token for(i=1,i<=k,i++) ^ regine1.cpp:65:13: error: expected primary-expression at end of input return 0; ^ regine1.cpp:65:13: error: expected ';' at end of input regine1.cpp:65:13: error: expected primary-expression at end of input regine1.cpp:65:13: error: expected ')' at end of input regine1.cpp:65:13: error: expected statement at end of input regine1.cpp:65:13: error: expected '}' at end of input regine1.cpp:65:13: warning: no return statement in function returning non-void [-Wreturn-type]
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ă.