SOLVING EGYPIZZA ON SPOJ

I AM TRYING TO SOLVE A PROBLEM ON SPOJ “EGYPIZZA”
I HAVE SOLVED IT AND I CANT FIND A SINGLE TEST CASE FOR WHICH IT GIVES WRONG OUTPUT BUT STILL IT SAYS WA!!!
CAN ANYONE HELP ME IN FINDING MY MISTAKE

#include
#include<math.h>
#include<string.h>
using namespace std;
int main()
{
int n,i,j,l,z,x,c,y,ans;

char str[10002];
ans=0; x=0; y=0; z=0;
cin>>n;
ans=0;
c=0;
for(i=0;i<n;i++)
{ cin>>str;
if(strcmp(str,“1/4”)==0) x++;
else if(strcmp(str,“1/2”)==0) y++;
else z++;
}

if(z==0 && y==0 && x<=3) { ans++; x=0; }

if(x>=4) { ans=ans+(x/4); x=x%4; }
if(y>=2) { ans=ans+(y/2); y=y%2; } // x=2,3, y=1 , z=5
// x=1,2,3 , z=1;

if(x>=2 && y==1) { ans++; y=0; x=x-2; }

if(z>=x) { z=z-x; ans=ans+x; x=0; }
else if(x>=z) { x=x-z; ans=ans+z; z=0; }

if(x==1 && y==1) { y=0; x=0; ans++; }

ans=ans+1+(x+y+z);

cout<<ans;

return 0;
}