From 91ca20b8f78eeeb74fc4eea6eeecdca9fefa5656 Mon Sep 17 00:00:00 2001 From: omagdy7 Date: Tue, 1 Nov 2022 11:51:53 +0200 Subject: Added new problems --- codechef/OddSumPair/main | Bin 0 -> 22648 bytes codechef/OddSumPair/main.cpp | 16 ++++++++++++++++ codechef/OddSumPair/main_input0.txt | 5 +++++ codechef/OddSumPair/main_output0.txt | 4 ++++ 4 files changed, 25 insertions(+) create mode 100755 codechef/OddSumPair/main create mode 100644 codechef/OddSumPair/main.cpp create mode 100644 codechef/OddSumPair/main_input0.txt create mode 100644 codechef/OddSumPair/main_output0.txt (limited to 'codechef/OddSumPair') diff --git a/codechef/OddSumPair/main b/codechef/OddSumPair/main new file mode 100755 index 0000000..2579f03 Binary files /dev/null and b/codechef/OddSumPair/main differ diff --git a/codechef/OddSumPair/main.cpp b/codechef/OddSumPair/main.cpp new file mode 100644 index 0000000..174d714 --- /dev/null +++ b/codechef/OddSumPair/main.cpp @@ -0,0 +1,16 @@ +#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; + cin >> a >> b >> c; + int sum = (a & 1) + (b & 1) + (c & 1); + cout << (sum == 1 || sum == 2 ? "YES" : "NO") << endl; + } +} diff --git a/codechef/OddSumPair/main_input0.txt b/codechef/OddSumPair/main_input0.txt new file mode 100644 index 0000000..b45ce37 --- /dev/null +++ b/codechef/OddSumPair/main_input0.txt @@ -0,0 +1,5 @@ +4 +1 2 3 +8 4 6 +3 3 9 +7 8 6 diff --git a/codechef/OddSumPair/main_output0.txt b/codechef/OddSumPair/main_output0.txt new file mode 100644 index 0000000..c8cd351 --- /dev/null +++ b/codechef/OddSumPair/main_output0.txt @@ -0,0 +1,4 @@ +YES +NO +NO +YES -- cgit v1.2.3