Lang:G++
Edit12345678910111213141516171819202122232425262728293031#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++;