My issue
Why give me sample output?
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
int n;
int d[n];
for(int i=0;i<n;i++){
cin>>d[i];
}
for(int i=0;i<n;i++){
sort(d,d+n);
if(d[i]==d[i+1])
i=i+2;
else if(d[i]!=d[i+1])
cout<<d[i]<<endl;
}
}
Learning course: Arrays, Strings & Sorting
Problem Link: Chef and Dolls Practice Problem in - CodeChef