- 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
- 0 represent count that hand for jth column is zero
- 1 represent count that hand for jth column of not yet defeated players is not zero
- 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/
- feel free to ask any doubt about solution any optimisation or alternate solution will be appreciated.
Auto comment: topic has been updated by Storm_Stark (previous revision, new revision, compare).
Auto comment: topic has been updated by Storm_Stark (previous revision, new revision, compare).
Auto comment: topic has been updated by Storm_Stark (previous revision, new revision, compare).
Auto comment: topic has been updated by Storm_Stark (previous revision, new revision, compare).
Auto comment: topic has been updated by Storm_Stark (previous revision, new revision, compare).