diff options
| author | omagdy7 <omar.professional8777@gmail.com> | 2022-11-01 11:51:53 +0200 |
|---|---|---|
| committer | omagdy7 <omar.professional8777@gmail.com> | 2022-11-01 11:51:53 +0200 |
| commit | 91ca20b8f78eeeb74fc4eea6eeecdca9fefa5656 (patch) | |
| tree | 0b8fa3a57f5e442c8134f089e64019aba89c5b19 /codechef/OddSumPair | |
| parent | f2c878488b659cd19ccecc9880e042251585fdbb (diff) | |
| download | competitive-programming-91ca20b8f78eeeb74fc4eea6eeecdca9fefa5656.tar.xz competitive-programming-91ca20b8f78eeeb74fc4eea6eeecdca9fefa5656.zip | |
Added new problems
Diffstat (limited to 'codechef/OddSumPair')
| -rwxr-xr-x | codechef/OddSumPair/main | bin | 0 -> 22648 bytes | |||
| -rw-r--r-- | codechef/OddSumPair/main.cpp | 16 | ||||
| -rw-r--r-- | codechef/OddSumPair/main_input0.txt | 5 | ||||
| -rw-r--r-- | codechef/OddSumPair/main_output0.txt | 4 |
4 files changed, 25 insertions, 0 deletions
diff --git a/codechef/OddSumPair/main b/codechef/OddSumPair/main Binary files differnew file mode 100755 index 0000000..2579f03 --- /dev/null +++ b/codechef/OddSumPair/main 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 |
