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; }
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