TLE problem

Any idea why the first gives TLE but the second doesn’t? Time is 1 sec.

#include <bits/stdc++.h> 
#define lli long long int
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	lli t,n;
	
	cin>>t;
	while(t--)
	{
	    cin>>n;
	    lli i,a[2*n];
	    for(i=0;i<2*n;i+=2) cin>>a[i]>>a[i+1];
	    cout << 1 << endl;
	}
	return 0;
}

and

#include <bits/stdc++.h> 
#define lli long long int
using namespace std;

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
	lli t,n;
	
	cin>>t;
	while(t--)
	{
	    cin>>n;
	    lli i,a[2*n];
	    for(i=0;i<2*n;i+=2) cin>>a[i]>>a[i+1];
	}
	return 0;
}

Format your code as the forum software made it messy, and also give the link to the problem.

1 Like

@striker22, you have become the new @ssjgz. :laughing::laughing:

Credit: @sudheerays123.

3 Likes

Now you became me @aryan12 :upside_down_face:

1 Like

Oh ya, I forgot to mention the credits.

1 Like

Its quite a rare coincidence that you and @striker22 have the similar profile picture(except the background). Either people have the picture of the “Chef”, or there own. But a similar one between two usernames is quite a rare coincidence.

Yes
But his picture is a bit brighter than mine
:slight_smile:

@tempt919 Hope you got your answer :slight_smile: