Code works but not accepting?

I created the code and it works for both the testcases but when i run it online ide i get runtime error ? I am using c++(gcc6.3) compiler.

Can you share your code?

Sure,

#include <bits/stdc++.h>

using namespace std;

int main() {
int t;
cin >> t;
while (t–) {
int n, s;
cin >> n >> s;
vector < pair < long long, long long >> a(n);
for (int i = 0; i < n; i++) {
cin >> a[i].first;
}
for (int i = 0; i < n; i++) {
cin >> a[i].second;
}
sort(a.begin(), a.end());
long long x;
for (int i = 0; i < n; i++) {
if (a[i].second != a[0].second) {
x = a[i].first;
break;
}
}
if (a[0].first + x > 100 - s) {
cout << “no\n”;
} else {
cout << “yes\n”;
}
}
return 0;
}

@anon56469564
I didn’t found any submission of yours for this problem. So i guess you might be pressing run button. If ur doing that u must provide custom input for that.

Link to your submission or format your code using three back-ticks before and after your code.

for case n=2 s=25
25 25
1 1
your code won’t work

Ohh, I get it now, thanks very much