CSES - Aalto Competitive Programming 2024 - wk10 - Mon - Results
Submission details
Task:6G network
Sender:fabiank
Submission time:2024-11-11 17:47:39 +0200
Language:C++ (C++17)
Status:READY
Result:ACCEPTED
Test results
testverdicttime
#1ACCEPTED0.00 sdetails
#2ACCEPTED0.00 sdetails
#3ACCEPTED0.00 sdetails
#4ACCEPTED0.00 sdetails
#5ACCEPTED0.00 sdetails
#6ACCEPTED0.00 sdetails
#7ACCEPTED0.00 sdetails
#8ACCEPTED0.00 sdetails
#9ACCEPTED0.00 sdetails
#10ACCEPTED0.00 sdetails
#11ACCEPTED0.00 sdetails
#12ACCEPTED0.01 sdetails
#13ACCEPTED0.00 sdetails
#14ACCEPTED0.00 sdetails
#15ACCEPTED0.00 sdetails
#16ACCEPTED0.00 sdetails
#17ACCEPTED0.00 sdetails
#18ACCEPTED0.00 sdetails
#19ACCEPTED0.00 sdetails
#20ACCEPTED0.00 sdetails
#21ACCEPTED0.00 sdetails
#22ACCEPTED0.00 sdetails
#23ACCEPTED0.00 sdetails
#24ACCEPTED0.00 sdetails
#25ACCEPTED0.00 sdetails
#26ACCEPTED0.00 sdetails
#27ACCEPTED0.00 sdetails
#28ACCEPTED0.00 sdetails
#29ACCEPTED0.00 sdetails
#30ACCEPTED0.00 sdetails
#31ACCEPTED0.01 sdetails
#32ACCEPTED0.00 sdetails
#33ACCEPTED0.00 sdetails
#34ACCEPTED0.01 sdetails
#35ACCEPTED0.00 sdetails
#36ACCEPTED0.00 sdetails
#37ACCEPTED0.01 sdetails
#38ACCEPTED0.00 sdetails
#39ACCEPTED0.01 sdetails
#40ACCEPTED0.00 sdetails
#41ACCEPTED0.01 sdetails
#42ACCEPTED0.01 sdetails
#43ACCEPTED0.01 sdetails
#44ACCEPTED0.01 sdetails
#45ACCEPTED0.01 sdetails
#46ACCEPTED0.01 sdetails
#47ACCEPTED0.01 sdetails
#48ACCEPTED0.01 sdetails
#49ACCEPTED0.01 sdetails
#50ACCEPTED0.01 sdetails
#51ACCEPTED0.02 sdetails
#52ACCEPTED0.02 sdetails
#53ACCEPTED0.02 sdetails
#54ACCEPTED0.02 sdetails
#55ACCEPTED0.02 sdetails
#56ACCEPTED0.02 sdetails
#57ACCEPTED0.02 sdetails
#58ACCEPTED0.02 sdetails
#59ACCEPTED0.03 sdetails
#60ACCEPTED0.02 sdetails
#61ACCEPTED0.09 sdetails
#62ACCEPTED0.09 sdetails
#63ACCEPTED0.09 sdetails
#64ACCEPTED0.09 sdetails
#65ACCEPTED0.09 sdetails

Compiler report

input/code.cpp: In function 'long long int ford_fulkerson(std::vector<std::vector<long long int> >&, int, int)':
input/code.cpp:137:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
  137 |         for (int i = 1; i < path_reversed.size(); i++)
      |                         ~~^~~~~~~~~~~~~~~~~~~~~~

Code

#include <bits/stdc++.h>

#define REP(i, a, b) for (int i = a; i < b; i++)

// Type Aliases for 1D and 2D vectors with initialization
#define vll(n, val) vector<long long>(n, val) // 1D vector of long longs with size n, initialized to val
#define ll long long
#define vvi(n, m, val) vector<vector<int>>(n, vector<int>(m, val))              // 2D vector of ints (n x m), initialized to val
#define vvll(n, m, val) vector<vector<long long>>(n, vector<long long>(m, val)) // 2D vector of long longs (n x m), initialized to val

