fork download
  1. import java.util.Scanner;
  2.  
  3. public class Main{
  4. public static void main(String[] args){
  5. Scanner sc = new Scanner(System.in);
  6. int rt = sc.nextInt();
  7. while(rt>0){
  8. int ra = sc.nextInt();
  9. int rb = sc.nextInt();
  10. int rc = sc.nextInt();
  11. if(ra<rb && rb<rc){
  12. System.out.println("STAIR");
  13. }else if(ra<rb && rb>rc){
  14. System.out.println("PEAK");
  15. }else{
  16. System.out.println("NONE");
  17. }
  18.  
  19. rt--;
  20. }
  21. }
  22. }
Success #stdin #stdout 0.12s 56584KB
stdin
7
1 2 3
3 2 1
1 5 3
3 4 1
0 0 0
4 1 7
4 5 7
stdout
STAIR
NONE
PEAK
PEAK
NONE
NONE
STAIR