Submission #3455772
Source Code Expand
#include <bits/stdc++.h> #include <fstream> #include <vector> #include <bitset> #include <unordered_map> #include <algorithm> #include <queue> #include <math.h> #include <iomanip> using namespace std; /********** TEMPLATE STARTS HERE ***********/ #define IOS ios::sync_with_stdio(false), cin.tie(0); #define all(v) v.begin(), v.end() #define F first #define S second #define pb push_back #define PI 3.1415926535897932384626433832795 #define gcd __gcd #define digits(n) (int)(log10(n) + 1) typedef long long ll; typedef pair <int, int> pii; typedef pair <ll, ll> pll; typedef vector <int> vi; typedef vector <long long> vl; typedef vector <pll> vll; typedef vector <pii> vii; const int INF = 0x3f3f3f3f; const int LINF = 0x3f3f3f3f3f3f3f3f; template <typename T, typename U> inline void amin(T &x, U y) { if(y < x) x = y; } template <typename T, typename U> inline void amax(T &x, U y) { if(x < y) x = y; } /********** TEMPLATE ENDS HERE ***********/ main() { IOS int a, b, c, d; cin >> a >> b >> c >> d; if(abs(c - a) <= d || abs(b - a) + abs(c - b) <= d) { cout << "Yes"; } else { cout << "No"; } }
Submission Info
Submission Time | |
---|---|
Task | A - Colorful Transceivers |
User | mihai50000 |
Language | C++14 (GCC 5.4.1) |
Score | 0 |
Code Size | 1179 Byte |
Status | WA |
Exec Time | 1 ms |
Memory | 256 KB |
Compile Error
./Main.cpp:33:18: warning: overflow in implicit constant conversion [-Woverflow] const int LINF = 0x3f3f3f3f3f3f3f3f; ^
Judge Result
Set Name | Sample | All | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 100 | ||||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | 0_000.txt, 0_001.txt, 0_002.txt, 0_003.txt |
All | 0_000.txt, 0_001.txt, 0_002.txt, 0_003.txt, 1_003.txt, 1_004.txt, 1_005.txt, 1_006.txt, 1_007.txt, 1_008.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
0_000.txt | WA | 1 ms | 256 KB |
0_001.txt | AC | 1 ms | 256 KB |
0_002.txt | AC | 1 ms | 256 KB |
0_003.txt | AC | 1 ms | 256 KB |
1_003.txt | AC | 1 ms | 256 KB |
1_004.txt | AC | 1 ms | 256 KB |
1_005.txt | AC | 1 ms | 256 KB |
1_006.txt | AC | 1 ms | 256 KB |
1_007.txt | AC | 1 ms | 256 KB |
1_008.txt | AC | 1 ms | 256 KB |