Solution - UVa problem 11498 - Division of Nlogonia




সল্যুশন্সঃ
#include<iostream>
using namespace std;
int main()
{
    int K;
    while(cin >> K)
    {
        if(K == 0)
            break;

        int N, M, X, Y;
        cin >> N >> M;
        for(int i=1; i<=K; i++)
        {
            cin >> X >> Y;

            if(X==N || Y==M)
                cout << "divisa" << endl;
            else if(X<N && Y>M)
                cout << "NO" << endl;
            else if(X>N && Y>M)
                cout << "NE" << endl;
            else if(X>N && Y<M)
                cout << "SE" << endl;
            else if(X<N && Y<M)
                cout << "SO" << endl;
        }
    }
    return 0;
}

আলোচনাঃ
নিয়মিত প্রবলেম সলভিং এর উপর না থাকলে সহয় জিনিষ ও মাথায় আসে না।

Comments

Popular posts from this blog

Solution - Codeforces Problem 327B - Hungry Sequence

What is Data Mining? ডাটা মাইনিং কি?

Solution - Timus Problem 1293. Eniya