Advertisement
bibaboba12345

ХУЙ

Oct 24th, 2021
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. #define _CRT_SECURE_NO_WARNINGS
  2. #include <iostream>
  3. #include <algorithm>
  4. #include <vector>
  5. #include <cmath>
  6. #include<iomanip>
  7. using namespace std;
  8. const int INF = 1e9;
  9. int n, t, I, totalsum;
  10. string s;
  11. long long t1, t2;
  12. int cnt[30], ans = INF, l, r, a,b,c;
  13.  
  14. int main()
  15. {
  16. ios::sync_with_stdio(false);
  17. cin.tie(0);
  18. cin >> t;
  19. for (I = 0; I < t; I++) {
  20. cin >> a >> b >> c;
  21. t1 = 0; t2 = 0;
  22. if (c % 2 == 0) {
  23.  
  24. }
  25. else {
  26. t1 += 3;
  27. if (b >= 1) {
  28. t2 += 2;
  29. b--;
  30. }
  31. if (a >= 1) {
  32. t2++;
  33. a--;
  34. }
  35. if (a >= 1 && t2 < t1) {
  36. t2++;
  37. a--;
  38. }
  39. if (a >= 1 && t2 < t1) {
  40. t2++;
  41. a--;
  42. }
  43. }
  44. if (t2 < t1) {
  45. swap(t1, t2);
  46. }
  47. if (b % 2 == 0) {
  48.  
  49. }
  50. else {
  51. t1 += 2;
  52. if (a >= 1 && t2 < t1) {
  53. t2++;
  54. a--;
  55. }
  56. if (a >= 1 && t2 < t1) {
  57. t2++;
  58. a--;
  59. }
  60. }
  61. if (a % 2 == 1) {
  62. t2++;
  63. }
  64. cout << abs(t1 - t2) << "\n";
  65. }
  66. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement