#include using namespace std; template ostream& operator<<(ostream& out, const vector &cont) { out << "["; for(const auto &x: cont) out << x<< ", "; out << "]"; return out; } #define dmp(x) cerr << #x << " = " << x << endl #define dmpn(x) cerr << #x << " = " << x <<"; " #define ff first #define ss second #define all(x) begin(x), end(x) #define sz(x) (int) (x).size() #define int long long typedef long long ll; typedef pair pii; typedef long double ld; void solve() { int n,m,q; cin >> n >> m >> q; vector> a(n, vector(m)); for(int i=0; i> a[i][j]; } } vector ans(200000LL, 0LL); vector> dp(n, vector(m, 0LL)); for(int i=n-1; i>=0; i--){ for(int j=0; j> x; cout << ans[x] << '\n'; } } int32_t main() { cin.tie(0)->sync_with_stdio(0); cin.exceptions(cin.failbit); solve(); return 0; }