×

# HELP TO EXTRACT MISTAKE

 0 I AM GETTING WRONG ANSWER. QUES LINK-https://www.codechef.com/problems/TICKETS5 #include int main() { int T,l,i,j; char S[100]; scanf("%d",&T); for(i=0;i64&&S[j]<91&&l>1) { if(j==l-3) printf("YES\n"); else continue; } else { printf("NO\n"); break; } } } return 0; }  asked 20 Jun '17, 20:58 3★mnjn25 27●2 accept rate: 33% 15.4k●1●20●66

 0 Please provide a properly indented code. The above code also contains lots of "" for no reason {="" scanf("%s",&s);="" l="strlen(S);" for Please provide an ideone link or something similar instead of pasting code here. Also I checked, you have successfully solved the problem : https://www.codechef.com/viewsolution/14300474 You can provide the solution link like this in case of wrong answer as well. These link would be helpful to understand your code. answered 21 Jun '17, 09:45 893●2●11●34 accept rate: 10%
 0 Your code doesnt run at all for S of length 2. Input 1 AB Your output (blank. Nothing printed) Expected Output YES  You are doing too much with the conditions. Simplify the thinking. What i suggest, is, that you check that adjacent elements are unequal, and that string has only 2 characters. answered 21 Jun '17, 11:10 15.4k●1●20●66 accept rate: 18%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×9

question asked: 20 Jun '17, 20:58

question was seen: 354 times

last updated: 21 Jun '17, 11:10