From 1ccba7112b334c0887bd349966219b38eb9ccfb9 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Sun, 10 Dec 2023 15:55:42 +0200 Subject: Removed some empty problems and solved 2 problems in rust --- contests/Starters41/C/inp | 5 +++++ contests/Starters41/C/main.cpp | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100755 contests/Starters41/C/inp create mode 100755 contests/Starters41/C/main.cpp (limited to 'contests/Starters41/C') diff --git a/contests/Starters41/C/inp b/contests/Starters41/C/inp new file mode 100755 index 0000000..969fe00 --- /dev/null +++ b/contests/Starters41/C/inp @@ -0,0 +1,5 @@ +4 +5 10 2 12 +10 30 15 15 +20 8 4 20 +6 6 6 6 diff --git a/contests/Starters41/C/main.cpp b/contests/Starters41/C/main.cpp new file mode 100755 index 0000000..8ee0595 --- /dev/null +++ b/contests/Starters41/C/main.cpp @@ -0,0 +1,24 @@ +#include + + +using namespace std; + +int main() { + ios_base::sync_with_stdio(false); + cin.tie(NULL); + int tt; + cin >> tt; + while (tt--) { + int a, b, c, d; + cin >> a >> b >> c >> d; + int mx1 = max(a, b); + int mx2 = max(c, d); + if (mx1 > mx2) { + cout << "Q" << endl; + } else if (mx2 > mx1) { + cout << "P" << endl; + } else { + cout << "TIE" << endl; + } + } +} -- cgit v1.2.3