My issue
please check the fault
My code
#include <iostream>
using namespace std;
int main() {
// your code goes here
int t;
cin>>t;
while(t--){
int n,flag;
cin>>n;
char s[n];
int ind =0,not_ind =0;
for(int i=0; i<n+1;i++){
cin>>s[i];
}
for(int i=0; i<n+1;i++){
if(s[i]=='I'){
ind++;
}
else if(s[i]=='Y')
not_ind++;
}
if(ind>not_ind)
cout<<"INDIAN"<<endl;
else if(ind<not_ind)
cout<<"NOT INDIAN"<<endl;
else
cout<<"NOT SURE"<<endl;
}
return 0;
}
Problem Link: HEADBOB Problem - CodeChef