Pagini recente » Monitorul de evaluare | Sandbox | Diferente pentru utilizator/ciorile.chioare intre reviziile 11 si 2 | Monitorul de evaluare | Diferente pentru probleme-de-acoperire-2 intre reviziile 44 si 43
Nu exista diferente intre titluri.
Diferente intre continut:
void checksol() {
int config = 0, config1 = 0;
for (int i = 0; i < w; i++) {
if (sol[i][0] == 0) config |= (1 << i);
if (sol[i][1] == 1) config1 |= (1 << i);
for(int i = 0; i < w; i++) {
if(sol[i][0] == 0) config |= (1 << i);
if(sol[i][1] == 1) config1 |= (1 << i);
}
num[1 ^ step][config1] += num[step][config];
}
void doit(int x) {
if (x == w)
if(x == w)
checksol();
else {
if (x < w - 1) {
if(x < w - 1) {
int i, j, k;
boolean bool;
for (k = 0; k < 4; k++) {
for(k = 0; k < 4; k++) {
bool = true;
for (i = 0; i < 2; i++) {
for (j = 0; j < 2; j++) {
if (p[k][i][j] == 1)
for(i = 0; i < 2; i++) {
for(j = 0; j < 2; j++) {
if(p[k][i][j] == 1)
bool = bool && (sol[x + i][j] == 0);
}
}
if (bool) {
for (i = 0; i < 2; i++) {
for (j = 0; j < 2; j++) {
if (p[k][i][j] == 1)
if(bool) {
for(i = 0; i < 2; i++) {
for(j = 0; j < 2; j++) {
if(p[k][i][j] == 1)
sol[x + i][j] = 1;
}
}
doit(x + 1);
for (i = 0; i < 2; i++) {
for (j = 0; j < 2; j++) {
if (p[k][i][j] == 1)
for(i = 0; i < 2; i++) {
for(j = 0; j < 2; j++) {
if(p[k][i][j] == 1)
sol[x + i][j]=0;
}
}
num[0][0] = 1;
step = 0;
sol = new int[w][2];
for (int i = 1; i < l; i++) {
for(int i = 1; i < l; i++) {
Arrays.fill(num[1 ^ step], 0);
doit(0);
step ^= 1;
Nu exista diferente intre securitate.
Topicul de forum nu a fost schimbat.