diff --git a/1721B Deadly Laser/1721B.cpp b/1721B Deadly Laser/1721B.cpp new file mode 100644 index 0000000..2e8c472 --- /dev/null +++ b/1721B Deadly Laser/1721B.cpp @@ -0,0 +1,27 @@ +#include +using namespace std; + +void solve() +{ + int n, m, s1, s2, d; + cin >> n >> m >> s1 >> s2 >> d; + bool pass=true; + if (s1+d>=n && s2+d>=m) pass=false; + else if (s1-d<=1 && s2-d<=1) pass=false; + else if (s1+d>=n && s1-d<=1) pass=false; + else if(s2+d>=m && s2-d<=1) pass=false; + if(pass) cout<> TC; + cin.ignore(); + while (TC--) + solve(); +} \ No newline at end of file