Re: [gcj] Saving the universe again - Why my code failed in the test set 2?

2020-03-22 Thread Sourakanti Mandal
Hello...Now I am swapping CS pairs from right to left, so that 6 CSSCS ouputs 1 now. But though it Fails in the 2nd Test Set. What's the problem ? I am really stuck at this ! :( -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe

Re: [gcj] Saving the universe again - Why my code failed in the test set 2?

2020-03-23 Thread Sourakanti Mandal
Sorry for pasting all the code herebut though have a look.. def isCapable(s, able): #finds if a beam is capable of withstanding "able" charge = 1 damage = 0 for step in s: if step == "S": damage += charge if step == "C": charge *= 2

Re: [gcj] Saving the universe again - Why my code failed in the test set 2?

2020-03-23 Thread Sourakanti Mandal
https://github.com/Sonu64/saving_the_universe_again/ Check out the code in my GitHub Repo please :) -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-c

[gcj] Re: KickStart 2020 simple problem. Code runs locally, but gets WA on Google's machine

2020-03-24 Thread Sourakanti Mandal
I was trying a different approach, it makes slices of the sorted list and then checks if its possible or not def findSol(arr, budget): if min(arr) > budget: return 0 arr.sort() for i in range(len(arr)-1, -1, -1): temp = arr[0:i] temp2 = arr[0:i+1] #prin

[gcj] Re: KickStart 2020 simple problem. Code runs locally, but gets WA on Google's machine

2020-03-24 Thread Sourakanti Mandal
And this one gives WA as wellWHY ?? This one is really making me mad def findSol(arr, budget): arr.sort() total = 0 count = 0 for i in range(0, len(arr)): total += arr[i] if total <= budget: count += 1 else: return count de

Re: [gcj] Re: KickStart 2020 simple problem. Code runs locally, but gets WA on Google's machine

2020-03-25 Thread Sourakanti Mandal
Thanks a Lot <3 <3 Actually single House was returning NONE, and also it had some problems with house list like [25,25] with a budget of 50. I fixed them, but still it gets WA. Ohh..gosh ! def findSol(arr, budget): if len(arr) == 1 and sum(arr) <= budget: return 1 arr.sort()

[gcj] Re: KickStart 2020 simple problem. Code runs locally, but gets WA on Google's machine

2020-04-02 Thread Sourakanti Mandal
It worked ! Thank You guys ! :) -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-code+unsubscr...@googlegroups.com. To view this discussion on the web v

Re: [gcj] Indicium - Help : Codejam 2020

2020-04-07 Thread Sourakanti Mandal
It fulfills the criteria . For sure, in a question asked about the Indicium problem, Google answered that their 2 possible combinations are not the Only possible combinations..Their can be a lot more. On Tue, Apr 7, 2020, 10:26 PM krishnasys wrote: > I have been trying to solve this problem