poj3030

#include <stdio.h>
#include <stdlib.h>

int main()
{
    int n,r,e,a;
    scanf("%d",&n);
    while(n--)
    {
        scanf("%d %d %d",&r,&e,&a);
        if((e-r) > a)
            printf("advertise\n");
        else if((e-r) == a)
            printf("does not matter\n");
        else
            printf("do not advertise\n");
    }
    return 0;
}

时间: 2024-10-26 12:40:04

poj3030的相关文章

poj3030(欧拉函数)

Visible Lattice Points Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 8101   Accepted: 4963 Description A lattice point (x, y) in the first quadrant (x and y are integers greater than or equal to 0), other than the origin, is visible fr

poj3030(欧拉函数2 O(n))

用O(n),算法优化 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int maxn=2000; int phi[maxn],totans[maxn],prime[maxn],v[maxn]; int getphi(int n){ int top=0; for (int i=2;i<=n;i++){ if(v[i]==0){ prime[++top