From ff4e45c7e99a42133c06c0c400e56785c13ed6bd Mon Sep 17 00:00:00 2001 From: PraneethaChebolu <73180959+PraneethaChebolu@users.noreply.github.com> Date: Sat, 30 Oct 2021 22:39:35 +0530 Subject: [PATCH] Create A. Red and Blue Beans.cpp --- Codeforces_Problem/A. Red and Blue Beans.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 Codeforces_Problem/A. Red and Blue Beans.cpp diff --git a/Codeforces_Problem/A. Red and Blue Beans.cpp b/Codeforces_Problem/A. Red and Blue Beans.cpp new file mode 100644 index 0000000..b776576 --- /dev/null +++ b/Codeforces_Problem/A. Red and Blue Beans.cpp @@ -0,0 +1,18 @@ +#include + +using namespace std; + +int main() { + int t; + cin >> t; + while (t--) { + long long int r, b, d; + cin >> r >> b >> d; + if (r > b) + swap(r, b); + + cout << (r + r * d >= b ? "YES" : "NO") << endl; + } + + +}