#include <iostream> #include <vector> using namespace std; int main() { int n = 0, m = 0, q = 0; cin >> n >> m >> q; vector<vector<long long>> nums(n+1, vector<long long>(m+1)); for (int i = 1; i < n + 1; ++i) { for (int...