我的代码结果都是RE,不知道问题在哪里
#include <iostream>
#include <vector>
using namespace std;
int n, q;
int x, y;
int ans = 0;
int main()
{
cin >> n >> q;
vector<vector<int> > a(n + 1);
for ( int i = 1 ; i <= n ; ++ i )
{
int sz;
cin >> sz;
if ( a[i].size() <= sz )
{
a[i].resize(sz + 1);
}
for ( int j = 1 ; j <= sz ; ++ j )
{
cin >> a[i][j];
}
}
for ( int i = 1 ; i <= q ; ++ i )
{
cin >> x >> y;
ans ^= a[x][y];
}
cout << ans << endl;
return 0;
}