using namespace std;

void print_vector(vector<int> &x)
{
    for (int v : x)
    {
        cout << v << " ";
    }
    cout << "\n";
}

void print_matrix(vector<vector<int>> &matrix)
{
    cout << "\n"
         << "----------------" << "\n";
    for (vector<int> row : matrix)
    {
        print_vector(row);
    }
    cout << "\n"
         << "----------------" << "\n";
}

int calc_max_digit(int n)
{
    int max_digit = 0;
    while (n > 0 && max_digit < 9)
    {
        int digit = n % 10;
        if (digit > max_digit)
        {
            max_digit = digit;
        }
        n /= 10;
    }
    return max_digit;
}

// edges as edge list for outgoing node as pairs (end, cost)
vector<ll> dijkstras(int start_point, vector<vector<pair<int, int>>> edges)
{
    int n = edges.size();
    vector<bool> processed(n, false);
    vector<ll> distances(n, LLONG_MAX);
    distances[start_point] = 0;
    priority_queue<pair<ll, int>> pq;
    pq.push({0, start_point});
    while (!pq.empty())
    {
        int curr = pq.top().second;
        pq.pop();
        if (processed[curr])
        {
            continue;
        }
        processed[curr] = true;
        ll distance = distances[curr];

        for (pair<int, int> edge : edges[curr])
        {

            if (distance + edge.second < distances[edge.first])
            {
                distances[edge.first] = distance + edge.second;
                pq.push({-distances[edge.first], edge.first});
            }
        }
    }
    return distances;
}

int bfs_edmondson_karp(const vector<vector<ll>> &connections,
                       const int source, const int target, vector<int> &path_reversed)
{
    int n = connections.size();

    queue<pair<int, ll>> queue;
    queue.push({source, LLONG_MAX});
    vector<int> predecessor(n, -2);
    predecessor[source] = -1;

    while (!queue.empty())
    {
        int current = queue.front().first;
        ll current_bottleneck = queue.front().second;
        queue.pop();

        if (current == target)
        {
            while (current != -1)
            {
                path_reversed.push_back(current);
                current = predecessor[current];
            }
            return current_bottleneck;
        }

        for (int edge_end = 0; edge_end < n; edge_end++)
        {
            ll edge_cap = connections[current][edge_end];
            if (edge_cap > 0 && predecessor[edge_end] == -2)
            {
                predecessor[edge_end] = current;
                queue.push({edge_end, min(current_bottleneck, edge_cap)});
            }
        }
    }

    return -1;
}

ll ford_fulkerson(vector<vector<ll>> &residual_graph, const int source, const int target)
{
    ll flow = 0;

    while (true)
    {
        vector<int> path_reversed;
        int path_capacity = bfs_edmondson_karp(residual_graph, source, target, path_reversed);

        if (path_capacity < 0)
        {
            break;
        }

        flow += path_capacity;
        for (int i = 1; i < path_reversed.size(); i++)
        {
            int edge_end = path_reversed[i - 1];
            int edge_start = path_reversed[i];
            // reduce forwards edge
            residual_graph[edge_start][edge_end] -= path_capacity;
            assert(residual_graph[edge_start][edge_end] >= 0);
            // add to backwards edge
            residual_graph[edge_end][edge_start] += path_capacity;
            assert(residual_graph[edge_end][edge_start] >= 0);
        }
    }
    return flow;
}

bool dfs(int n, const vector<vector<int>> snakes, vector<bool> &visited, vector<int> path, int start, int target)
{
    if (start == target)
    {
        path.push_back(target);
        return true;
    }
    for (int i = n; n >= 1; n--)
    {
        if (!visited[i] && !snakes[start][i])
        {
            if (dfs(n, snakes, visited, path, i, target))
            {
                path.push_back(start);
                return true;
            }
        }
    }
    return false;
}

