1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include<bits/stdc++.h>
#include "dzialka.h"
#include "message.h"
using namespace std;

int main()
{
    unsigned int x = GetFieldWidth();
    unsigned int y = GetFieldHeight();
    unsigned long long od = 0;
    bool A[x][y];
    for(int i = 0; i < y; i++){
        for(int j = 0; j < x; j++){
            A[j][i] = IsUsableCell(j,i);
            if(A[j][i])
                od++;
        }
    }
    if(x*y == od && MyNodeId() == 0)
        cout << (x*(x+1)/2) * (y*(y+1)/2);
    else if(MyNodeId() == 0)
        cout << 7;
    return 0;
}