#3430
Gigel a descoperit noul joc Block Puzzle Jewel. Jocul constă în plasarea pe tabla de joc a unor piese de diverse tipuri și obținerea unui anumit scor. Dându-se o secvență de piese care se plasează pe tablă, determinați scorul final al lui Gigel.
idee proprie
| Problema | bpj2020 | Operații I/O |
bpj2020.in/bpj2020.out
|
|---|---|---|---|
| Limita timp | 0.1 secunde | Limita memorie |
Total: 64 MB
/
Stivă 8 MB
|
| Id soluție | #64651027 | Utilizator | |
| Fișier | bpj2020.cpp | Dimensiune | 3.42 KB |
| Data încărcării | 20 Mai 2026, 14:34 | Scor/rezultat | 0 puncte |
bpj2020.cpp: In function ‘int main()’: bpj2020.cpp:156:27: warning: iteration 7 invokes undefined behavior [-Waggressive-loop-optimizations] 156 | if(v2[i][j]==0) | ~~~~~~~^ bpj2020.cpp:154:26: note: within this loop 154 | for(int j=1;j<=8;j++) | ~^~~ bpj2020.cpp:128:26: warning: iteration 7 invokes undefined behavior [-Waggressive-loop-optimizations] 128 | if(v[i][j]==1) | ~~~~~~^ bpj2020.cpp:126:26: note: within this loop 126 | for(int i=1;i<=8;i++) | ~^~~ bpj2020.cpp:136:29: warning: iteration 7 invokes undefined behavior [-Waggressive-loop-optimizations] 136 | v2[i][j]=0; | ~~~~~~~~^~ bpj2020.cpp:134:30: note: within this loop 134 | for(int i=1;i<=8;i++) | ~^~~ bpj2020.cpp:111:26: warning: iteration 7 invokes undefined behavior [-Waggressive-loop-optimizations] 111 | if(v[i][j]==1) | ~~~~~~^ bpj2020.cpp:109:26: note: within this loop 109 | for(int j=1;j<=8;j++) | ~^~~ bpj2020.cpp:119:29: warning: iteration 7 invokes undefined behavior [-Waggressive-loop-optimizations] 119 | v2[i][j]=0; | ~~~~~~~~^~ bpj2020.cpp:117:30: note: within this loop 117 | for(int j=1;j<=8;j++) | ~^~~ bpj2020.cpp:104:32: warning: iteration 7 invokes undefined behavior [-Waggressive-loop-optimizations] 104 | v2[i][j]=v[i][j]; | ~~~~~~^ bpj2020.cpp:103:26: note: within this loop 103 | for(int j=1;j<=8;j++) | ~^~~ bpj2020.cpp:104:25: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ forming offset [64, 72] is out of the bounds [0, 64] of object ‘v2’ with type ‘bool [8][8]’ [-Warray-bounds=] 104 | v2[i][j]=v[i][j]; | ~~~~~~~~^~~~~~~~ bpj2020.cpp:9:6: note: ‘v2’ declared here 9 | bool v2[8][8]; | ^~
| Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
|---|---|---|---|---|---|---|
| 1 | 0.003 secunde | Caught fatal signal 11 | 10 | 0 | Exemplu | |
| 2 | 0.001 secunde | Caught fatal signal 11 | 20 | 0 | ||
| 3 | 0.001 secunde | Caught fatal signal 11 | 10 | 0 | ||
| 4 | 0.001 secunde | Caught fatal signal 11 | 20 | 0 | ||
| 5 | 0.001 secunde | Caught fatal signal 11 | 20 | 0 | ||
| 6 | 0.001 secunde | Caught fatal signal 11 | 20 | 0 | ||
| Punctaj total | 0 | |||||
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema bpj2020 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ă.