vector<int> z(const string &s)
{
    int n = s.size();
    vector<int> z(n);
    z[0] = n;
    int x = 0, y = 0;
    for (int k = 1; k < n; k++)
    {
        z[k] = max(0, min(z[k - x], y - k + 1));
        while (k + z[k] < n && s[z[k]] == s[k + z[k]])
        {
            // while there is a potential longer match and characters coincide
            x = k;
            y = k + z[k];
            z[k]++;
        }
    }
    return z;
}

typedef long long C;
typedef complex<C> P;
#define X real()
#define Y imag()

C cross(P a, P b)
{
    return (conj(a) * b).imag();
}

bool is_between(C a, C b, C c)
{
    return min(a, b) <= c && c <= max(a, b);
}

bool check_intersect(int x1, int y1, int x2, int y2, int x3, int y3, int x4, int y4)
{
    P p1 = P(x1, y1);
    P p2 = P(x2, y2);
    P p3 = P(x3, y3);
    P p4 = P(x4, y4);

    if (p1 == p3 || p1 == p4 || p2 == p3 || p2 == p4)
    {
        return true;
    }

    if (cross(p2 - p1, p3 - p1) == 0 && cross(p2 - p1, p4 - p1) == 0)
    {
        return (is_between(p1.real(), p2.real(), p3.real()) && is_between(p1.imag(), p2.imag(), p3.imag())) ||
               (is_between(p1.real(), p2.real(), p4.real()) && is_between(p1.imag(), p2.imag(), p4.imag())) ||
               (is_between(p3.real(), p4.real(), p1.real()) && is_between(p3.imag(), p4.imag(), p1.imag())) ||
               (is_between(p3.real(), p4.real(), p2.real()) && is_between(p3.imag(), p4.imag(), p2.imag()));
    }

    C cross1 = cross(p2 - p1, p3 - p1);
    C cross2 = cross(p2 - p1, p4 - p1);
    C cross3 = cross(p4 - p3, p1 - p3);
    C cross4 = cross(p4 - p3, p2 - p3);

    return (cross1 * cross2 < 0) && (cross3 * cross4 < 0);
}
bool onSegment(P p, P a, P b)
{
    // Calculate cross product
    C cross = (b.X - a.X) * (p.Y - a.Y) - (b.Y - a.Y) * (p.X - a.X);
    if (cross != 0)
        return false;

    // Check if p is within the bounding rectangle of a and b
    C minX = min(a.X, b.X);
    C maxX = max(a.X, b.X);
    C minY = min(a.Y, b.Y);
    C maxY = max(a.Y, b.Y);

    if (p.X >= minX && p.X <= maxX && p.Y >= minY && p.Y <= maxY)
        return true;

    return false;
}

struct Edge
{
    int u, v;
    double dist;
    Edge(int u, int v, double dist) : u(u), v(v), dist(dist) {}
};

bool compareEdges(const Edge &a, const Edge &b)
{
    return a.dist < b.dist;
}

vector<int> parent;

int find(int u)
{
    if (parent[u] != u)
        parent[u] = find(parent[u]);
    return parent[u];
}

bool union_sets(int u, int v)
{
    int pu = find(u);
    int pv = find(v);
    if (pu != pv)
    {
        parent[pu] = pv;
        return true;
    }
    return false;
}

int main()
{
    int n;
    cin >> n;
    vector<pair<double, double>> coords(n);
    for (int i = 0; i < n; ++i)
    {
        cin >> coords[i].first >> coords[i].second;
    }

    vector<Edge> edges;

    for (int i = 0; i < n; ++i)
    {
        double x1 = coords[i].first;
        double y1 = coords[i].second;
        for (int j = i + 1; j < n; ++j)
        {
            double x2 = coords[j].first;
            double y2 = coords[j].second;
            double dx = x1 - x2;
            double dy = y1 - y2;
            double dist = sqrt(dx * dx + dy * dy);
            edges.push_back(Edge(i, j, dist));
        }
    }

    sort(edges.begin(), edges.end(), compareEdges);

    parent.resize(n);
    for (int i = 0; i < n; ++i)
        parent[i] = i;

    double max_dist = 0.0;
    int edge_count = 0;

    for (const Edge &edge : edges)
    {
        if (union_sets(edge.u, edge.v))
        {
            max_dist = max(max_dist, edge.dist);
            edge_count++;
            if (edge_count == n - 1)
                break;
        }
    }

    cout << setprecision(20) << max_dist << endl;
}

Test details

Test 1

Verdict: ACCEPTED

input
1
4.2591064316 -1.4305814994

correct output
0.00000000000000000000

user output
0

Test 2

Verdict: ACCEPTED

input
2
-6.0847229043 -1.5324885688
-1.6396947713 -1.0447428951

correct output
4.47170783318572061639

user output
4.4717078331857207374

Test 3

Verdict: ACCEPTED

input
2
-0.3451828704 -7.1873918490
1.0713060289 1.8791459872

correct output
9.17652162516311534299

user output
9.1765216251631152033

Test 4

Verdict: ACCEPTED

input
3
4.2591064316 -1.4305814994
3.8176970288 4.3830061776
-0.1776213445 5.6005552105

correct output
5.83032108370083756695

user output
5.8303210837008379031

Test 5

Verdict: ACCEPTED

input
3
-1.0847570211 7.2329426240
2.3665666348 -8.2915635928
-6.5499304506 -8.4795054694

correct output
15.90351936689602016951

user output
15.903519366896018639

Test 6

Verdict: ACCEPTED

input
4
-0.0065099865 -6.8175556290
-8.9288243166 -5.6345572909
-4.7044491466 -1.5514279091
1.0409756581 5.2858009044

correct output
8.93071128380134405655

user output
8.930711283801343825

Test 7

Verdict: ACCEPTED

input
4
-6.5835380846 -4.2392097853
-6.7150543624 -2.0586391194
-3.7243738734 -9.5714693167
-0.2547656922 8.6929691250

correct output
12.54322165726830064138

user output
12.543221657268299296

Test 8

Verdict: ACCEPTED

input
4
-6.3149870710 7.7035024848
4.0148832489 2.6391874051
-8.1980280145 -2.8164045396
7.7349470409 9.3888104114

correct output
11.50449946987819829780

user output
11.504499469878197715

Test 9

Verdict: ACCEPTED

input
4
3.1826102096 9.6315702959
9.7306184566 -9.6262882447
-5.8529365549 -5.2919807295
-4.2871937712 -0.2626979830

correct output
16.17508604096948732209

user output
16.175086040969485879

Test 10

Verdict: ACCEPTED

input
4
-0.3725599416 3.7535021503
7.1314057588 -0.3452105339
2.1019197385 -1.2159625143
-4.8936470874 0.0075031628

correct output
5.87134885646126597177

user output
5.8713488564612665854

Test 11

Verdict: ACCEPTED

input
5
1.8568923303 6.8853148851
7.1589123998 6.9450347477
2.4712739299 -2.3123658325
-4.0493078929 -8.8657404813
...

correct output
9.21817744094991402444

user output
9.218177440949913759

Test 12

Verdict: ACCEPTED

input
5
9.9436961646 8.6511472274
-7.4375110446 9.9808103093
-5.2782204740 -2.0683854767
-2.2417851948 3.3949208089
...

correct output
11.50777035927174466248

user output
11.507770359271743743

Test 13

Verdict: ACCEPTED

input
5
-6.2983583685 8.6308172719
8.9546122195 -0.3050180737
-3.5892712724 -6.9114664880
3.9772537872 -7.6009891200
...

correct output
9.71303212730634494936

user output
9.7130321273063433551

Test 14

Verdict: ACCEPTED

input
5
-8.5855023910 6.7989808494
-7.5734284134 1.3862265158
-1.2587611941 -9.6250397903
-9.1873852484 -5.0422339644
...

correct output
9.15779387365360776282

user output
9.1577938736536079745

Test 15

Verdict: ACCEPTED

input
5
8.0124290984 -6.5460934977
7.1124189020 2.1807119656
1.9511241172 -7.1707165417
-5.5098814611 3.9684047876
...

correct output
12.74826702270330998704

user output
12.748267022703309692

Test 16

Verdict: ACCEPTED

input
5
-8.8963975840 6.6265568038
-2.7252620915 9.5888999566
-8.2035793155 -2.0652678674
-2.9172391409 -0.2672400301
...

correct output
13.00048104392330636930

user output
13.000481043923308277

Test 17

Verdict: ACCEPTED

input
5
8.9495215281 -5.8118726856
-8.7149078500 -2.5978119204
9.7005763562 -8.0105662272
2.1694723402 0.6079293528
...

correct output
11.34665189540580491293

user output
11.346651895405804211

Test 18

Verdict: ACCEPTED

input
5
-5.4532185007 -3.6205554438
9.5644579243 -0.8883018432
-3.8397446555 -4.7225831843
-8.2651312952 -1.6125557848
...

correct output
13.94182054837260448070

user output
13.941820548372604094

Test 19

Verdict: ACCEPTED

input
5
-9.7777112346 -5.2112085653
-2.4496604741 6.3292256907
-1.5529838240 2.2406666587
5.3212585879 -1.9614977231
...

correct output
11.09849473274371704085

user output
11.098494732743716895

Test 20

Verdict: ACCEPTED

input
5
-2.7107794769 -0.0173926842
-9.8491379968 -3.6755137605
-9.7335597820 7.5444241810
-7.2494636084 -7.2277343960
...

correct output
10.31990879400218362374

user output
10.319908794002184749

Test 21

Verdict: ACCEPTED

input
10
1.8568923303 6.8853148851
7.1589123998 6.9450347477
2.4712739299 -2.3123658325
-4.0493078929 -8.8657404813
...

correct output
8.43373300459665028398

user output
8.4337330045966503178

Test 22

Verdict: ACCEPTED

input
10
9.9436961646 8.6511472274
-7.4375110446 9.9808103093
-5.2782204740 -2.0683854767
-2.2417851948 3.3949208089
...

correct output
8.30203528819313353593

user output
8.3020352881931351874

Test 23

Verdict: ACCEPTED

input
10
-6.2983583685 8.6308172719
8.9546122195 -0.3050180737
-3.5892712724 -6.9114664880
3.9772537872 -7.6009891200
...

correct output
8.46970179011128996346

user output
8.4697017901112889859

Test 24

Verdict: ACCEPTED

input
10
-8.5855023910 6.7989808494
-7.5734284134 1.3862265158
-1.2587611941 -9.6250397903
-9.1873852484 -5.0422339644
...

correct output
8.03457104643789539987

user output
8.0345710464378967686

Test 25

Verdict: ACCEPTED

input
10
8.0124290984 -6.5460934977
7.1124189020 2.1807119656
1.9511241172 -7.1707165417
-5.5098814611 3.9684047876
...

correct output
8.40104919081107975529

user output
8.4010491908110793702

Test 26

Verdict: ACCEPTED

input
10
-8.8963975840 6.6265568038
-2.7252620915 9.5888999566
-8.2035793155 -2.0652678674
-2.9172391409 -0.2672400301
...

correct output
6.83090893175365792417

user output
6.8309089317536582087

Test 27

Verdict: ACCEPTED

input
10
8.9495215281 -5.8118726856
-8.7149078500 -2.5978119204
9.7005763562 -8.0105662272
2.1694723402 0.6079293528
...

correct output
10.24111977550903899992

user output
10.241119775509037737

Test 28

Verdict: ACCEPTED

input
10
-5.4532185007 -3.6205554438
9.5644579243 -0.8883018432
-3.8397446555 -4.7225831843
-8.2651312952 -1.6125557848
...

correct output
7.75719199582075191442

user output
7.7571919958207509183

Test 29

Verdict: ACCEPTED

input
10
-9.7777112346 -5.2112085653
-2.4496604741 6.3292256907
-1.5529838240 2.2406666587
5.3212585879 -1.9614977231
...

correct output
8.05688489611421130090

user output
8.056884896114210548

Test 30

Verdict: ACCEPTED

input
10
-2.7107794769 -0.0173926842
-9.8491379968 -3.6755137605
-9.7335597820 7.5444241810
-7.2494636084 -7.2277343960
...

correct output
9.50770899513712303228

user output
9.5077089951371220877

Test 31

Verdict: ACCEPTED

input
100
18.5689233033 68.8531488513
71.5891239980 69.4503474769
24.7127392992 -23.1236583252
-40.4930789286 -88.6574048134
...

correct output
45.82615853745645677006

user output
45.826158537456450404

Test 32

Verdict: ACCEPTED

input
100
99.4369616461 86.5114722736
-74.3751104455 99.8081030931
-52.7822047404 -20.6838547675
-22.4178519479 33.9492080894
...

correct output
35.50700204049589586708

user output
35.507002040495891038

Test 33

Verdict: ACCEPTED

input
100
-62.9835836852 86.3081727189
89.5461221947 -3.0501807371
-35.8927127244 -69.1146648801
39.7725378724 -76.0098911999
...

correct output
31.22345190290398834337

user output
31.2234519029039852

Test 34

Verdict: ACCEPTED

input
100
-85.8550239098 67.9898084937
-75.7342841341 13.8622651580
-12.5876119410 -96.2503979031
-91.8738524837 -50.4223396439
...

correct output
28.89162360331196992801

user output
28.891623603311970214

Test 35

Verdict: ACCEPTED

input
100
80.1242909845 -65.4609349767
71.1241890198 21.8071196561
19.5112411723 -71.7071654174
-55.0988146115 39.6840478762
...

correct output
30.00479071642544109597

user output
30.004790716425439712

Test 36

Verdict: ACCEPTED

input
100
-88.9639758402 66.2655680380
-27.2526209146 95.8889995664
-82.0357931550 -20.6526786735
-29.1723914088 -2.6724003014
...

correct output
38.79483709927152193866

user output
38.794837099271518355

Test 37

Verdict: ACCEPTED

input
100
89.4952152806 -58.1187268564
-87.1490785004 -25.9781192037
97.0057635618 -80.1056622716
21.6947234017 6.0792935276
...

correct output
34.76745343632208916709

user output
34.767453436322092841

Test 38

Verdict: ACCEPTED

input
100
-54.5321850071 -36.2055544378
95.6445792428 -8.8830184320
-38.3974465552 -47.2258318431
-82.6513129519 -16.1255578477
...

correct output
47.33751163277151602013

user output
47.337511632771523296

Test 39

Verdict: ACCEPTED

input
100
-97.7771123464 -52.1120856531
-24.4966047411 63.2922569071
-15.5298382401 22.4066665867
53.2125858790 -19.6149772311
...

correct output
27.44794402724227265142

user output
27.447944027242279219

Test 40

Verdict: ACCEPTED

input
100
-27.1077947686 -0.1739268423
-98.4913799681 -36.7551376049
-97.3355978196 75.4442418096
-72.4946360840 -72.2773439601
...

correct output
28.86385308540476819956

user output
28.863853085404770127

Test 41

Verdict: ACCEPTED

input
200
18568.9233033365 68853.1488513...

correct output
26027.91880492172062666612

user output
26027.918804921722767

Test 42

Verdict: ACCEPTED

