2071A - The Play Never Ends

根据题意,简单列了一下演绎的情况,有三个人A B S, S为spectator,一下每行为每场比赛的参赛安排,可以看到每三场比赛,S会重新成为spectator
A 2 S
A S 2
2 S A
2 A S
S A 2
S 2 A
A 2 S
。。。


public class App {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        int n = Integer.parseInt(sc.nextLine());
        for (int i = 0; i < n; ++i) {
            int k = sc.nextInt();
            
            System.out.println(k % 3 == 1 ? "YES" : "NO");
            sc.nextLine();
            
        }
        sc.close();
    }
}
posted @ 2025-03-24 11:00  kayaker  阅读(13)  评论(0)    收藏  举报