It's not good.
I solved 256-score problem. However, I can't solve other problems.
I read 512-score problem. I can't solve this because I can't know algorithms.
1024-score problem, I think I solved. However, it's wrong. I noticed my reading was wrong. There were 10 minutes to retry this, so I gave up.
Problems are here.Placed 553/1495, Score=231.55.
256-score problem
public class MarbleDecoration{
public static int maxLength(int R, int G, int B){
int maximum=Math.max(Math.max(R,G),B);
int minimum=Math.min(Math.min(R,G),B);
int middle=R+G+B-maximum-minimum;
int ret=0;
if(maximum>=middle+1) ret=middle*2+1;
else if(maximum==middle) ret=middle*2;
return ret;
}
}
0 件のコメント:
コメントを投稿