Your solution didn't handle *-1* correctly.

Whenever you receive *-1* from the judge, you should immediately terminate 
your program in order to receive the *Wrong Answer* verdict in time.
However, your solution will continue to wait for next test case (which will 
never come) until the time runs out and hence receive a *Time Limit 
Exceeded* verdict.

As the analysis already suggested, approach with randomness is not 
guaranteed to pass, especially when you are having a bad luck.
Re-submission with different random seed could let you pass.


在2022年4月27日星期三 UTC-7 07:36:03<Augustus Li> 写道:

> Hi experts, 
>
> Could you help take a look my solution of ASeDatAb in Round 1B:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *class ASeDatAb:    def __init__(self):        pass    def run(self):      
>   print('11111111')        for i in range(300):            n = 
> int(input())            if n <= 0:                break            
> print('0'*(8-n)+'1'*n)aSeDatAb = ASeDatAb()cn = int(input())for ci in 
> range(1, cn + 1):    aSeDatAb.run()*
>
> I used the above solution as my first attempt of ASeDatAb, which got 
> TLE during the competition, however, I resubmitted the same code again and 
> again in practice mode(practice attempt 3&4), they could all pass the Test 
> Set 1. Could you take a look at it? 
>
> In this case, is it possible to make my first attempt correct and change 
> my penalty time in the contest? Thank you !!
>
> Best Regards,
> Augustus
>

-- 
-- You received this message because you are subscribed to the Google Groups 
Code Jam group. To post to this group, send email to 
google-code@googlegroups.com. To unsubscribe from this group, send email to 
google-code+unsubscr...@googlegroups.com. For more options, visit this group at 
https://groups.google.com/d/forum/google-code?hl=en
--- 
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 visit 
https://groups.google.com/d/msgid/google-code/0dc37616-9ab7-4240-9d4d-d4399e256ec9n%40googlegroups.com.

Reply via email to