I took a pretty similar approach. But I am getting runtime error SIGABRT. Why is this so? Can anyone explain? Here is my code:
#include <iostream>#include <vector>#include <algorithm>using namespace std;int main(){int n1,n2,n3,n,x,c=0,l,z;cin>>n1>>n2>>n3;n=n1+n2+n3;vector<int> v,f;for(int i=0;i<n;i++){cin>>x;v.push_back(x);}sort(v.begin(),v.end());for(int i=0;i<n-1;i++){l=v.at(i);z=v.at(i+1);if((l==z)&&(l>c)){
Read more… (24 words)