PLS help!! My code seems to be working but it says wrong answer!
include
include
using namespace std;
int main()
{
unsigned short t,q,h,m,s;
char a[4],b[3][4]= {"1/4","1/2","3/4"};
vector quar;
vector half;
vector thref;
cin>>t;
s=1;
while(t--)
{
cin>>a;
if(strcmp(a,b[0])==0)
quar.push_back(.25);
else if(strcmp(a,b[1])==0)
half.push_back(0.5);
else if(strcmp(a,b[2])==0)
thref.push_back(.75);
}
q = quar.size();
h = half.size();
m = thref.size();
s = s + q/4 + h/2 ;
h = h - h/2;
q = q - q/4;
q = q%4; h = h%2;
if(h!=0 && q!=0)
if(q/2!=0)
{
if(q/2>h)
while(h!=0)
{
q=q-2; h--; s++;
}
else
while(q/2!=0)
{
q=q-2; h--; s++;
}
}
while(q!=0)
{
q--; m--; s++;
}
while(h!=0)
{
h--; s++;
}
while(m!=0)
{
m--; s++;
}
cout< return 0;
}