[code jam] code jam 2019 round 1C - Robot strategy - WA

2022-05-02 Thread Thierry Njike
Hello, I am practicing by solving older code jam problems, and I don't know why my solution is not accepted (WA). Anyone to check my code and tell me what's wrong please? My logic: I define a maxlen which will be the max length of all contestants strategies. I iterate through the list of

[code jam] Re: code jam 2019 round 1C - Robot strategy - WA

2022-05-02 Thread Thierry Njike
throuh remaining contestants to remove beaten > contestants > for k in remaining: > if out[-1] == beat[k[1]]: > contestants.remove(k[0]) > > cpt+=1 > > #limit of interactions > if cpt == 500: > out =

Re: [code jam] Re: Qualification round - Chain reaction (WA) - Python 3.7

2022-04-10 Thread Thierry Njike
Oh okay I see, Thanks for the clarification On Wed, 6 Apr 2022 at 17:10, porker2008 wrote: > When taking min, you should only consider the propagated fun value of the > direct child, not the accumulated sum. > > You also need to increase the recursion depth to avoid runtime error. > > See the

[code jam] Qualification round - Chain reaction (WA) - Python 3.7

2022-04-05 Thread Thierry Njike
Hello everyone, I tried to solve the chain reaction problem using dynamic programming with recursivity. *My logic*: I considered a graph that I built using dictionary where the key is the node number and the value is a list of nodes that point to the key node. The Abyss is my node number 0. So

[gcj] Code Jam round 1A Square Dance works perfectly locally but RE on the judge (PYTHON 3)

2020-04-13 Thread thierry njike
Hello, My code works locally and test completed son the judge but i got Runtime Error on the judge, what's wrong with it please? My code bellow t = int(input()) for ii in range(t): r, c = list(map(int, input().split())) mat = [] for jj in range(r):

Re: [gcj] 2020 Kickstart - Allocation problem - Python - Runtime Error

2020-03-30 Thread thierry njike
Hello, I’ve explained it Check my solution here: https://github.com/Thierrynjike/Kickstart-2020-round-a-allocation On Mon, 30 Mar 2020 at 04:29, Jake Parratt wrote: > So I'm pretty new to python, but I can get this code to solve the problem > just > fine locally but I keep getting Runtime

Re: [gcj] Re: Doubt regarding logic for 2nd problem of CodeJAM 2019

2019-04-09 Thread thierry njike
this is my code for this problem and it worked well #include #include #include using namespace std; void changevalue(pair p, string s, int j); int main() { int T, N, countE = 0, countS = 0; string lydia; string out = ""; vector output(2); cin >> T; output.resize(T);

[gcj] Runtime error

2019-04-07 Thread thierry njike
hello, is anybody here who codes in C++ please? i've also got a Runtime error for the cryptopangan problem even if i got the same output with the sample test. that's my code below: #include #include #include #include using namespace std; pair factor(int n); int main() { int T, N,

Re: [gcj] Code Jam 2018 Practise Sessiion : Senate evacuation

2019-04-05 Thread thierry njike
Ah ok thank you I’ll do like this On Fri, 5 Apr 2019 at 01:10, aabhas chawla wrote: > Case 2 is incorrect. > A becomes absolute majority. > Reverse the approach. > > If total senatora are odd. Remove 1 from max part. > Rest all in pairs. > > > > On Thu, Apr 4,

[gcj] Code Jam 2018 Practise Sessiion : Senate evacuation

2019-04-04 Thread thierry njike
Hello, could anybody help me please? i don't know why i got a Wrong Answer error please what wrong with my output knowing that there are many possible solutions Case #1: AB AB Case #2: AA BC BC A Case #3: CC AB Case #4: BB AA BC best regards :) -- You received this message because you are