Problem in JAN19 challenge solution

long_challenge

#1

This is the code I made. Please tell the error in this code if any. The Problem code is “FANCY” available on CodeChef. When I submit the answer it comes out to be wrong. Please help me.

#include //Header Files Included
#include<string.h>
using namespace std;
main()
{
int t,chk; char s[100];
cin>>t;
while(t–)
{
chk=0;cin.ignore();
cin.getline(s,100);
for(int i=0;i<=strlen(s);i++)
{
if (s*==‘n’)
{
if(s[i+1]==‘o’&&s[i+2]==‘t’&&(s[i+3]==’ ‘||s[i+3]==’\0’))
{chk=1;goto l;}
}

	}
	l:
	if(chk==1)
	cout<<"

Real Fancy
“;
else if(chk==0)
cout<<”
regularly fancy
";
}
}


#2

The discussion of problems from live contest is not allowed. Please wait till the contest gets over.


#3

@goelm kindly delete this post. It’s against the CodeChef code of conduct to ask such questions during live contest.

This might ban you.


#4

@admin @vijju123 please delete this post