Click Here to go back to the homepage.

Nasty Hacks Solution:


import java.util.*;

public class Kattis {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int cases = Integer.parseInt(sc.nextLine());
        for(int i = 0; i < cases; i++){
            String[] splitLine = sc.nextLine().split(" ");
            if(Integer.parseInt(splitLine[1]) - Integer.parseInt(splitLine[2]) > Integer.parseInt(splitLine[0]))
                System.out.println("advertise");
            else if(Integer.parseInt(splitLine[1]) - Integer.parseInt(splitLine[2]) == Integer.parseInt(splitLine[0]))
                System.out.println("does not matter");
            else
                System.out.println("do not advertise");
        }
    }
}