# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
163033 | rolypolyvg295 | Treasure (different grader from official contest) (CEOI13_treasure2) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
#include <vector>
#include <algorithm>
#include <functional>
using namespace std;
int calculate(int y, int x, vector<vector<int>>&count){
return count[y][x] - count[y+1][x] - count[y][x+1] + count[y+1][x+1];
}
int main(){
int n;
cin >> n;
vector<vector<int>> count(n+2, vector<int>(n+2, 0));
for (int i = 1; i <= n; i++)
for (int j = 1; j <= n; j++){
cout << i << ' ' << j << ' ' << n << ' ' << n << endl;
cin >> count[i][j];
}
cout << "END" << endl;
for (int i = 1; i <= n; i++){
for (int j = 1; j <= n; j++)
cout << calculate(i, j, count);
cout << '\n';
}
cout << endl;
return 0;
}