2

UZpen 2024-06-20 11:32:13

#include <bits/stdc++.h> using namespace std; int main() { int x,y; cin>>x>>y; int a[100][100]; for(int i=0;i<=x-1;i++){ for(int j=0;j<=y-1;j++){ cin>>a[i][j]; } } int k; cin>>k; int s=0; for(int i=0;i<=x-1;i++){ for(int j=0;j<=y-1;j++){ s++; if(s==k) { cout<<a[i][j]; return 0; } } }

return 0;

}