Page 1 of 1

Re: 11498 - Division of Nlogonia

Posted: Wed Nov 19, 2014 1:42 am
by Xenon Kfr
what is wrong ? why wa ?

Code: Select all

#include<stdio.h>
int main()
{
    long long t,m,n,i,a,b;
    while((scanf("%lld",&t)))
    {
        if(t==0)
            break;
        scanf("%lld%lld",&m,&n);
        for(i=0;i<t;i++)
        {
            scanf("%lld%lld",&a,&b);
            if(a==m || b==n)
                printf("divisa\n");
            else if(a>m && b>n)
                printf("NE\n");
            else if(a<m && b<n)
                printf("SO\n");
            else if(a>m && b<m)
                printf("SE\n");
            else if(a<m && b>m)
                printf("NO\n");

        }
    }
    return 0;
}

Re: 11498 - Division of Nlogonia

Posted: Wed Nov 19, 2014 10:46 am
by lighted
Input

Code: Select all

1
1 4
5 2

1
4 1
2 3

0
Acc Output

Code: Select all

SE
NO

Re: 11498 - Division of Nlogonia

Posted: Mon Mar 23, 2015 8:56 pm
by hemagoku
why does the following give a compiler error ? it is created in C++ on VS.
http://codepad.org/k8pYHeyu

Re: 11498 - Division of Nlogonia

Posted: Tue Mar 31, 2015 12:39 am
by brianfry713
#include <stdio.h>

Re: 11498 - Division of Nlogonia

Posted: Wed Jun 10, 2015 4:12 pm
by jafor.ruetcse13
why the following code show time limit exist..........

Code: Select all

#include<stdio.h>
int main()
{
    int k,c1,c2,x,y,i;
    while(scanf("%d\n",&k)!=0)
    {
        scanf("%d%d\n",&c1,&c2);
        for(i=0;i<k;i++){
            scanf("%d%d\n",&x,&y);

             if(x>c1 && y>c2)
                printf("NE\n");
           else if(x<c1 && y>c2)
                printf("NO\n");
           else if(x<c1 && y<c2)
                printf("SO\n");
            else if(x>c1 && y<c2)
                printf("SE\n");
              else
                printf("divisa\n");
        }
    }
    return 0;

}
please anyone help me