#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 | #58090831 | Utilizator | |
Fișier | conway_game_of_life.cpp | Dimensiune | 840 B |
Data încărcării | 13 Mai 2025, 17:20 | Scor / rezultat | Eroare de compilare |
conway_game_of_life.cpp:4:1: error: stray '\342' in program ifstream fin(“conway.in”); ^ conway_game_of_life.cpp:4:1: error: stray '\200' in program conway_game_of_life.cpp:4:1: error: stray '\234' in program conway_game_of_life.cpp:4:1: error: stray '\342' in program conway_game_of_life.cpp:4:1: error: stray '\200' in program conway_game_of_life.cpp:4:1: error: stray '\235' in program conway_game_of_life.cpp:5:1: error: stray '\342' in program ifstream fout(“conway.out") ^ conway_game_of_life.cpp:5:1: error: stray '\200' in program conway_game_of_life.cpp:5:1: error: stray '\234' in program conway_game_of_life.cpp:5:28: warning: missing terminating " character [enabled by default] ifstream fout(“conway.out") ^ conway_game_of_life.cpp:5:1: error: missing terminating " character ifstream fout(“conway.out") ^ conway_game_of_life.cpp:4:17: error: 'conway' was not declared in this scope ifstream fin(“conway.in”); ^ conway_game_of_life.cpp:5:18: error: 'conway' was not declared in this scope ifstream fout(“conway.out") ^ conway_game_of_life.cpp:6:7: error: 'g' was not declared in this scope int n,g,A[101][101],cnt; ^ conway_game_of_life.cpp:6:9: error: 'A' was not declared in this scope int n,g,A[101][101],cnt; ^ conway_game_of_life.cpp:6:21: error: 'cnt' was not declared in this scope int n,g,A[101][101],cnt; ^ conway_game_of_life.cpp: In function 'int main()': conway_game_of_life.cpp:9:6: error: 'n' was not declared in this scope fin>>n>>g; ^ conway_game_of_life.cpp:9:9: error: 'g' was not declared in this scope fin>>n>>g; ^ conway_game_of_life.cpp:12:6: error: 'A' was not declared in this scope fin>>A[1][j]; ^ conway_game_of_life.cpp:17:4: error: 'A' was not declared in this scope if(A[i-1][j-1]==1) ^ conway_game_of_life.cpp:18:1: error: 'cnt' was not declared in this scope cnt++; ^ conway_game_of_life.cpp:19:4: error: 'A' was not declared in this scope if(A[i][j-1]==1) ^ conway_game_of_life.cpp:19:9: error: 'j' was not declared in this scope if(A[i][j-1]==1) ^ conway_game_of_life.cpp:20:1: error: 'cnt' was not declared in this scope cnt++; ^ conway_game_of_life.cpp:21:4: error: 'A' was not declared in this scope if(A[i+1][j-1]==1) ^ conway_game_of_life.cpp:21:11: error: 'j' was not declared in this scope if(A[i+1][j-1]==1) ^ conway_game_of_life.cpp:22:1: error: 'cnt' was not declared in this scope cnt++; ^ conway_game_of_life.cpp:23:4: error: 'A' was not declared in this scope if(A[i-1][j]==1) ^ conway_game_of_life.cpp:23:11: error: 'j' was not declared in this scope if(A[i-1][j]==1) ^ conway_game_of_life.cpp:24:1: error: 'cnt' was not declared in this scope cnt++; ^ conway_game_of_life.cpp:25:4: error: 'A' was not declared in this scope if(A[i+1](j]==1) ^ conway_game_of_life.cpp:25:11: error: 'j' was not declared in this scope if(A[i+1](j]==1) ^ conway_game_of_life.cpp:25:12: error: expected ')' before ']' token if(A[i+1](j]==1) ^ conway_game_of_life.cpp:25:12: error: expected primary-expression before ']' token conway_game_of_life.cpp:25:12: error: expected ';' before ']' token conway_game_of_life.cpp:27:4: error: 'A' was not declared in this scope if(A[i-1][j+1]==1) ^ conway_game_of_life.cpp:27:11: error: 'j' was not declared in this scope if(A[i-1][j+1]==1) ^ conway_game_of_life.cpp:28:1: error: 'cnt' was not declared in this scope cnt++; ^ conway_game_of_life.cpp:29:4: error: 'A' was not declared in this scope if(A[i][j+1]==1) ^ conway_game_of_life.cpp:29:9: error: 'j' was not declared in this scope if(A[i][j+1]==1) ^ conway_game_of_life.cpp:30:1: error: 'cnt' was not declared in this scope cnt++; ^ conway_game_of_life.cpp:31:4: error: 'A' was not declared in this scope if(A[i+1][j+1]==1) ^ conway_game_of_life.cpp:31:11: error: 'j' was not declared in this scope if(A[i+1][j+1]==1) ^ conway_game_of_life.cpp:32:1: error: 'cnt' was not declared in this scope cnt++; ^ conway_game_of_life.cpp:33:4: error: 'A' was not declared in this scope if(A[i](j]==1) ^ conway_game_of_life.cpp:33:9: error: 'j' was not declared in this scope if(A[i](j]==1) ^ conway_game_of_life.cpp:33:10: error: expected ')' before ']' token if(A[i](j]==1) ^ conway_game_of_life.cpp:33:10: error: expected primary-expression before ']' token conway_game_of_life.cpp:33:10: error: expected ';' before ']' token conway_game_of_life.cpp:38:7: error: 'A' was not declared in this scope if(A[i][j]==0&&cnt==3 ^ conway_game_of_life.cpp:38:12: error: 'j' was not declared in this scope if(A[i][j]==0&&cnt==3 ^ conway_game_of_life.cpp:38:19: error: 'cnt' was not declared in this scope if(A[i][j]==0&&cnt==3 ^ conway_game_of_life.cpp:39:7: error: expected ')' before 'A' A[i][j]=1; ^ conway_game_of_life.cpp:40:4: error: 'cnt' was not declared in this scope cnt=0; ^ conway_game_of_life.cpp: At global scope: conway_game_of_life.cpp:43:7: error: 'g' does not name a type g--; ^ conway_game_of_life.cpp:44:7: error: expected declaration before '}' token } ^
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ă.