Sunny Pranay
You need a space between the ':' and the answer string.

On Tue, Apr 7, 2020, 9:23 PM Sunny Pranay <[email protected]> wrote:

> I tried to solve it!!!
> But got the sample failed but my sample test case was correct 😢.
> I solved this question by watching this youtube video as a reference.
> https://www.youtube.com/watch?v=QfFo_MinRs8
>
> def assign_c_j(data):
>     c = [False,[]]
>     j = [False,[]]
>     s1 = ""
>     for i in data:
>
>         if i[1] == "s" and c[0] == False:
>             c[0] = True
>             c[1].append(i[2])
>             s1+="C"
>         elif i[1] == "s" and j[0] == False:
>             j[0] = True
>             j[1].append(i[2])
>             s1+="J"
>         elif i[1] == "s" and (c[0] == True and j[0] == True):
>             return "IMPOSSIBLE"
>         elif i[1] == "e":
>             if i[2] in c[1]:
>                 c[0] = False
>                 c[1].remove(i[2])
>             elif i[2] in j[1]:
>                 j[0] = False
>                 j[1].remove(i[2])
>         # print("c",c)
>         # print("j",j)
>
>     return s1
> if __name__ == "__main__":
>     for a in range(int(input())):
>         data = []
>
>         tracker = {}
>         temp = []
>         for b1 in range(int(input())):
>             s , e = map(int,input().split())
>             data.append([s,'s',b1])
>             data.append([e,'e',b1])
>         data.sort()
>         print("Case #"+str(a+1)+":",assign_c_j(data))
>
>
>
>
> On Tuesday, April 7, 2020 at 6:20:28 AM UTC+5:30, Martin Seeler wrote:
>>
>> I'm asking to keep my sanity: Did anyone solve this problem with Python?
>> I can't find these tricky edge cases where my code fails, all variations
>> I try on my machine seem to work just fine. Still CodeJam Environment says
>> *WA*.
>>
>> If there is someone who solved it in python, then I know I'm missing some
>> cases. Otherwise I start to question the environment :D
>>
>> Thanks and have a nice day everyone
>>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/c22e1c38-a452-4abc-9f41-a692f36b9588%40googlegroups.com
> <https://groups.google.com/d/msgid/google-code/c22e1c38-a452-4abc-9f41-a692f36b9588%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CAKtP0RA48zOCXX8Wksep9H70YZx%2Bgnz6Wg4%2Bsrcygiqj%3D8XxXw%40mail.gmail.com.

Reply via email to