Skip to content

Instantly share code, notes, and snippets.

@Biazus
Created August 22, 2014 14:24
Show Gist options
  • Save Biazus/f7333cd1793fd6488c87 to your computer and use it in GitHub Desktop.
Save Biazus/f7333cd1793fd6488c87 to your computer and use it in GitHub Desktop.
Desafios: Division of NLogonia
//Division of NLogonia
#include <iostream>
using namespace std;
int main() {
int n, px, py, x, y;
cin >> n;
while (1) {
cin >> px >> py;
while (1) {
cin >> x >> y;
if (x == px || y == py)
cout << "divisa";
else if (x < px && y > py)
cout << "NO";
else if (x > px && y > py)
cout << "NE";
else if (x > px && y < py)
cout << "SE";
else if (x < px && y < py)
cout << "SO";
cout << endl;
if(n==0) break;
n--;
}
cin >> n;
n--;
if(n==0) break;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment