Why am I getting SIGSTP here?
#include <bits/stdc++.h>
#define ll long long int
using namespace std;
int main() {
ll t; cin>>t;
while(tโ) {
ll n,x; cin>>n>>x;
set s;
for(ll i = 0 ; i<n ; i++) {
ll a; cin>>a;
s.insert(a);
}
ll c = s.size();
cout << min(n-x, c) << endl;
}
return 0;
}
ssjgz
June 12, 2021, 6:21pm
2
Please either format your code or (better!) link to your submission - the forum software has mangled it and it wonโt compile!
Also - what Problem are you trying to solve?
You must be running the code without giving input.
I think this is the thing I thought running without giving custom input means codechef system will give input test cases but that happens only when I submit. Thank you, its solved