My issue
plz debugging this code, why throw error ?
My code
#include <bits/stdc++.h>
using namespace std;
int main() {
// your code goes here
long long int t;
cin>>t;
while(t--){
string s;
int c1=0;
getline(cin,s);
int q=s.length();
for(int i=0;i<q;i++){
if(s[i]=='n' && s[i+1]=='o' && s[i+2]=='t' ) {
if( (i==0 || s[i-1]==' ') && (s[i+3]==' '|| i==q-3 )){
c1=1; }
}
}
if(c1==1 ){ cout<<"Real Fancy"<<endl;}
else{cout<<"regularly fancy"<<endl;}
}
return 0;
}
Problem Link: FANCY Problem - CodeChef