Skip to content

Instantly share code, notes, and snippets.

@oskimura
Created December 12, 2017 11:56
Show Gist options
  • Select an option

  • Save oskimura/5ad6d85d1578bf44d73c0f6eb3542fe3 to your computer and use it in GitHub Desktop.

Select an option

Save oskimura/5ad6d85d1578bf44d73c0f6eb3542fe3 to your computer and use it in GitHub Desktop.
#include "iostream"
#include <cmath>
int main()
{
long w, h, x, y, r;
std::cin >> w >> h >> x >> y >> r;
if (x+r > w || (x-r) < 0) {
std::cout << "No" << std::endl;
return 0;
}
if (y+r > h || (y - r) < 0) {
std::cout << "No" << std::endl;
return 0;
}
std::cout << "Yes" << std::endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment