A: Robot programming problem:↵
Logic:↵
P R S ↵
0 0 0 break;↵
0 0 1 +R break;↵
0 1 0 +P break;↵
0 1 1 +R (S removed as R will defeat S)↵
1 0 0 +S break;↵
1 0 1 +S (P removed as S will defeat P)↵
1 1 0 +P (R removed as P will defeat R)↵
1 1 1 impossible to defeat all,break;↵
Code:↵
https://shashankmishracoder.wordpress.com/2019/05/07/google-code-jam19-round-1c-robot-programming-strategy/↵
↵
B: Power Ranger:↵
https://shashankmishracoder.wordpress.com/2019/05/07/google-code-jam19-round-1c-power-rangers/
Logic:↵
P R S ↵
0 0 0 break;↵
0 0 1 +R break;↵
0 1 0 +P break;↵
0 1 1 +R (S removed as R will defeat S)↵
1 0 0 +S break;↵
1 0 1 +S (P removed as S will defeat P)↵
1 1 0 +P (R removed as P will defeat R)↵
1 1 1 impossible to defeat all,break;↵
Code:↵
https://shashankmishracoder.wordpress.com/2019/05/07/google-code-jam19-round-1c-robot-programming-strategy/↵
↵
B: Power Ranger:↵
https://shashankmishracoder.wordpress.com/2019/05/07/google-code-jam19-round-1c-power-rangers/