311208: CF1950A. Stair, Peak, or Neither?

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:10 Solved:0

Description

A. Stair, Peak, or Neither?time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

You are given three digits $a$, $b$, and $c$. Determine whether they form a stair, a peak, or neither.

  • A stair satisfies the condition $a<b<c$.
  • A peak satisfies the condition $a<b>c$.
Input

The first line contains a single integer $t$ ($1 \leq t \leq 1000$) — the number of test cases.

The only line of each test case contains three digits $a$, $b$, $c$ ($0 \leq a$, $b$, $c \leq 9$).

Output

For each test case, output "STAIR" if the digits form a stair, "PEAK" if the digits form a peak, and "NONE" otherwise (output the strings without quotes).

ExampleInput
7
1 2 3
3 2 1
1 5 3
3 4 1
0 0 0
4 1 7
4 5 7
Output
STAIR
NONE
PEAK
PEAK
NONE
NONE
STAIR

Output

题目大意:
这个题目要求判断三个数字 \(a\), \(b\), 和 \(c\) 是否能形成一个楼梯(Stair)、一个山峰(Peak),或者两者都不是。楼梯满足条件 \(a < b < c\),山峰满足条件 \(a < b > c\)。

输入输出数据格式:
输入:
- 第一行包含一个整数 \(t\)(\(1 \leq t \leq 1000\))——测试用例的数量。
- 每个测试用例包含一行,其中有三个数字 \(a\), \(b\), \(c\)(\(0 \leq a, b, c \leq 9\))。

输出:
- 对于每个测试用例,如果数字形成一个楼梯,输出 "STAIR";如果形成山峰,输出 "PEAK";否则输出 "NONE"(输出字符串不带引号)。题目大意: 这个题目要求判断三个数字 \(a\), \(b\), 和 \(c\) 是否能形成一个楼梯(Stair)、一个山峰(Peak),或者两者都不是。楼梯满足条件 \(a < b < c\),山峰满足条件 \(a < b > c\)。 输入输出数据格式: 输入: - 第一行包含一个整数 \(t\)(\(1 \leq t \leq 1000\))——测试用例的数量。 - 每个测试用例包含一行,其中有三个数字 \(a\), \(b\), \(c\)(\(0 \leq a, b, c \leq 9\))。 输出: - 对于每个测试用例,如果数字形成一个楼梯,输出 "STAIR";如果形成山峰,输出 "PEAK";否则输出 "NONE"(输出字符串不带引号)。

加入题单

算法标签: