El miércoles, 10 de abril de 2019, 0:08:33 (UTC+2), Akhilesh Pandey  escribió:
> My code, implementation here https://ideone.com/mbBiTy 
> it successfully solves all the test cases provided by you so far, all of 
> them, but it gives a RE error in CodeJam 
> Help Appreciated!
> note:I had designed my code so that it is fast and solves only the first sub 
> problem and intentionally fails on the second sub problem
> 
> 
> On Tue, Apr 9, 2019 at 8:37 PM Marcel Ubach <marce...@gmail.com> wrote:
> El lunes, 8 de abril de 2019, 22:41:03 (UTC+2), ACTECH  escribió:
> 
> > On Monday, April 8, 2019 at 11:09:13 PM UTC+5:30, Marcel Ubach wrote:
> 
> > > El domingo, 7 de abril de 2019, 23:21:04 (UTC+2), Fixman  escribió:
> 
> > > > There are a couple of edge cases that aren't present in the test cases:
> 
> > > > 
> 
> > > > 
> 
> > > > * Strings with repeated letters "AAAAAAABC". 
> 
> > > > * Strings with alternate letters "ABABABABACD". 
> 
> > > > * Strings with really big primes. 
> 
> > > > 
> 
> > > > 
> 
> > > > On Sun, 7 Apr 2019, 14:27 , <angry....@gmail.com> wrote:
> 
> > > > Had success with the tests but RE on the main run. Looks like other 
> > > > participants had the same issue.
> 
> > > > 
> 
> > > > 
> 
> > > > 
> 
> > > > -- 
> 
> > > > 
> 
> > > > 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 googl...@googlegroups.com.
> 
> > > > 
> 
> > > > To post to this group, send email to googl...@googlegroups.com.
> 
> > > > 
> 
> > > > To view this discussion on the web visit 
> > > > https://groups.google.com/d/msgid/google-code/06f41eee-5b08-4588-9717-64c8b9967993%40googlegroups.com.
> 
> > > > 
> 
> > > > For more options, visit https://groups.google.com/d/optout.
> 
> > > 
> 
> > > Yes, I thimk 90% of questions about this problem can be answered checking 
> > > the solution against these insidious edge cases. Here is a sample 
> > > testcase:
> 
> > > 
> 
> > > 6
> 
> > > 101 32
> 
> > > 6 6 6 6 4 6 6 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 
> > > 3127 3599 4087 4757 5183 5767 6557 7387 8633 9797 10403
> 
> > > 101 31
> 
> > > 6 6 6 15 15 6 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 
> > > 3127 3599 4087 4757 5183 5767 6557 7387 8633 9797 10403
> 
> > > 101 31
> 
> > > 6 6 6 4 6 6 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 
> > > 3599 4087 4757 5183 5767 6557 7387 8633 9797 10403
> 
> > > 101 30
> 
> > > 6 6 15 15 6 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 
> > > 3599 4087 4757 5183 5767 6557 7387 8633 9797 10403
> 
> > > 101 27
> 
> > > 4 4 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 3599 
> > > 4087 4757 5183 5767 6557 7387 8633 9797 10403
> 
> > > 101 25
> 
> > > 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 3599 4087 
> > > 4757 5183 5767 6557 7387 8633 
> > > 969999999999999999999999999999999999999999999999999999999999999999999999999999999999998933
> > >  
> > > 999999999999999999999999999999999999999999999999999999999999999999999999999999999999998790000000000000000000000000000000000000000000000000000000000000000000000000000000000000121
> 
> > > 
> 
> > > The output should be:
> 
> > > 
> 
> > > Case #1: ABABAABABCDEFGHIJKLMNOPQRSTUVWXYZ
> 
> > > Case #2: ABABCBABCDEFGHIJKLMNOPQRSTUVWXYZ
> 
> > > Case #3: BABAABABCDEFGHIJKLMNOPQRSTUVWXYZ
> 
> > > Case #4: BABCBABCDEFGHIJKLMNOPQRSTUVWXYZ
> 
> > > Case #5: AAABCDEFGHIJKLMNOPQRSTUVWXYZ
> 
> > > Case #6: ABCDEFGHIJKLMNOPQRSTUVWXYZ
> 
> > > 
> 
> > > Hope this helps
> 
> > 
> 
> > Now How can it be explained ?
> 
> > even your test cases are running successfully!!
> 
> > 
> 
> > Still the codejam interface showing RE !! Astonishining!!
> 
> > 
> 
> > def factors(n):
> 
> >     ls=[]
> 
> >     for i in range(2,n//2+1):
> 
> >         if n%i==0:
> 
> >             ls.append(i)
> 
> >             break
> 
> >     ls.append(n//ls[0])
> 
> > 
> 
> >     return ls
> 
> > 
> 
> > 
> 
> > t=int(input())
> 
> > #start_time = time.time()
> 
> > 
> 
> > for ix in range(1,t+1):
> 
> >     n,l=map(int,input().rstrip().split(" "))
> 
> >     s=str(input().rstrip())
> 
> >     ls=list(s.split(" "))
> 
> >     j=0
> 
> >     dict={}
> 
> >     al=[]
> 
> >     nm=[]
> 
> > 
> 
> >     for i in range(65,92):
> 
> >         al.append(chr(i))
> 
> >     fls=[]
> 
> > 
> 
> > 
> 
> >     for i in ls:
> 
> >         fls.append(factors(int(i)))
> 
> > 
> 
> > 
> 
> >     l=factors(int(ls[0]))
> 
> >     if int(ls[1])%l[0]==0:
> 
> >         pv=l[0]
> 
> >         ov=l[1]
> 
> >     else:
> 
> >         pv=l[1]
> 
> >         ov=l[0]
> 
> >     lll=[]
> 
> >     lll.append(ov)
> 
> >     lll.append(pv)
> 
> >     for i in range(1,len(ls)):
> 
> >         pv=int(ls[i])//pv
> 
> >         lll.append(pv)
> 
> > 
> 
> >     llp=sorted(list(set(lll)))
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> >     llt=[]
> 
> >     for i in lll:
> 
> >         llt.append(al[llp.index(i)])
> 
> > 
> 
> > 
> 
> >     strg="".join(llt)
> 
> >     print("Case #{}: {}".format(ix,strg))
> 
> >     #print("--- %s seconds ---" % (time.time() - start_time))
> 
> > 
> 
> > 
> 
> > You can check and PLEASE PROVIDE A FEEDBACK WHATS WRONG???
> 
> 
> 
> Try this one:
> 
> 1
> 
> 101 30
> 
> 6 6 4 6 6 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 3599 
> 4087 4757 5183 5767 6557 7387 8633 9797 10403
> 
> 
> 
> The output should be:
> 
> Case #1: ABAABABCDEFGHIJKLMNOPQRSTUVWXYZ
> 
> 
> 
> Whereas your code returns this:
> 
> Case #1: CBCAEAEBODPFQGRHSITJUKVLWMXNYOZ
> 
> 
> 
> -- 
> 
> 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 googl...@googlegroups.com.
> 
> To post to this group, send email to googl...@googlegroups.com.
> 
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/google-code/b8bd402e-1685-4057-89b9-33d6d62f23b3%40googlegroups.com.
> 
> For more options, visit https://groups.google.com/d/optout.

Try this one:

1
101 30
6 6 6 9 9 6 10 35 77 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 3599 
4087 4757 5183 5767 6557 7387 8633 9797 10403

Expected output:
Case #1: ABABBBACDEFGHIJKLMNOPQRSTUVWXYZ

Your output:
Case #1: BABACABBEDGEIFMGPHRJSKTLUNVOWQX

-- 
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 post to this group, send email to google-code@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/77f02ff4-5533-4e3a-a038-2b794e498a71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to