aboutsummaryrefslogtreecommitdiff
path: root/codechef/OddSumPair
diff options
context:
space:
mode:
Diffstat (limited to 'codechef/OddSumPair')
-rwxr-xr-xcodechef/OddSumPair/mainbin0 -> 22648 bytes
-rw-r--r--codechef/OddSumPair/main.cpp16
-rw-r--r--codechef/OddSumPair/main_input0.txt5
-rw-r--r--codechef/OddSumPair/main_output0.txt4
4 files changed, 25 insertions, 0 deletions
diff --git a/codechef/OddSumPair/main b/codechef/OddSumPair/main
new file mode 100755
index 0000000..2579f03
--- /dev/null
+++ b/codechef/OddSumPair/main
Binary files 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<bits/stdc++.h>
+
+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