hiho week 234 register

Ended

Participants:94

Verdict:Accepted
Score:100 / 100
Submitted:2018-12-24 21:32:08

Lang:G++

Edit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <vector>
using namespace std;
int main() {
    const int OO = 11111;
    long long m, n;
    vector<int> row, col;
    int left, right, top, bottom;
    int k, cnt, curs, temp1, temp2;
    while(cin >> n >> m >> k) {
        for(int i = 0; i < k; i++) {
            cin >> temp1 >> temp2;
            row.push_back(temp1);
            col.push_back(temp2);
        }
        //for (auto i : row)
        //cout << i << endl;
        long long ret = n * (n + 1) / 2 * m * (m + 1) / 2;
        for(int s = 1; s < (1 << k); s++) {
            curs = s;
            cnt = 0;
            left = top = OO;
            right = bottom = -OO;
            for(int i = 0; i < k; i++) {
                if(curs & 1) {
                    cnt++;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX