CF36D - New Game with a Chess Piece

题意翻译

**题目大意:**一个游戏:有一个大小为$n*m$的棋盘。比赛开始时,棋子在棋盘的左上角。两名选手轮流移动棋子。每一轮中选手可以让棋子向右移动格,也可以让棋子向下移动一格,或者让棋子向右对角向下跳$k$格,直到有一个选手不能让棋子移动为止,这个时候这个选手就输了。 总共有$t$组数据,对于每组数据给出$n,m,k,$要你预测最后的结果,第一个选手赢了输出$"+"$,第二个选手赢了输出$"-"$ **输入格式:** 第一行一个数字$t$,表示测试数据的组数 第$2$至第$t+1$行,每行三个数$k,n,m(RT)$ **输出格式** 共$t$行 对于每组测试数据,输出最后的结果$.$ **数据范围** $1<=t<=20202$ $1<=n,m<=10^{9}$ $1<=k<=10^{9}$ $P.s$我翻译打了这么多是不是有点多管闲事? 我看别人只打了题目简述,输入输出格式和数据范围都没打$QwQ$

题目描述

Petya and Vasya are inventing a new game that requires a rectangular board and one chess piece. At the beginning of the game the piece stands in the upper-left corner of the board. Two players move the piece in turns. Each turn the chess piece can be moved either one square to the right or one square down or jump **_k_** squares diagonally down and to the right. The player who can’t move the piece loses. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/SP7602/2191bb02885d1f416854f3f2d427568e09369507.png)The guys haven’t yet thought what to call the game or the best size of the board for it. Your task is to write a program that can determine the outcome of the game depending on the board size.

输入输出格式

输入格式


The first input line contains one integer 1 ≤ **_t_** ≤ 20202. Each of the following **_t_** lines contains three numbers: **_k_** and **_n_**, **_m_** - the jump length and the board’s length and width (1 ≤ **_n, m ,k_** ≤ 10 $ ^{9} $ ).

输出格式


Output **_t_** lines that can determine the outcomes of the game on every board. Write «+» if the first player is a winner, and «-» otherwise.

输入输出样例

输入样例 #1

10
1 1 1
1 2 1
2 1 2
2 2 2
1 3 2
2 3 2
3 1 3
3 2 3
3 3 3
4 3 3

输出样例 #1

-
+
+
-
+
+
-
+
-
-