Nasty Hacks

From Progteam

Revision as of 00:31, 26 September 2008 by Mlc413 (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Checkmark.jpg This problem has been solved by mlc413.


Nasty Hacks
Problem Number 3030
Sorter: mlc413
Source: Unknown
Link: http://acm.pku.edu.cn/JudgeOnline/problem?id=3030



Nasty Hacks is problem number 3030 on the Peking University ACM site.

import java.util.*;

public class Main{

    public static Scanner in;
 
    public static void main(String[] args){
        in=new Scanner(System.in);

        doStuff();
    }

    public static void doStuff(){
        int N=in.nextInt();

        for(int i=0;i<N;i++){
            solve();
        }
    }

    public static void solve(){
	int r = in.nextInt();
	int e = in.nextInt();
	int c = in.nextInt();
	
	int a = e - r;
	
	if(a > c){
	    System.out.println("advertise");
	}
	else if ( a < c ){
	    System.out.println("do not advertise");
	}
	else{
	    System.out.println("does not matter");
	}
	
	
    }
}


Personal tools