input
200
99436.9616460531 86511.4722736...

correct output
24738.66365623138931617575

user output
24738.663656231379719

Test 43

Verdict: ACCEPTED

input
200
-62983.5836851972 86308.172718...

correct output
23114.05959792925350093640

user output
23114.059597929262964

Test 44

Verdict: ACCEPTED

input
200
-85855.0239097887 67989.808493...

correct output
24449.05462058239773170953

user output
24449.054620582406642

Test 45

Verdict: ACCEPTED

input
200
80124.2909844513 -65460.934976...

correct output
24090.54761531628931514604

user output
24090.547615316299925

Test 46

Verdict: ACCEPTED

input
200
-88963.9758401554 66265.568038...

correct output
23439.53146829533727313333

user output
23439.531468295346713

Test 47

Verdict: ACCEPTED

input
200
89495.2152805803 -58118.726856...

correct output
29128.03468783543361553257

user output
29128.034687835435761

Test 48

Verdict: ACCEPTED

input
200
-54532.1850070586 -36205.55443...

correct output
24978.72415831473490044345

user output
24978.724158314736997

Test 49

Verdict: ACCEPTED

input
200
-97777.1123464485 -52112.08565...

correct output
21209.18600929237329211219

user output
21209.186009292363451

Test 50

Verdict: ACCEPTED

input
200
-27107.7947686252 -173.9268423...

correct output
23203.29193911443391939997

user output
23203.291939114435081

Test 51

Verdict: ACCEPTED

input
500
18568.9233033365 68853.1488513...

correct output
16841.08154772710746982511

user output
16841.081547727113502

Test 52

Verdict: ACCEPTED

input
500
99436.9616460531 86511.4722736...

correct output
13884.23860887098339489398

user output
13884.238608870982716

Test 53

Verdict: ACCEPTED

input
500
-62983.5836851972 86308.172718...

correct output
16913.31415478189355283689

user output
16913.314154781892285

Test 54

Verdict: ACCEPTED

input
500
-85855.0239097887 67989.808493...

correct output
16129.83510192776483815891

user output
16129.835101927774303

Test 55

Verdict: ACCEPTED

input
500
80124.2909844513 -65460.934976...

correct output
13611.19288194623884713508

user output
13611.192881946246416

Test 56

Verdict: ACCEPTED

input
500
-88963.9758401554 66265.568038...

correct output
14129.83398978742408491627

user output
14129.833989787424798

Test 57

Verdict: ACCEPTED

input
500
89495.2152805803 -58118.726856...

correct output
14531.53671287865778083415

user output
14531.536712878667458

Test 58

Verdict: ACCEPTED

input
500
-54532.1850070586 -36205.55443...

correct output
14387.11286249742570308996

user output
14387.112862497431706

Test 59

Verdict: ACCEPTED

input
500
-97777.1123464485 -52112.08565...

correct output
15400.66824492762415577118

user output
15400.668244927621345

Test 60

Verdict: ACCEPTED

input
500
-27107.7947686252 -173.9268423...

correct output
16119.06959734976690334918

user output
16119.069597349769538

Test 61

Verdict: ACCEPTED

input
1000
18568.9233033365 68853.1488513...

correct output
11324.85732396049615111622

user output
11324.857323960493886

Test 62

Verdict: ACCEPTED

input
1000
99436.9616460531 86511.4722736...

correct output
10665.82033665705907843346

user output
10665.820336657061489

Test 63

Verdict: ACCEPTED

input
1000
-62983.5836851972 86308.172718...

correct output
12182.40552864239620589615

user output
12182.405528642391801

Test 64

Verdict: ACCEPTED

input
1000
-85855.0239097887 67989.808493...

correct output
10851.63808946087635654010

user output
10851.638089460871925

Test 65

Verdict: ACCEPTED

input
1000
80124.2909844513 -65460.934976...

correct output
11745.88161026176816204014

user output
11745.881610261771129