You are viewing a single comment's thread. Return to all comments →
Better:
static int boolToInt(boolean condition){ int retorno = (condition)?1:0; return retorno; } static int[] solve(int a0, int a1, int a2, int b0, int b1, int b2){ int[] retorno = new int[2]; retorno[0] = 0; //Alice retorno[1] = 0; //Bob retorno[0] = boolToInt(a0>b0)+boolToInt(a1>b1)+boolToInt(a2>b2); retorno[1] = boolToInt(a0<b0)+boolToInt(a1<b1)+boolToInt(a2<b2); return retorno; }
Seems like cookies are disabled on this browser, please enable them to open this website
Compare the Triplets
You are viewing a single comment's thread. Return to all comments →
Better: