Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- #include <sstream>
- #include <cmath>
- #include <memory.h>
- #include <algorithm>
- #include <stack>
- #include <deque>
- #include <iomanip>
- #include <stdio.h>
- #include <queue>
- #include <map>
- #include <set>
- #include <unordered_map>
- #include <unordered_set>
- #include <random>
- #include <ctime>
- #include <cstdlib>
- #include <cassert>
- #include <chrono>
- #include <array>
- #define int long long
- #define pii pair <int, int>
- #define pb push_back
- #define all(vc) vc.begin(), vc.end()
- #define fir first
- #define sec second
- #define endl "\n"
- #define un unsigned
- #define INF 1000000009
- #define double long double
- using namespace std;
- const int N = 5000, R = 1 << 20, MOD = 1e9 + 7, ABC = 26, logn = 19;
- mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
- signed main()
- {
- ios_base::sync_with_stdio(false);
- cin.tie(0);
- cout.tie(0);
- srand(time(0));
- freopen("karlsson.in", "r", stdin);
- freopen("karlsson.out", "w", stdout);
- int x, y, z;
- cin >> x >> y >> z;
- int mx = max(x, max(y, z));
- vector<int> dp(mx + 1, 0);
- vector<bool> used(mx + 1, 0);
- for (int i = 2; i <= mx; i++)
- {
- used.assign(mx + 1, 0);
- for (int j = (i + 1) / 2; j < i; j++)
- {
- used[dp[j]] = 1;
- }
- for (int j = 0; j <= mx; j++)
- {
- if (!used[j])
- {
- dp[i] = j;
- break;
- }
- }
- }
- for (int i = (x + 1) / 2; i < x; i++)
- {
- int xx = dp[i] ^ dp[y] ^ dp[z];
- if (!xx)
- {
- cout << "YES" << endl << i << " " << y << " " << z;
- return 0;
- }
- }
- for (int i = (y + 1) / 2; i < y; i++)
- {
- int yy = dp[i] ^ dp[x] ^ dp[z];
- if (!yy)
- {
- cout << "YES" << endl << x << " " << i << " " << z;
- return 0;
- }
- }
- for (int i = (z + 1) / 2; i < z; i++)
- {
- int zz = dp[i] ^ dp[x] ^ dp[y];
- if (!zz)
- {
- cout << "YES" << endl << x << " " << y << " " << i;
- return 0;
- }
- }
- cout << "NO";
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement