fork download
  1. // بسم الله الرحمن الرحيم
  2.  
  3. #include <bits/stdc++.h>
  4. using namespace std;
  5.  
  6. template<typename T> ostream& operator<<(ostream& os, vector<T>& v) { for (auto& i : v) os << i << ' '; return os; }
  7. template<typename T> istream& operator>>(istream& is, vector<T>& v) { for (auto& i : v) is >> i; return is; }
  8.  
  9. #define FreePalestine ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL)
  10.  
  11. #define endl '\n'
  12. #define int long long
  13. #define ull unsigned long long
  14. #define vi vector<int>
  15. #define vvi vector<vi>
  16. #define pi pair<int, int>
  17. #define all(a) a.begin(), a.end()
  18. #define all_r(a) a.rbegin(), a.rend()
  19.  
  20. const int N = 2e5, oo = 2e18, MOD = 1e9+7;
  21.  
  22. void solve() {
  23. int a, b; cin >> a >> b;
  24. if (a == b) {
  25. cout << 0 << ' ' << 6 << ' ' << 0;
  26. } else if (a < b) {
  27. int diff = b-a-1;
  28. int sum = a + diff/2 + !((diff + 1) % 2);
  29. cout << a + diff/2 << ' ' << !((diff + 1) % 2) << ' ' << 6-sum;
  30. } else {
  31. int diff = a-b-1;
  32. int sum = b + diff/2 + !((diff +1) %2);
  33. cout << 6-sum << ' ' << !((diff + 1)%2) << ' ' << b + diff/2;
  34. }
  35. }
  36.  
  37.  
  38. signed main() {
  39. FreePalestine;
  40. // #ifndef ONLINE_JUDGE
  41. // freopen("input.txt", "r", stdin);
  42. // freopen("output.txt", "w", stdout);
  43. // #endif
  44. int t; t = 1;
  45. // cin >> t;
  46. while (t--) solve();
  47. return 0;
  48. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
-4068508402347811322 1 4068508402347811327