목차

돌무더기 게임 1

ps
링크acmicpc.net/…
출처BOJ
문제 번호24678
문제명돌무더기 게임 1
레벨골드 3
분류

게임 이론

시간복잡도O(t)
인풋사이즈t<=200,000
사용한 언어Python 3.11
제출기록31256KB / 380ms
최고기록332ms
해결날짜2023/06/13

풀이

코드

"""Solution code for "BOJ 24678. 돌무더기 게임 1".

- Problem link: https://www.acmicpc.net/problem/24678
- Solution link: http://www.teferi.net/ps/problems/boj/24678

Tags: [game theory]
"""

import sys


def main():
    T = int(sys.stdin.readline())
    for _ in range(T):
        x, y, z = [int(x) for x in sys.stdin.readline().split()]
        is_win_pos = x % 2 + y % 2 + z % 2 <= 1
        print('R' if is_win_pos else 'B')


if __name__ == '__main__':
    main()