#include<iostream>
using namespace std;
int main()
{
long long n, k;
cin >> n >> k;
long long limit[n];
long count;
for (long long i = 0; i < n; i++)
{
cin >> limit[i];
}
for (long long i = 0; i < n - 1; i++)
{
for (long long j = i + 1; j < n; j++)
{
if (k > (limit[i] + limit[j]))
count++;
}
}
cout << count;
}
https://www.codechef.com/ZCOPRAC/problems/ZCO13003 Well, I've been solving problems from the codechef website, and came across a bit of a conundrum. As you can see, I wrote the above code for the question, and was able to verify my code with all the sample inputs. However, as soon as i plug it into the submit column, I'm faced with a 'bug discovered' error. Can anyone tell me what I'm doing wrong?