[Question]
  [
# ~~Code~~Drawing one-liner
# Teaser
Behold this formidable drawing:
![](https://i.stack.imgur.com/g5NE8.png)
Can you draw this in a single stroke? Give it a try.
Can you do this one, now:
![](https://i.stack.imgur.com/eEK23.png)
Give it a try.
# How it works
These "make this drawing with one pen stroke" problems are [graph-theory](/questions/tagged/graph-theory "show questions tagged 'graph-theory'") problems with a rather simple solution. For each vertex, compute its degree. If all vertices have an even degree or if only two vertices have an odd degree, this is possible. In any other case, it is impossible. This is the same as finding an [Eulerian path](https://en.wikipedia.org/wiki/Eulerian_path) in the graph. This is also related to the very famous [seven bridges of Königsberg](https://en.wikipedia.org/wiki/Seven_Bridges_of_K%C3%B6nigsberg) puzzle.
For the first drawing, the degrees are
```
   2
 /   \
4-----4
|\   /|
|  4  |
|/   \|
3-----3
```
so we are in the second possible case, as all numbers are even except for the two 3s in the bottom. What is more, when we have odd numbers, we have to start in one of them and finish in the other. When everything is even, we can start wherever we want but we will finish where we started.
For the second drawing it is impossible, as there are too many odd degrees:
```
     2
   /   \
  5-----5
 /|\   /|\
2 |  4  | 2
 \|/   \|/
  5-----5
   \   /
     2
```
# Task
Given the degrees of the edges as input, decide if a corresponding drawing could be done in a single pen stroke. Output Truthy if such a feat is possible and output Falsy otherwise.
# Input
The degrees of the vertices in any sensible format, such as
* an array of integers like `[2,4,4,4,3,3]` or `[2,5,5,2,4,2,5,5,2]`
* separate arguments to a function, like `f(2,4,4,4,3,3)` or `f(2,5,5,2,4,2,5,5,2)`
# Output
A Truthy value if all numbers are even or exactly two of them are odd, Falsy otherwise.
# Test cases
## Truthy
```
[2, 4, 4, 3, 3]
[2, 2]
[1, 2, 3, 4, 6, 8]
[2, 4, 2, 4, 2, 4, 2, 4]
[8, 6, 8, 2, 2, 3, 11]
[1, 3]
[8]
```
## Falsy
```
[1, 2, 3, 4, 5, 6]
[2, 3]
[9]
[7, 2, 2, 2]
[4, 2, 7]
[3, 3, 3, 3]
[1, 2, 3, 1, 1]
[1, 1, 4, 1, 1]
[7, 7, 7, 7, 7, 7, 7, 7]
```
---
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") so shortest submission in bytes, wins! If you liked this challenge, consider upvoting it... And happy golfing!
  
[Answer]
# [Python](https://docs.python.org/2/), 31 bytes
```
lambda l:sum(n%2for n in l)|2<3
```
[Try it online!](https://tio.run/##ZU9BCoMwELznFXMpKORitNVKfYn1kFKCQkxF40Ho39NkY8FSWHbJ7OxMZtps/zLCqebutBwfTwldL@uYmJNQrxkGg4FO3@KWOzuvtt/QoG0FR0GV@@o4AiDCzPwk1O8uHNW@Kwj@6WFTRRIB8SzLdhVSrbqOMSX1El2P4md/uosT9Rpa@VWiv0SjkjR8FBmixAw1A6Z5MBaSQyUyZYyeByK5/vHcBw "Python 2 – Try It Online")
We use `k|2<3` to check that `k` is either 0 or 2. This works because the bit operation `|2` sets the bit for place-value 2, so to get a result that's 2 or less, there must be no other bits set.
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), 25 bytes
```
(a=Tr@Mod[#,2])==0||a==2&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n277XyPRNqTIwTc/JVpZxyhW09bWoKYm0dbWSO1/QFFmXom@Q7q@QzVXtZGOggkYGQNRrQ5YwAhEGwJpsChQzkxHwQIqZwIWRiFBMhYQRWABiDZDQ6gpYFMt0I00BWqAGglWYAkizGH6wS6AGG8OYhpD3AdVCzcHyIDZYgg2FSYANAgLqq39/x8A "Wolfram Language (Mathematica) – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~5~~ 4 bytes
Thanks to 05AB1E's weird boolification system, any number but 1 is falsy.
-1 Thanks to Jonathan Allan
```
ÉO1α
```
[Try it online!](https://tio.run/##yy9OTMpM/f//cKe/4bmN//9HG@kAYSwA "05AB1E – Try It Online")
# Explanation
```
É     Vectorizing n % 2
 O    Sum the resulting list
  1α  |n - 1|
```
[Answer]
# [Turing Machine But Way Worse](https://github.com/MilkyWay90/Turing-Machine-But-Way-Worse), 1245 bytes
```
0 0 0 1 1 0 0
0 1 0 1 2 0 0
1 2 1 1 3 0 0
1 3 1 1 4 0 0
0 4 0 1 5 0 0
1 4 1 1 5 0 0
0 5 0 1 6 0 0
1 5 1 1 6 0 0
0 6 0 1 7 0 0
1 6 1 1 7 0 0
0 7 0 1 0 0 0
1 7 1 1 8 0 0
0 8 0 1 9 0 0
0 9 0 1 a 0 0
1 a 1 1 b 0 0
1 b 1 1 c 0 0
0 c 0 1 d 0 0
1 c 1 1 d 0 0
0 d 0 1 e 0 0
1 d 1 1 e 0 0
0 e 0 1 f 0 0
1 e 1 1 f 0 0
0 f 0 1 0 0 0
1 f 1 1 8 0 0
0 b 0 1 k 0 0
0 3 0 1 4 0 0
0 g 0 1 h 0 0
0 h 0 1 i 0 0
1 i 1 1 j 0 0
1 j 1 1 k 0 0
0 k 0 1 l 0 0
1 k 1 1 l 0 0
0 l 0 1 m 0 0
1 l 1 1 m 0 0
0 m 0 1 n 0 0
1 m 1 1 n 0 0
0 n 0 1 g 0 0
1 n 1 1 o 0 0
0 o 0 1 p 0 0
0 p 0 1 q 0 0
1 q 1 1 r 0 0
1 r 1 1 s 0 0
0 s 0 1 t 0 0
1 s 1 1 t 0 0
0 t 0 1 u 0 0
1 t 1 1 u 0 0
0 u 0 1 v 0 0
1 u 1 1 v 0 0
0 v 0 1 g 0 0
1 v 1 1 o 0 0
0 r 0 1 A 0 0
0 j 0 1 k 0 0
0 w 0 1 x 0 0
0 x 0 1 y 0 0
1 y 1 1 z 0 0
1 z 1 1 A 0 0
0 A 0 1 B 0 0
1 A 1 1 B 0 0
0 B 0 1 C 0 0
1 B 1 1 C 0 0
0 C 0 1 D 0 0
1 C 1 1 D 0 0
0 D 0 1 w 0 0
1 D 1 1 E 0 0
0 E 0 1 F 0 0
0 F 0 1 G 0 0
1 G 1 1 H 0 0
1 H 1 1 I 0 0
0 I 0 1 J 0 0
1 I 1 1 J 0 0
0 J 0 1 K 0 0
1 J 1 1 K 0 0
0 K 0 1 L 0 0
1 K 1 1 L 0 0
0 L 0 1 w 0 0
1 L 1 1 E 0 0
0 H 0 1 0 0 1
0 z 0 1 A 0 0
0 2 1 1 M 0 0
0 y 1 1 M 0 0
0 q 1 1 M 0 0
0 M 1 1 N 0 0
0 N 0 1 O 0 0
0 O 0 1 P 0 0
0 P 0 1 Q 0 0
0 Q 1 1 0 1 1
0 a 0 1 0 0 1
0 i 0 1 0 0 1
0 G 0 1 0 0 1
```
[Try it online!](https://tio.run/##VdRJTgJBAEbhvafgACxogQaXDDI7HYFRpkaBBoTLIzwemkovOi/fn7LSMaTJ4HA4n3OZ6xNdnsv7Icc7yjxS1/dV8laeKrgssCxqBayoFbFYK2KxFmMlLcZKWilzu8HNSlhZK2NP1hPVd9lnObAG1NDlkOVIG2IjbYSNtRE21sbYRBtjE20S3HMS3HOALaw8df9mn9TUmlIzT5lxytyaU/dTFiyX2gJbakss0ZZYoiXYSkuwlbbCPrUV9qV9Yd/WN7V2uWa5sTbU1uWWZaptsVRLsZ2WYjtth@21HbbX9sE998E9N1jFmgdf/kD9WD/U0VOOnHKyTtT9lArLqlbBqloVq2lVrKbVsLpWw@paHTtodexZe8YaVoNqumyybFktqu2yzbKjtbGO1sG6Wgfral2sp3WxntYL7tkL7tn6@5@PLnUKvvztd@LFOga1DuqFerVeOeXNeqPerXfqw/rwNyrir/eDu8yCav7X@VzOxtly9vHy5LNR9As "Turing Machine But Way Worse – Try It Online")
**Input:** A list like `n, n, n, n, ...`  
**Output:** *(blank)* for falsy, `1` for truthy
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 8 bytes
```
⁼¹↔⊖Σ﹪Ａ²
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRMO1sDQxp1jDUEfBMak4P6e0JFXDJTW5KDU3Na8kNUUjuDRXwzc/pTQnX8Mzr6C0RENTR8FIEwys//@PjrbQUTDTUQCSRmBkrKNgaBgb@1@3LAcA "Charcoal – Try It Online") Link is to verbose version of code. Port of @ovs' 05AB1E answer. Explanation:
```
      Ａ     Input array
     ﹪ ²    Vectorised modulo literal 2
    Σ       Sum
   ⊖        Decremented
  ↔         Absolute
⁼¹          Equals literal 1
```
There are other ways to check for `0` or `2` for the same byte count, such as `Not(Decremented(Absolute(Decremented(...))))`, `Equals(2, BitwiseOr(2, ...))`, or `Count("02", Cast(...))` (careful not to use `"20"` of course).
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 18 bytes
```
M`[13579]\b
^[02]$
```
[Try it online!](https://tio.run/##VYtBCoNQDET3cw6FLmbRJOr/nsBVT6AWLXTRTRel9/8mIqUyBIbJe5/n9/VeS30ZlnJbRrE29fP0wH286lyVomw8RoNSIVTvDTtmxOfvkGP1FoSIo4b8E1p2Lhh6pB1RhJRg3HNwwvDE@WiJp2w "Retina 0.8.2 – Try It Online") Link includes test cases. Explanation:
```
M`[13579]\b
```
Count the number of odd numbers.
```
^[02]$
```
Compare to `0` or `2`.
[Answer]
# JavaScript (ES6), 29 bytes
```
a=>a.map(x=>m>>=x&1,m=5)&&m&1
```
[Try it online!](https://tio.run/##bU7LCoMwELz3K3IKBlIhPmqkJD8iHoLV0mKM1FL8@zTZxKJQWHaXmd2ZeaqPWrrXY36fJ3Pr7SCsElKlWs3JKqSWUqyYUS1KgrHGzHZmWszYp6O5J02TUVRA5a5aijyQ@cncBNRxF4p45AqAD90zPBwBEN4YiyqgytsWEg2EXE/HBHuj0slEI3irfas2VcgVTCu/5iF1vP3puGXzZqC6AU7oT@2S2S8 "JavaScript (Node.js) – Try It Online")
### How?
We start with the bitmask \$m=101\_2=5\_{10}\$ and right-shift it by one position for each odd value in the input array. The final result is given by the parity of \$m\$.
[Answer]
# [Python 3](https://docs.python.org/3/), 34 bytes
```
lambda a:sum(n%2for n in a)in(0,2)
```
[Try it online!](https://tio.run/##ZU9BCoMwELznFXspJJBDE221gi@xHraUoKBRNB58fZpsLFgKyy6ZnZ3JzLvrJpt5Uz/9gOPrjYDVuo3cXrSZFrDQW0DRW36VWni3bK7boYam0RJyqixUKyECOk4VJqFhd5dQHruc4J8eN2UiEZDOlDpUSLVsW8YMDmtyPYvfwukhTtRHbMVXif6SjArSCGkwpkkZKgYwL711HCUYjkIwlt7ixCXjf6r/AA "Python 3 – Try It Online")
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), ~~6~~ 5 bytes
-1 byte thanks to [a'\_'](https://codegolf.stackexchange.com/users/92069/a).
```
ÉO<ÄΘ
```
[Try it online!](https://tio.run/##yy9OTMpM/f//cKe/zeGWczP@/4@20FEw01EAkkZgZKyjYGgYCwA "05AB1E – Try It Online")
### Explanation
```
É       is the number odd (vectorizes over the input list)
 O      sum (number of odd values)
  <     decrement (number of odd values - 1)
   Ä    absolute value (|number of odd values - 1|)
    Θ   equal to 1 (|number of odd values - 1| == 1)
```
[Answer]
# [Bash](https://www.gnu.org/software/bash/) + Unix utilities, 28 bytes
```
dc<<<`grep -c [13579]$`d2-*p
```
[Try it online!](https://tio.run/##S0oszvj/PyXZxsYmIb0otUBBN1kh2tDY1NwyViUhxUhXq@D/fyMuEyA05jIGAA "Bash – Try It Online")
Input is on stdin: one number per line.
Output is on stdout: 0 is truthy, any non-zero value is falsy.
How it works:
* grep counts the number *n* of lines ending with an odd digit;
* dc then computes and prints *n*\*(*n*-2), which is 0 iff *n* equals 0 or 2.
[Answer]
# Excel, 50 bytes
```
=ISNUMBER(FIND(SUMPRODUCT(--(MOD(A:A,2)=1)),"02"))
```
`MOD(A:A,2)=1` to find odd number
`SUMPRODUCT()` to count them
`FIND( ,"02")` to check if `0` or `2`
`ISNUMBER()` to converts to TRUE/FALSE
Feels very clunky, hope to refine...
[Answer]
# [C++ (gcc)](https://gcc.gnu.org/), [73](http://null.link.io "Thanks to @MitchellSpector for the idea of using the size argument") 64 bytes
I don't know why I keep trying.
```
int f(int*a,int s){int o=1;for(;s;)o+=a[--s]%2;return o%2&&o<4;}
```
Commented :
```
int f(int*a,int s){ // function definition
  int o=1;      // odd counter starts at 1 because then parity of truthy inputs is one
  for(;s;)          // Use size arg as counter and iterate backwards (Thanks @MitchellSpector)
    o+=a[--s]%2;    // check for odd, add parity
  return o%2&&o<4;  // Valid values for odd are 0 and 2 (or rather 1 and 3)
                    // Solve with parity and range check
}
```
[TIO-k6qqj7ln](https://tio.run/##jZNdb4IwFIbv/RUnLipsGvmQj624y/2C3akXDVJHosXQcrEYf7srFCkwt5I0pTnn6en7npb4fF4c4vj2lNL4WOwTiNKM8TzBp/dRwVJ6AIpPCTvjOAHG9@iWUg7EEPMznpdrZl7KT7a2EclyAzFkZi9rvFks2G7ioDzhRU4hmzjTaRat0LUqcMIpNUy4jACWS/jMC/71DTFmCROREuDWZgdruDhzWFXDFeOK7lm7yToq6MigLYIVL3b5cwgV4LZr9meFrSQWyu1VVha0bQV5zWEtWX69U0Sksw98ZF1jxPqt0hMnNUWI8qYqk9rbq4rUZoK7PtUIUhuQxgIVrzW7spud@n5PlVgosyRosnYluJsNGyUPhmxFnBUcogjG9VW/wZaOUSsx2/JZ@SUGt0RDTBmjsz@YUqeOEUZ8HSOchjpG@A10jDdAj3hMdodp90U@lH/aQiy9HTKgLcTpy3jAlM9Sx5T/pI7xBtTx9ddNggFM2L/K0fX2Aw "C++ (gcc) – Try It Online")
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), 26 bytes
```
p=>(p.Count(n=>n%2>0)|2)<3
```
[Try it online!](https://tio.run/##Sy7WTS7O/O9Wmpdsk5lXEh2ro5CUn59jp5Bm@7/A1k6jQM85vzSvRCPP1i5P1cjOQLPGSNPG@L81V3hRZkmqT2ZeqkaaRl5quQJYc7WRjoIJGBkDUa2mJh51RnikDYHSYDOAJpnpKFjgN8kErBqFxKPBAmIkWB3EEkNDIp1iCtSK3yn4/GyJR84c5hx8oQLxmzlIxX8A "C# (Visual C# Interactive Compiler) – Try It Online")
Thanks to answer of @xnor -1B
# 27 bytes
```
p=>(p.Count(n=>n%2>0)&-3)<1
```
[Try it online!](https://tio.run/##Sy7WTS7O/O9Wmpdsk5lXEh2ro5CUn59jp5Bm@7/A1k6jQM85vzSvRCPP1i5P1cjOQFNN11jTxvC/NVd4UWZJqk9mXqpGmkZearkCWHe1kY6CCRgZA1GtpiYedUZ4pA2B0mAzgCaZ6ShY4DfJBKwahcSjwQJiJFgdxBJDQyKdYgrUit8p@PxsiUfOHOYcfKEC8Zs5SMV/AA "C# (Visual C# Interactive Compiler) – Try It Online")
This one was my first attempt, but I made mistake at first so I'm publishing it now when I fixed it.
[Answer]
# [Julia 1.0](http://julialang.org/), 15 bytes
```
~v=sum(v.%2)&-3
```
[Try it online!](https://tio.run/##yyrNyUw0rPj/v67Mtrg0V6NMT9VIU03X@D@XQ3FGfrlCXbSRjoIJGBkDUSyysBGCZwjkgVUA1ZnpKFjEomlHJxHyFhANYGGIEYaGKOYi2WmB3UJToBEoFiJpsUQwzWF2ILkb4hxzhIAxxJ8oZsDtAjJQ3WYIth9VGGgNFhTL9R8A "Julia 1.0 – Try It Online")
A port of [Gymhgy's Japt answer](https://codegolf.stackexchange.com/a/199579/8774) (0 as Truthy, other numbers as Falsy).
**17 bytes** porting Arnauld's [JS solution](https://codegolf.stackexchange.com/a/199572/8774) :
`~v=5>>sum(v.%2)%2`
[Try it online!](https://tio.run/##yyrNyUw0rPj/v67M1tTOrrg0V6NMT9VIU9XoP5dDcUZ@uUJdtJGOggkYGQNRLLKwEYJnCOSBVQDVmekoWMSiaUcnEfIWEA1gYYgRhoYo5iLZaYHdQlOgESgWImmxRDDNYXYguRviHHOEgDHEnyhmwO0CMlDdZgi2H1UYaA0WFMv1HwA "Julia 1.0 – Try It Online")
And an obligatory port of the popular 05AB1E solution, at **19 bytes**:
`~v=abs(sum(v.%2)-1)`
[Try it online!](https://tio.run/##yyrNyUw0rPj/v67MNjGpWKO4NFejTE/VSFPXUPM/l0NxRn65Ql20kY6CCRgZA1EssrARgmcI5IFVANWZ6ShYxKJpRycR8hYQDWBhiBGGhijmItlpgd1CU6ARKBYiabFEMM1hdiC5G@Icc4SAMcSfKGbA7QIyUN1mCLYfVRhoDRYUy/UfAA "Julia 1.0 – Try It Online")
[Answer]
# [MATL](https://github.com/lmendo/MATL), 6 bytes
```
osq|1=
```
[Try it online!](https://tio.run/##y00syfmfkKlQEuWnYK9QoacQq/A/v7iwxtD2f4SLQkjs/2gjHQUTMDIGolguEN8ISBkCKbAYUMZMR8ECImMCFkUhgRIWECVgPkSToSHECJCBFmimmQJVQ0wDyVoCsTlMJ8hiiLHmQJYxxE0QdXATgAyo4YZg46B8oBlYUCyXgb4BAA "MATL – Try It Online")
I herd we're portin 05AB1E solutions!
A port of Arnauld's [JS solution](https://codegolf.stackexchange.com/a/199572/8774) while we're at it (8 bytes):  
`osW5w/ko` [Try it online!](https://tio.run/##y00syfmfkKlQEuWnYK9QoacQq/A/vzjctFw/O/9/hItCSOz/aCMdBRMwMgaiWC4Q3whIGQIpsBhQxkxHwQIiYwIWRSGBEhYQJWA@RJOhIcQIkIEWaKaZAlVDTAPJWgKxOUwnyGKIseZAljHETRB1cBOADKjhhmDjoHygGVhQLJeBvgEA "MATL – Try It Online")
And one of [Gymhgy's Japt answer](https://codegolf.stackexchange.com/a/199579/8774) (6 bytes, 0 as Truthy, other numbers as Falsy):  
`os3_Z&` [Try it online!](https://tio.run/##y00syfmfkKlQEuWnYK9QoacQq/A/v9g4Pkrtf4SLQkjs/2gjHQUTMDIGolguEN8ISBkCKbAYUMZMR8ECImMCFkUhgRIWECVgPkSToSHECJCBFmimmQJVQ0wDyVoCsTlMJ8hiiLHmQJYxxE0QdXATgAyo4YZg46B8oBlYUCyXgb4BAA "MATL – Try It Online") (though, `os2FZ:` is a more straightforward implementation of the idea in MATL [Try it online!](https://tio.run/##y00syfmfkKlQEuWnYK9QoacQq/A/v9jILcrqf4SLQkjs/2gjHQUTMDIGolguEN8ISBkCKbAYUMZMR8ECImMCFkUhgRIWECVgPkSToSHECJCBFmimmQJVQ0wDyVoCsTlMJ8hiiLHmQJYxxE0QdXATgAyo4YZg46B8oBlYUCyXgb4BAA "MATL – Try It Online"))
[Answer]
# [Keg](https://github.com/JonoCode9374/Keg), 13 bytes
```
÷⑷2%⑸⅀:0=$2=+
```
[Try it online!](https://tio.run/##y05N////8PZHE7cbqT6auONRa4OVga2Kka32///RhjoKRjoKxjoKJjoKpjoKZrEA "Keg – Try It Online")
Simply using everyone else's algorithm! 
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-!`](https://codegolf.meta.stackexchange.com/a/14339/), 7 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
èu a1 É
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LSE&code=6HUgYTEgyQ&input=WzIsIDQsIDQsIDMsIDNd)
[Answer]
## [W](https://github.com/A-ee/w) `d`, ~~8~~ 7 bytes
```
♦æ╥└¬y÷
```
Uncompressed:
```
2mJ1-z1=
```
## Explanation
```
2m       % Modulo the list by 2, auto-vectorizes.
  J      % Sum the list.
   1-    % Decrement by 1.
     z   % Absolute value.
      1= % Is this 1?
```
[Answer]
# [Stax](https://github.com/tomtheisen/stax), 8 [bytes](https://github.com/tomtheisen/stax/blob/master/docs/packed.md#packed-stax)
This method is shorter in Stax.
```
ƒ╟⌡≡ù₧╬)
```
[Run and debug it](https://staxlang.xyz/#p=9fc7f5f0979ece29&i=[2,+4,+4,+3,+3]%0A[2,+2]%0A[1,+2,+3,+4,+6,+8]%0A[2,+4,+2,+4,+2,+4,+2,+4]%0A[8,+6,+8,+2,+2,+3,+11]%0A[1,+3]%0A[8]%0A[1,+2,+3,+4,+5,+6]%0A[2,+3]%0A[9]%0A[7,+2,+2,+2]%0A[4,+2,+7]&a=1&m=2)
# Explanation
```
{2%m       Map modulo 2 over the input
    |+     Sum the resulting list
      02\  In the list [0, 2]:
         # How many times does this number appear?
```
[Answer]
# [PHP](https://php.net/), ~~39~~ 43 bytes
```
for(;$n=$argv[++$i];)$s+=$n%2;echo!($s&-3);
```
[Try it online!](https://tio.run/##K8go@G9jX5BRoPA/Lb9Iw1olz1YlsSi9LFpbWyUz1lpTpVjbViVP1cg6NTkjX1FDpVhN11jT@v///4ZAaPzf9L/FfwsA "PHP – Try It Online")
[Answer]
# [Perl 5](https://www.perl.org/) `-pa`, 20 bytes
```
$_=(2|grep$_%2,@F)<3
```
[Try it online!](https://tio.run/##K0gtyjH9/18l3lbDqCa9KLVAJV7VSMfBTdPG@P9/Ix0FEzAyBqJYLiDXKJbLEEiCRYDiZjoKFmBxE7AgChnLZQFRAOZCtBgagvUDzbJANcgUqBRsEFDKMpbLHKYHaB/EOPNYLmOIO8Bq4HqBDIiZhmBzIFygdiwo9l9@QUlmfl7xf92CxBwA "Perl 5 – Try It Online")
Borrows the `|2<3` trick from [@xnor's Python answer](https://codegolf.stackexchange.com/a/199548/72767)
[Answer]
# [Japt](https://github.com/ETHproductions/japt) [`-!`](https://codegolf.meta.stackexchange.com/a/14339/), 6 [bytes](https://en.wikipedia.org/wiki/ISO/IEC_8859-1)
```
èu &-3
```
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LSE&code=6HUgJi0z&input=WzIsIDQsIDQsIDMsIDNdCg)
```
èu &-3        Full program taking in array of degrees U
èu            Amount of odd numbers in array
   &          Bitwise AND
    -3        With -3; -3 has very bit set except of the second bit (1111...11101)
-!            Zero -> True, Other numbers -> False
```
[Answer]
# [GolfScript](http://www.golfscript.com/golfscript/), 11 bytes
```
{2%+}*(2?(!
```
[Try it online!](https://tio.run/##S8/PSStOLsosKPkfbahgBISGCiZA0jj2f7WRqnatloaRvYbi//8A "GolfScript – Try It Online")
My first go at it, may shrink it a bit. I made it so 1 is true, 0 is false, but if you're okay with the other way around, I can do different things :)
Short explanation; Convert all the elements to mod 2 and sum them. The only valid answers would be 0 or 2. Now, subtract 1 and square them. 0 is -1 is 1. 2 is 1 is 1. 0 and 2 both give you 1. Lastly, subtract 1 and perform a not operation to make all non-0, non-2 values to a 0 and the 0-2s to a 1.
Kind of roundabout, and I'm sure I can cut two characters somewhere.
[Answer]
# [APL (Dyalog Unicode)](https://www.dyalog.com/), 10 bytesSBCS
```
0 2∊⍨1⊥2∘|
```
[Try it online!](https://tio.run/##SyzI0U2pTMzJT///30DB6FFH16PeFYaPupYCmTNq/qc9apvwqLfvUd9UT/9HXc2H1hs/apsI5AUHOQPJEA/P4P@PeucqhBSVlmRUcqUdWqGgYaRgAoTGCsaaILYRkDRUMALyTRTMFCw0IfJIWBOiywIkC@SDVBoagjWBDNCx0OTiAtnglphTDLUAZpypghnYOLA6SyBhDtYPshFksjnUZGMFY6hrIBoNFSDGGwKNgLDNFVCgJgA "APL (Dyalog Unicode) – Try It Online")
Because a challenge needs an APL answer.
### How it works
```
0 2∊⍨1⊥2∘|
       2∘|  ⍝ Modulo 2
     1⊥     ⍝ Sum
0 2∊⍨       ⍝ Is member of [0 2]?
```
[Answer]
# [Whitespace](https://github.com/Adriandmen/05AB1E/wiki/Commands), 102 bytes
```
[S S S N
_Push_0][S N
S _Dupe_0][N
S S N
_Create_Label_LOOP][S N
S _Dupe][S N
S _Dupe][T  N
T   T   _Read_STDIN_as_integer][T   T   T   _Retrieve][S N
S _Dupe_input][N
T   T   S N
_If_neg_Jump_to_Label_DONE][S S S T S N
_Push_2][T  S T T   _Modulo][T  S S S _Add][N
S N
N
_Jump_to_Label_LOOP][N
S S S N
_Create_Label_DONE][S N
N
_Discard][S N
S _Dupe][N
T   S T N
_If_0_Jump_to_Label_TRUTHY][S S S T S N
_Push_2][T  S S T   _Subtract][N
T   S T N
_If_0_Jump_to_Label_TRUTHY][T   N
S T _Print_as_integer][N
N
N
_Exit_program][N
S S T   N
_Create_Label_TRUTHY][S S S T   N
_Push_1][T  N
S T _Print_as_integer]
```
Letters `S` (space), `T` (tab), and `N` (new-line) added as highlighting only.  
`[..._some_action]` added as explanation only.
Since Whitespace inputs one integer at a time, the input should contain a trailing `-1` so it knows when to stop reading integers and the input is done.  
Outputs `1`/`0` for truthy/falsey respectively.
[Try it online](https://tio.run/##K8/ILEktLkhMTv3/X0FBgQsMYQQnFycIgLhgUkEBSHIqgITAari4oDRYBVA5TAVIJwiDjACrgkiBBf7/t@Ay47LgMuYyAkJDQy5dQwA) (with raw spaces, tabs and new-lines only).
**Explanation in pseudo-code:**
```
Integer n = 0
Start LOOP:
  Integer i = STDIN as input
  If(i < 0):
    Jump to Label DONE
  n = n + (i modulo-2)
  Go to next iteration of LOOP
Label DONE:
  If(n == 0): Jump to Label TRUTHY
  If(n-2 == 0): Jump to Label TRUTHY
  Print 0 as integer to STDOUT
  Exit program
Label TRUTHY:
  Print 1 as integer to STDOUT
```
[Answer]
# [MathGolf](https://github.com/maxbergmark/mathgolf/blob/master/math_golf.txt), 6 [bytes](https://github.com/maxbergmark/mathgolf/blob/master/code_page.py)
```
¥Σ(±1=
```
[Try it online.](https://tio.run/##y00syUjPz0n7///Q0nOLNQ5tNLT9/z/aSMcECI11jGO5gGwjIGmoYwTkm@iY6ViAxUx0kDBQxAIkA2SDVBkagjWANFsgaTXVMQNrBYlbArE5WDnIcJAh5kDaWMcYailEj6EOxCRDoG4I21wHBcYCAA)
**Explanation:**
```
¥       # Take modulo-2 on each integer of the (implicit) input-list
 Σ      # Sum those
  (     # Decrease it by 1
   ±    # Take the absolute value
    1=  # And check whether this is equal to 1
        # (after which the entire stack joined together is output implicitly)
```
[Answer]
# Java 8, 28 bytes
```
s->(s.map(i->i%2).sum()|2)<3
```
Port of [*@xnor*'s Python answer](https://codegolf.stackexchange.com/a/199548/52210)
[Try it online.](https://tio.run/##bZJRa4MwEMff@ymOwiChMaB21a1bYY97WF/6OPaQ2mzEaRQTC2XrZ3enlpLYESLe@bv8/7kzF0cR5IfvLiuEMfAmlP6ZAShtZfMpMgnbPgTYV1UhhYaM5FjBW6sKbmwjRclftd0Nb2DoGuHzDB/GCqsy2IKGZ@hMsCGGl6ImKtiou4hy05aE/kb0Ke7WPV@3@wL5S9mxUgco0QvBk5X@ev8AQUcjVhpLIrbEFbN4ELwmIzcMWYTEkq1Y6lNL5mz3U9qzmOzrwtA/y1NK/9O5Zytfxyt5cINkEPHc9mYSNxGzeHrBUSlkE2shik@SCfPWzViG/g4kDppzfu3u7mSsLHnVWl5j422hnXm/NI04GW6rcShE0MX8EeYLzbNbavw5kKEX9XP3Bw)
**Explanation:**
```
s->               // Method with IntStream parameter and boolean return-type
  (s.map(i->i%2)  //  Take modulo-2 for each value in the IntStream
    .sum()        //  And them sum those
    |2)           //  Take a bitwise-OR with 2
       <3         //  And check whether that is smaller than 3
```
[Answer]
# [Chevron](https://esolangs.org/wiki/Chevron), ~~172~~ 147 bytes
```
^__>^n
>^n>^t
^t~s>>^s
0>>^o
0>>^i
^i+1>>^i
^t,^i~c>>^c
->+2??^c~^_i
->-3
^n^c>^n
^n~o>>^z
^o+^z>>^o
^__>^n
->+2?^i=^s
->-9
^o-2>>^p
^o*^p>>^o
>^o
```
Takes numbers from stdin in the form `2 4 4 3 3`.
Outputs `0` or `-0` for truthy, anything else falsy.
[Answer]
# [Vyxal](https://github.com/Lyxal/Vyxal), 6 bytes
```
∺∑⨪Ȧ1=
```
[Try it Online!](http://lyxal.pythonanywhere.com?flags=&code=%E2%88%BA%E2%88%91%E2%A8%AA%C8%A61%3D&inputs=%5B8%2C%206%2C%208%2C%202%2C%202%2C%203%2C%2011%5D&header=&footer=)
Just another port of the 05ab1e answer.
[Answer]
# [R](https://www.r-project.org/), ~~30~~ 29 bytes
Or \*\*[R](https://www.r-project.org/)>=4.1, 22 bytes by replacing the word `function` with a `\`.
*Edit: -1 byte thanks to [@Giuseppe](https://codegolf.stackexchange.com/users/67312/giuseppe).*
```
function(v)sum(v%%2/2)%in%0:1
```
[Try it online!](https://tio.run/##K/qfZvs/rTQvuSQzP0@jTLO4NFejTFXVSN9IUzUzT9XAyvB/mkayhpGOggkYGQORpiYXVMwIyjQEMsFyQBVmOgoWCBUmYBkUEippAVEKFoNoNjREGAezBGQUhhWmQK0IK2BKLaG0OcxImOsg9ppDecYQTyD0wU0GMpBcYAi2CkkMaC4WpKn5HwA "R – Try It Online")
Almost straightforward approach.
Less straightforward, but used by many other answers, approach results in the same byte-count:
```
function(v)(sum(v%%2)-1)^2==1
```
[Try it online!](https://tio.run/##K/qfZvs/rTQvuSQzP0@jTFOjuDRXo0xV1UhT11AzzsjW1vB/mkayhpGOggkYGQORpiYXVMwIyjQEMsFyQBVmOgoWCBUmYBkUEippAVEKFoNoNjREGAezBGQUhhWmQK0IK2BKLaG0OcxImOsg9ppDecYQTyD0wU0GMpBcYAi2CkkMaC4WpKn5HwA "R – Try It Online")
]