#include<bits/stdc++.h> using namespace std; int main(){ int n,m; cin>>n>>m; string s[n]; for(int i=0;i<n;++i){ cin>>s[i]; } int t;cin>>t; while(t--){ int x,y; cin>>x>>y; cout<<s[y]<<endl; } return 0; } |
Double click to view unformatted code.