TLE given codeforces question

The following code gives TLE but i think it should have given Runtime Errror…
As The size of the input(n) was 10^5… and i took it as 100.

#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin>>n;
int x[102],y[102];
set<int> s1;
set<int> s2;
for(int i=1;i<=n;i++)
{
cin>>x[i]>>y[i];
s1.insert(x[i]);
s2.insert(y[i]);
}
cout<<min(s1.size(),s2.size())<<endl;
}

indent your code please!

s2.insert(x[i]);
s1.insert(y[i]);

//