#3244
tabla
O tablă de șah de dimensiune n x n
conține pe toate pătrățelele câte o piesă cu una din culorile: alb, negru, roșu, verde sau albastru. Pe tablă nu există 3
piese consecutive pe aceeași linie sau coloană de aceeași culoare. Găsiți cel mai mare punctaj obținut în urma unei singure mutări.
Olimpiada Municipală Iași, clasa a X-a
Problema | tabla | Operații I/O |
tabla.in /tabla.out
|
---|---|---|---|
Limita timp | 0.1 secunde | Limita memorie |
Total: 2 MB
/
Stivă 1 MB
|
Id soluție | #44879248 | Utilizator | |
Fișier | tabla.cpp | Dimensiune | 2.66 KB |
Data încărcării | 25 Septembrie 2023, 19:39 | Scor / rezultat | 0 puncte |
tabla.cpp: In function 'int main()': tabla.cpp:32:34: warning: left operand of comma operator has no effect [-Wunused-value] for(int x=i;x>=1, a[x][j]==val1;x--) ^ tabla.cpp:37:35: warning: left operand of comma operator has no effect [-Wunused-value] for(int x=i; x>=n, a[x][j]==val1;x++) ^ tabla.cpp:42:34: warning: left operand of comma operator has no effect [-Wunused-value] for(int x=j;x>=1, a[i][x]==val1;x--) ^ tabla.cpp:47:35: warning: left operand of comma operator has no effect [-Wunused-value] for(int x=j; x>=n, a[i][x]==val1;x++) ^ tabla.cpp:59:40: warning: left operand of comma operator has no effect [-Wunused-value] for(int x=i+di[k];x>=1, a[x][j+dj[k]]==val2;x--) ^ tabla.cpp:64:41: warning: left operand of comma operator has no effect [-Wunused-value] for(int x=i+di[k]; x>=n, a[x][j+dj[k]]==val2;x++) ^ tabla.cpp:69:40: warning: left operand of comma operator has no effect [-Wunused-value] for(int x=j+dj[k];x>=1, a[i+di[k]][x]==val2;x--) ^ tabla.cpp:74:41: warning: left operand of comma operator has no effect [-Wunused-value] for(int x=j+dj[k]; x>=n, a[i+di[k]][x]==val2;x++) ^
Test | Timp | Mesaj evaluare | Scor posibil | Scor obținut | ||
---|---|---|---|---|---|---|
0 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
1 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
2 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
3 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
4 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
5 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
6 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
7 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
8 | 0 secunde | Raspuns gresit. | 10 | 0 | ||
9 | 0 secunde | Raspuns gresit. | 5 | 0 | Exemplu | |
10 | 0 secunde | Raspuns gresit. | 5 | 0 | Exemplu | |
Punctaj total | 0 |
www.pbinfo.ro permite evaluarea a două tipuri de probleme:
Problema tabla 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ă.