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-27 Thread Alexander Iskhakov
Thanks Branyine, your idea works! I missed a simple trick of "extending" the base of binary system with -1 :) With this and continuation the process until both numbers doesn't have both 0s in the middle I managed to code and got all 3 PASS. Unfortunately in "Practice mode", but still happy.

[gcj] Re: [1A][Square Dance][JAVA] WA, how so ?

2020-04-27 Thread vijender ahlawat
Yeah there is a constraint of 40 seconds per test set. I too spent hours figuring it out. If you check the analysis section it mentions the algo. can be made to run in O (R x C) time. If u can incorporate those 2 optimisations you should be able to reduce the execution time. On Friday, 24

[gcj] Re: RobotPathDecoding

2020-04-27 Thread PAGADALA SAINADTH
Great! it worked, it is given that there would be atmost 10^4 steps that's why i used (int). Thanks for making time to debug it. I appreciate it. On Saturday, April 25, 2020 at 1:16:00 AM UTC+5:30, porker2008 wrote: > > You need to use long long to handle intermediate result, otherwise it will

[gcj] Re: Round 1A 2018 - Edge Baking

2020-04-27 Thread vijender ahlawat
Hi Manav, U can post your question in the main forum as solo post in increase its reach. On Friday, 24 April 2020 02:19:55 UTC+5:30, MANAV KUMAR wrote: > > Hello Everyone, > I am Manav Kumar 3rd year undergrad. > I am new to this group. I was just practicing previous years problem and > got

[gcj] Re: BuildingPalindromes

2020-04-27 Thread porker2008
Your solution has time complexity O(N^2) for each query which is too slow to pass Test set 2 In order to pass test set 2, you need to calculate the number of A to Z in a given prefix. Then use this prefix to calculate the number of A to Z in any given range Then for any given range, check if at

Re: [gcj] C++, Parenting Partnering Returns, Qualification Round 2020. Help to find out the cause for fault!!!

2020-04-27 Thread porker2008
Hey jawa, You need to process all activities based on the start time. If you greedily assign activity in the given order, you will fail the following input Sample Input *1* *4* *1 2* *1 5* *5 6* *2 6* Expected output: *Case #1: CJJC* However, your solution answers *IMPOSSIBLE* -- You