Skip to content

Commit 3b8466b

Browse files
authored
atcoder solutions in cpp
1 parent 0ba026c commit 3b8466b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Colorful Transceivers.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include <iostream>
2+
using namespace std;
3+
4+
int main()
5+
{
6+
int a, b, c, d;
7+
cin >> a >> b >> c >> d;
8+
9+
if (abs(c - a) <= d || (abs(a - b) <= d && abs(b - c) <= d))
10+
cout << "Yes" << endl;
11+
else
12+
cout << "No" << endl;
13+
return 0;
14+
}

0 commit comments

Comments
 (0)