WDTBAM - Editorial

@eartemov thanks a lot for the help

What is the problem with this solution: https://www.codechef.com/viewsolution/8587753

I tried running it this way: java Codechef< input.txt > output.txt

and had the test case input in input.txt and it runs fine.

Hi every one cay any one please tell me whats wrong with this solution? After verifying with setter’s solutions i modified my solution which is giving AC ,i got shocked because both solutions are same in perceptive of algorithms .The difference between two solutions are in the first one using one for loop i am checking no.of correct answers and taking input of w’s , in the second solution i have separated the above logic into two different for loops , both are doing the same thing then why i got WA for first solution can one please tell me either reason or any test case where it’s failling?

Hi every one cay any one please tell me whats wrong with this solution? After verifying with setter’s solutions i modified my solution which is giving AC ,i got shocked because both solutions are same in perceptive of algorithms .The difference between two solutions are in the first one using one for loop i am checking no.of correct answers and taking input of w’s , in the second solution i have separated the above logic into two different for loops , both are doing the same thing then why i got WA for first solution can one please tell me either reason or any test case where it’s failling?

Can someone enlighten me as to why my code is not working?

I keep on getting WA and SIGSEGV on this code. Can anyone please point out what I’m doing wrong?

this code

WA and I don’t know why!!
https://www.codechef.com/viewsolution/9015414
Anybody Help

I am a bit new here and a little help would be greatly appreciated. I tried the below code on Turbo C++, and it worked but here it says wrong answer. Any ideas why that may be?

https://www.codechef.com/viewsolution/9246713

like everyone else: I can’t get this to work on the submission. It works on the sample data and I’ve compared to some of the completed solutions and it looks equivalent to me but I still get a WA.

https://www.codechef.com/viewsolution/9281660

Whats the problem in this code? I cant find it :frowning:

T=int(input())
for t in range(0,T):
N=int(input())
ca=input()
ga=input()
count=0
winnings=[]
win=list(map(int,input().split()))
for i in range(0,len(ca)):
if ca[i]==ga[i]:
count=count+1
if count==0:
print(win[0])
else:
for i in range(1,count+1):
winnings.append(win[i])
print(max(winnings))

Whats the problem in this code? I cant find it :frowning:

can any tell whats wrong withthis code
am getting correct answer in PC i gave the sample inputs getting same sample output but complilng in CodeChef showing wrong sir.please help me

Why goes it give a WA? I’m sure my solution is similar to what the editorial says.
https://www.codechef.com/viewsolution/12383128

Whats wrong with my code https://ideone.com/0Jp7oi