[gcj] Re: Inexplicable "Wrong Answer" (Blindfolded Bullseye, Round 1B 2020)

2020-04-22 Thread porker2008
This is an interactive problem, so the input data may not be fixed. i.e. the location of the center may change each time you submit your solution. Since you have a bug in your code (not correctly handle the right bounday), so in rare cases, your solution would fail. -- You received this

[gcj] Round 1A: Pattern Matching

2020-04-22 Thread Devesh Patel
I am getting runtime error. However, the script produces correct output without any error on my pc. import re patterns = [] list_of_permutations = [] def main(): global patterns number_of_cases = int(input()) for i in range(number_of_cases): number_of_patterns =

[gcj] Round 1A 2020: Pattern Matching

2020-04-22 Thread Devesh Patel
I am getting RE (Runtime Error). However, the program is producing correct results without any error on my pc. import re patterns = [] list_of_permutations = [] def main(): global patterns number_of_cases = int(input()) for i in range(number_of_cases): number_of_patterns =

Re: [gcj] 2020 1B P1 Expogo: solution using bitwise operations. (fails with WA though). Am I wrong with the approach or is just a bug in code?

2020-04-22 Thread branyine . sulak . katalin
> one more check for IMPOSSIBLE before output is that (a) + 1 is the power of 2 to avoid > cases like 101 and 110, I think that you missed the possibility not only convert two overlapping bits, but also covering missing bits. You

[gcj] Re: Round 1B 2020 Expogo - WA For Test Set 3

2020-04-22 Thread Bob Shepard
Ah, very nice, thanks for the analysis! On Wednesday, April 22, 2020 at 11:30:08 AM UTC-4, porker2008 wrote: > > Try the following test case > > Input > *1* > *0 536870911* > > Expected output: > *Case #1: N* > > The problem is that for the case above, *min_jumps*

Re: [gcj] Round 1B 2020 Blindfolded Bullseye: method of finding initial point in dartboard

2020-04-22 Thread Arti Schmidt
You're right, I missed that and it works after fixing. Thanks! On Wednesday, April 22, 2020 at 11:51:32 AM UTC-4, Luke Pebody wrote: > > One possible issue in your problem is you don't check any of the initial > queries for if they are equal to 'CENTER' > > On Wed, 22 Apr 2020, 16:32 Arti

Re: [gcj] Runtime Error(RE) in codeJam 2020 Vestigium problem

2020-04-22 Thread kamujula srikar
Thanks paul you are right . On Wed, 8 Apr, 2020, 03:31 Paul Smith, wrote: > I think for Java solutions the class must be called Solution. > Paul Smith > > p...@pollyandpaul.co.uk > > > On Tue, 7 Apr 2020 at 01:59, kamujula srikar > wrote: > >> Guys , I am getting an runtime error when I try

Re: [gcj] Round 1B 2020 Blindfolded Bullseye: method of finding initial point in dartboard

2020-04-22 Thread Luke Pebody
One possible issue in your problem is you don't check any of the initial queries for if they are equal to 'CENTER' On Wed, 22 Apr 2020, 16:32 Arti Schmidt, wrote: > In Round 1B 2020 I'm getting TLE on test set 3 for Blindfolded Bullseye > using nearly the same strategy explained in the analysis

[gcj] Round 1B 2020 Blindfolded Bullseye: method of finding initial point in dartboard

2020-04-22 Thread Arti Schmidt
In Round 1B 2020 I'm getting TLE on test set 3 for Blindfolded Bullseye using nearly the same strategy explained in the analysis (binary search from a point in the dartboard to the edge of the wall in four directions and find midpoints). The only difference is how I am finding the initial

[gcj] Re: Inexplicable "Wrong Answer" (Blindfolded Bullseye, Round 1B 2020)

2020-04-22 Thread XYZT
This doesn't make sense though, because I always check (0, 0) for a HIT first, which should always be True in the first two test sets. Therefore, none of the "random generator" part of the code is ever executed in those test sets. On Monday, 20 April 2020 18:05:54 UTC-4, porker2008 wrote: > >

Re: [gcj] Re: 2020 1B P1 Expogo: solution using bitwise operations. (fails with WA though). Am I wrong with the approach or is just a bug in code?

2020-04-22 Thread Alexander Iskhakov
Hi Vikram, Thanks a lot for your answer, that explains what is wrong! Indeed, the transform() cannot be that "greedy" as I thought. On Wednesday, 22 April 2020 03:17:24 UTC+8, Aditya Vikram Jain wrote: > > Hi Alexander, > > I used similar approach and I think I found out why it is wrong,

[gcj] CodeJam 2020 1A Pattern Matching Java

2020-04-22 Thread Berend
Hi, I'm having problems with this problem, my code is: import java.io.*; import java.util.Scanner; public class Solution { public static void main(String[] args) throws FileNotFoundException { // File file = new

[gcj] Practise Round Code Jam 2020 1A Pattern Matching Java

2020-04-22 Thread Berend
I'm getting runtime errors and don't know why? Whats my error? As there are no test tests without asterixes this should work I figured. import java.io.*; import java.util.Scanner; public class Solution { public static void main(String[] args) throws FileNotFoundException { Scanner

[gcj] Re: Inexplicable "Wrong Answer" (Blindfolded Bullseye, Round 1B 2020)

2020-04-22 Thread XYZT
Thanks for catching this. But this doesn't explain why the code passes the Test Sets all but once. On Monday, 20 April 2020 18:09:47 UTC-4, porker2008 wrote: > > Also, your *binary_search_right()* is incorrect, it fails when *left = > 10**9 - 1* and *func(10**9)* is *HIT* > In this case, it

[gcj] Kick Start Round B Wandering Robot

2020-04-22 Thread samine bagheri
Hello everybody, I am pretty new to this google group. In general I have recently got to know about Kick Start and Code Jam competition. So excuse my lack of familiarty and possibly studpid questions. I have attended to the Kick Start Round B. I found the problems interesting and fun to

[gcj] Re: Round 1B 2020 Expogo - WA For Test Set 3

2020-04-22 Thread porker2008
Try the following test case Input *1* *0 536870911* Expected output: *Case #1: N* The problem is that for the case above, *min_jumps* should be *29* However, due to floating point precision error, your *min_jumps* is rounded up to *30* The following code will fix