Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #ifndef ABC
- #define _CRT_SECURE_NO_WARNINGS
- #include <iostream>
- #include <string>
- #include <map>
- #include <vector>
- #include <algorithm>
- #include <math.h>
- #include <set>
- #include <queue>
- #include <stack>
- #include <list>
- #define endl '\n'
- #define ABS(x) (((x)^((x) >> 31)) - ((x) >> 31))
- #include <ctime>
- using namespace std;
- typedef long long ll;
- typedef pair<ll, ll> pi;
- typedef pair<pi, ll> ppi;
- typedef vector<ll> vi;
- typedef vector<vi> vvi;
- typedef vector<pi> vpi;
- typedef vector<vpi> vvpi;
- typedef vector<ppi> vppi;
- typedef vector<bool> vb;
- typedef map<ll, ll> mii;
- typedef set<pi> spi;
- typedef set<ll> si;
- typedef multiset<ll> msi;
- typedef multiset<pi> mspi;
- typedef vector<si> vsi;
- template <typename T> using V = vector<T>;
- template <typename T> using VV = vector<V<T>>;
- template <typename T> using Mi = map<ll, T>;
- template <typename T> using MMi = map<ll, Mi<T>>;
- const double PI = 3.141592653589793238463;
- #endif // ABC
- void cinArr(vi &arr) {
- for (int i = 0; i < arr.size(); i++) {
- cin >> arr[i];
- }
- }
- int main()
- {
- ios_base::sync_with_stdio(false);
- cin.tie(0);
- cout.tie(0);
- cout.precision(15);
- ll a, b;
- cin >> a >> b;
- /*
- long double time = 0;
- ll N = 1e7;
- ll mn = 100;
- srand(unsigned(std::time(0)));
- for (int i = 0; i < N; i++) {
- ll x1, x2, y1, y2;
- x1 = rand() % (a*mn+ 1);
- x2 = rand() % (a*mn + 1);
- y1 = rand() % (b*mn + 1);
- y2 = rand() % (b*mn + 1);
- time += abs(x1 - x2) + abs(y1 - y2);
- }
- long double ans = time / (N*mn);
- cout << ans;
- */
- cout <<fixed << (a+b)/3.0;
- //2 2 = 4/3
- //1 1 = 2/3
- //1 2 = 1
- //2 3 = 1.67? 5/3
- //1 4 = 1.67? 5/3
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement