fork download
  1. #include <algorithm>
  2. #include <iomanip>
  3. #include <iostream>
  4. #include <vector>
  5. #include <set>
  6. #include <numeric>
  7. #include <map>
  8. #include <unordered_map>
  9. #include <stack>
  10. #include <queue>
  11. using namespace std;
  12. #define all(a) a.begin(), a.end()
  13. #define ll long long
  14. #define fo(i,n) for (long long i = 0; i < n; i++)
  15. #define pb push_back
  16. int main()
  17. {
  18. ll a,b,c,d,n,m,k,input,i;
  19. ios_base::sync_with_stdio(false);
  20. string one,two,three;
  21. cin.tie(0); cout.tie(0);
  22. cin >> i;
  23. while (i--)
  24. {
  25. cin >> a >> b >> c;
  26. if (a%2 == b%2)
  27. {
  28. if (a%2 == c%2){
  29. cout << "YES\n";
  30. }
  31. else
  32. {
  33. cout << "NO\n";
  34. }
  35. }
  36. else
  37. {
  38. if (c > b && a%2 == c%2){
  39. cout << "YES\n";
  40. }
  41. else{
  42. cout << "NO\n";
  43. }
  44. }
  45. }
  46. }
  47.  
  48.  
Success #stdin #stdout 0s 5312KB
stdin
7
5 3 1
4 1 2
7 7 4
8 3 7
1 1 1
1000000000 1000000000 1000000000
3 2 1
stdout
YES
YES
NO
NO
YES
YES
NO