#4549
Să se genereze o matrice pătratică după un set de reguli ce simulează viața unei populații de viruși.
Conway
| Problema | Conway Game of Life | Operații I/O |
conway.in/conway.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64804935 | Utilizator | |
| Fișier | conway_game_of_life.cpp | Dimensiune | 1.35 KB |
| Data încărcării | 02 Iunie 2026, 14:13 | Scor/rezultat | Eroare de compilare |
conway_game_of_life.cpp: In function ‘int main()’: conway_game_of_life.cpp:29:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse] 29 | int main() | ^~ conway_game_of_life.cpp:29:9: note: remove parentheses to default-initialize a variable 29 | int main() | ^~ | -- conway_game_of_life.cpp:29:9: note: or replace parentheses with braces to value-initialize a variable conway_game_of_life.cpp:30:1: error: a function-definition is not allowed here before ‘{’ token 30 | { | ^ conway_game_of_life.cpp:80:2: error: expected ‘}’ at end of input 80 | } | ^ conway_game_of_life.cpp:20:5: note: to match this ‘{’ 20 | { | ^ conway_game_of_life.cpp:26:5: warning: unused variable ‘i’ [-Wunused-variable] 26 | int i,j,n,g,c,x,y,cnt; | ^ conway_game_of_life.cpp:26:7: warning: unused variable ‘j’ [-Wunused-variable] 26 | int i,j,n,g,c,x,y,cnt; | ^ conway_game_of_life.cpp:26:9: warning: unused variable ‘n’ [-Wunused-variable] 26 | int i,j,n,g,c,x,y,cnt; | ^ conway_game_of_life.cpp:26:11: warning: unused variable ‘g’ [-Wunused-variable] 26 | int i,j,n,g,c,x,y,cnt; | ^ conway_game_of_life.cpp:26:13: warning: unused variable ‘c’ [-Wunused-variable] 26 | int i,j,n,g,c,x,y,cnt; | ^ conway_game_of_life.cpp:26:15: warning: unused variable ‘x’ [-Wunused-variable] 26 | int i,j,n,g,c,x,y,cnt; | ^ conway_game_of_life.cpp:26:17: warning: unused variable ‘y’ [-Wunused-variable] 26 | int i,j,n,g,c,x,y,cnt; | ^ conway_game_of_life.cpp:26:19: warning: unused variable ‘cnt’ [-Wunused-variable] 26 | int i,j,n,g,c,x,y,cnt; | ^~~ conway_game_of_life.cpp:27:5: warning: unused variable ‘a’ [-Wunused-variable] 27 | int a[105][105]; | ^ conway_game_of_life.cpp:80:2: error: expected ‘}’ at end of input 80 | } | ^ conway_game_of_life.cpp:9:1: note: to match this ‘{’ 9 | { | ^
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema Conway Game of Life 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ă.