CSES - Datatähti 2024 alku - Results
Submission details
Task:Säähavainnot
Sender:vgtcross
Submission time:2023-10-30 02:02:20 +0200
Language:C++ (C++20)
Status:READY
Result:16
Feedback
groupverdictscore
#1ACCEPTED16.13
Test results
testverdicttimescore
#1ACCEPTED0.02 s1.88details
#2ACCEPTED0.02 s3details
#3ACCEPTED0.02 s3.13details
#4ACCEPTED0.02 s2.75details
#5ACCEPTED0.02 s1details
#6ACCEPTED0.02 s1details
#7ACCEPTED0.02 s1details
#8ACCEPTED0.02 s2.38details

Compiler report

input/code.cpp: In function 'void solve()':
input/code.cpp:717:14: warning: variable 'it1' set but not used [-Wunused-but-set-variable]
  717 |         auto it1 = nextv.lower_bound(a);
      |              ^~~

Code

#include <bits/stdc++.h>

#define MODE 1

#if MODE
#define debug(x) cout << #x << ": " << x << endl
#define log(x) cout << x << endl
#define test(x) x
#else
#define debug(x)
#define log(x)
#define test(x)
#endif

#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define fi first
#define se second
#define X real()
#define Y imag()

using namespace std;
using ll = long long;
using ld = long double;
using uint = unsigned int;
using ull = unsigned long long;
using pii = pair<int, int>;
using pli = pair<ll, int>;
using pll = pair<ll, ll>;
using P = complex<ll>;

const ll M = 1000000007; // 998244353

map<int, double> nextv, nextd;
map<int, double> cntv, cntd;

void day() {
    int n = 36;
    vector<double> v(n);
    for (auto &i : v) cin >> i;
    for (int i = 1; i < n; ++i) {
        int a = 10 * v[i];
        int b = 10 * v[i-1];
        nextv[b] += a;
        ++cntv[b];
    }
    
    for (int i = 2; i < n; ++i) {
        int a = 10 * v[i];
        int b = 10 * v[i-1];
        int c = 10 * v[i-2];
        int d = a - b;
        int e = b - c;
        nextd[e] += d;
        ++cntd[e];
    }
}

void precalc() {
    for (auto &p : nextv) p.se /= cntv[p.fi];
    for (auto &p : nextd) p.se /= cntd[p.fi];
    
    cout << "\nnextv:\n";
    for (auto p : nextv) cout << "nextv[" << p.fi << "] = " << p.se << ";\n";
    cout << "\nnextd:\n";
    for (auto p : nextd) cout << "nextd[" << p.fi << "] = " << p.se << ";\n";
}

void init() {
    nextv[-377] = -366.000000;
    nextv[-370] = -377.000000;
    nextv[-367] = -363.000000;
    nextv[-366] = -363.000000;
    nextv[-365] = -367.000000;
    nextv[-363] = -365.000000;
    nextv[-362] = -346.000000;
    nextv[-357] = -346.000000;
    nextv[-356] = -362.000000;
    nextv[-353] = -360.000000;
    nextv[-352] = -351.500000;
    nextv[-351] = -340.000000;
    nextv[-348] = -350.000000;
    nextv[-347] = -350.000000;
    nextv[-346] = -318.000000;
    nextv[-343] = -347.000000;
    nextv[-342] = -337.200000;
    nextv[-341] = -321.000000;
    nextv[-340] = -340.000000;
    nextv[-338] = -340.000000;
    nextv[-337] = -337.800000;
    nextv[-336] = -339.250000;
    nextv[-335] = -338.750000;
    nextv[-333] = -331.250000;
    nextv[-332] = -330.000000;
    nextv[-331] = -325.000000;
    nextv[-330] = -327.000000;
    nextv[-328] = -326.000000;
    nextv[-327] = -320.200000;
    nextv[-326] = -320.571429;
    nextv[-325] = -321.500000;
    nextv[-323] = -324.900000;
    nextv[-322] = -322.400000;
    nextv[-321] = -313.666667;
    nextv[-320] = -322.875000;
    nextv[-318] = -306.083333;
    nextv[-316] = -313.285714;
    nextv[-315] = -315.666667;
    nextv[-313] = -311.200000;
    nextv[-311] = -310.909091;
    nextv[-310] = -307.375000;
    nextv[-308] = -308.166667;
    nextv[-306] = -303.777778;
    nextv[-305] = -305.777778;
    nextv[-303] = -301.687500;
    nextv[-301] = -296.294118;
    nextv[-300] = -304.125000;
    nextv[-298] = -295.727273;
    nextv[-296] = -294.947368;
    nextv[-295] = -295.900000;
    nextv[-293] = -293.428571;
    nextv[-291] = -289.083333;
    nextv[-290] = -293.636364;
    nextv[-288] = -283.000000;
    nextv[-286] = -288.666667;
    nextv[-285] = -275.666667;
    nextv[-283] = -283.500000;
    nextv[-281] = -280.800000;
    nextv[-280] = -270.300000;
    nextv[-278] = -274.026316;
    nextv[-276] = -271.851852;
    nextv[-275] = -271.947368;
    nextv[-273] = -274.400000;
    nextv[-271] = -265.934783;
    nextv[-270] = -268.368421;
    nextv[-268] = -266.617647;
    nextv[-266] = -265.829268;
    nextv[-265] = -259.900000;
    nextv[-263] = -258.829268;
    nextv[-261] = -260.880952;
    nextv[-260] = -251.100000;
    nextv[-258] = -258.982456;
    nextv[-256] = -252.745098;
    nextv[-255] = -255.281250;
    nextv[-253] = -251.636364;
    nextv[-251] = -251.162162;
    nextv[-250] = -246.000000;
    nextv[-248] = -246.263158;
    nextv[-246] = -241.816327;
    nextv[-245] = -241.615385;
    nextv[-243] = -245.312500;
    nextv[-241] = -239.438596;
    nextv[-240] = -236.500000;
    nextv[-238] = -237.327869;
    nextv[-236] = -237.072727;
    nextv[-235] = -233.636364;
    nextv[-233] = -230.721311;
    nextv[-231] = -228.914286;
    nextv[-230] = -233.850000;
    nextv[-228] = -228.409836;
    nextv[-226] = -226.488372;
    nextv[-225] = -223.212121;
    nextv[-223] = -221.441176;
    nextv[-221] = -219.966292;
    nextv[-220] = -216.256410;
    nextv[-218] = -217.294118;
    nextv[-216] = -214.000000;
    nextv[-215] = -211.674419;
    nextv[-213] = -213.648352;
    nextv[-211] = -208.975806;
    nextv[-210] = -207.351852;
    nextv[-208] = -205.447917;
    nextv[-206] = -207.333333;
    nextv[-205] = -204.000000;
    nextv[-203] = -201.385827;
    nextv[-201] = -200.716981;
    nextv[-200] = -200.196970;
    nextv[-198] = -199.412281;
    nextv[-196] = -196.475806;
    nextv[-195] = -192.704225;
    nextv[-193] = -189.947368;
    nextv[-191] = -188.064516;
    nextv[-190] = -191.069444;
    nextv[-188] = -185.711409;
    nextv[-186] = -187.436508;
    nextv[-185] = -181.850746;
    nextv[-183] = -181.590604;
    nextv[-181] = -179.959459;
    nextv[-180] = -178.828571;
    nextv[-178] = -178.363636;
    nextv[-176] = -176.011765;
    nextv[-175] = -174.241379;
    nextv[-173] = -173.910256;
    nextv[-171] = -168.413408;
    nextv[-170] = -170.150538;
    nextv[-168] = -167.643617;
    nextv[-166] = -165.984536;
    nextv[-165] = -164.279070;
    nextv[-163] = -164.653846;
    nextv[-161] = -159.887850;
    nextv[-160] = -160.897959;
    nextv[-159] = -159.166667;
    nextv[-158] = -156.478723;
    nextv[-156] = -156.937500;
    nextv[-155] = -156.004831;
    nextv[-154] = -154.211538;
    nextv[-153] = -152.694444;
    nextv[-151] = -150.928571;
    nextv[-150] = -151.401826;
    nextv[-149] = -148.529915;
    nextv[-148] = -149.119266;
    nextv[-146] = -146.783333;
    nextv[-145] = -144.282609;
    nextv[-144] = -146.597015;
    nextv[-143] = -143.000000;
    nextv[-141] = -140.353383;
    nextv[-140] = -139.506803;
    nextv[-139] = -139.060150;
    nextv[-138] = -138.500000;
    nextv[-136] = -136.493151;
    nextv[-135] = -135.813665;
    nextv[-134] = -133.080925;
    nextv[-133] = -132.050314;
    nextv[-131] = -131.350282;
    nextv[-130] = -129.793919;
    nextv[-129] = -128.674157;
    nextv[-128] = -126.421053;
    nextv[-126] = -128.028736;
    nextv[-125] = -126.150418;
    nextv[-124] = -123.940476;
    nextv[-123] = -122.018293;
    nextv[-121] = -121.519231;
    nextv[-120] = -120.269022;
    nextv[-119] = -120.023364;
    nextv[-118] = -117.530928;
    nextv[-116] = -116.938202;
    nextv[-115] = -115.554455;
    nextv[-114] = -114.431925;
    nextv[-113] = -113.118280;
    nextv[-111] = -113.487437;
    nextv[-110] = -111.487745;
    nextv[-109] = -108.687500;
    nextv[-108] = -107.120000;
    nextv[-106] = -106.983051;
    nextv[-105] = -105.240426;
    nextv[-104] = -103.049793;
    nextv[-103] = -102.086957;
    nextv[-101] = -101.191781;
    nextv[-100] = -101.453333;
    nextv[-99] = -99.447368;
    nextv[-98] = -97.864754;
    nextv[-96] = -97.113725;
    nextv[-95] = -95.688017;
    nextv[-94] = -95.754032;
    nextv[-93] = -93.494737;
    nextv[-91] = -91.626866;
    nextv[-90] = -90.213307;
    nextv[-89] = -89.049669;
    nextv[-88] = -88.267857;
    nextv[-86] = -87.410526;
    nextv[-85] = -85.909823;
    nextv[-84] = -84.682594;
    nextv[-83] = -83.469595;
    nextv[-81] = -83.068852;
    nextv[-80] = -80.433790;
    nextv[-79] = -78.371747;
    nextv[-77] = -76.768621;
    nextv[-75] = -75.190736;
    nextv[-74] = -73.692521;
    nextv[-72] = -73.434473;
    nextv[-70] = -71.085979;
    nextv[-69] = -68.762178;
    nextv[-67] = -67.569061;
    nextv[-65] = -65.593308;
    nextv[-64] = -63.768349;
    nextv[-62] = -62.325059;
    nextv[-60] = -60.425300;
    nextv[-59] = -60.000000;
    nextv[-57] = -57.624035;
    nextv[-55] = -55.549370;
    nextv[-54] = -54.540594;
    nextv[-52] = -52.443182;
    nextv[-50] = -50.927911;
    nextv[-49] = -48.841818;
    nextv[-47] = -47.822538;
    nextv[-45] = -45.431858;
    nextv[-44] = -44.196998;
    nextv[-42] = -42.893248;
    nextv[-40] = -40.522414;
    nextv[-38] = -39.598628;
    nextv[-37] = -37.279613;
    nextv[-36] = -36.154229;
    nextv[-35] = -35.533537;
    nextv[-33] = -34.001479;
    nextv[-32] = -32.459124;
    nextv[-31] = -30.714286;
    nextv[-30] = -30.041991;
    nextv[-28] = -28.467153;
    nextv[-27] = -27.414348;
    nextv[-26] = -26.082621;
    nextv[-25] = -25.005772;
    nextv[-23] = -23.625984;
    nextv[-22] = -22.393624;
    nextv[-21] = -21.073171;
    nextv[-20] = -19.611570;
    nextv[-18] = -18.483070;
    nextv[-16] = -16.115531;
    nextv[-15] = -15.054765;
    nextv[-13] = -13.475673;
    nextv[-11] = -11.626828;
    nextv[-10] = -9.696360;
    nextv[-9] = -8.909953;
    nextv[-8] = -7.551418;
    nextv[-6] = -6.867127;
    nextv[-5] = -5.344538;
    nextv[-4] = -4.188889;
    nextv[-2] = -2.383594;
    nextv[-1] = -0.948300;
    nextv[0] = 0.028739;
    nextv[1] = 0.508793;
    nextv[2] = 2.123791;
    nextv[4] = 3.420441;
    nextv[5] = 4.874818;
    nextv[6] = 6.623022;
    nextv[8] = 7.574353;
    nextv[9] = 8.404468;
    nextv[10] = 9.639036;
    nextv[11] = 10.700222;
    nextv[13] = 12.719174;
    nextv[15] = 14.077071;
    nextv[16] = 15.552695;
    nextv[18] = 17.718214;
    nextv[20] = 19.237189;
    nextv[21] = 20.789288;
    nextv[22] = 21.724795;
    nextv[23] = 23.212144;
    nextv[25] = 24.093796;
    nextv[26] = 24.803279;
    nextv[27] = 26.733668;
    nextv[28] = 27.688488;
    nextv[30] = 28.740016;
    nextv[31] = 30.075428;
    nextv[32] = 31.412855;
    nextv[33] = 32.821070;
    nextv[35] = 33.983307;
    nextv[36] = 34.917685;
    nextv[37] = 36.516337;
    nextv[38] = 37.934887;
    nextv[40] = 39.371228;
    nextv[42] = 41.353747;
    nextv[44] = 42.258605;
    nextv[45] = 44.322537;
    nextv[47] = 45.876223;
    nextv[49] = 47.664129;
    nextv[50] = 49.436461;
    nextv[52] = 50.853573;
    nextv[54] = 52.744898;
    nextv[55] = 54.533233;
    nextv[57] = 55.939315;
    nextv[59] = 57.666667;
    nextv[60] = 58.816193;
    nextv[62] = 61.186072;
    nextv[64] = 62.785471;
    nextv[65] = 64.172452;
    nextv[67] = 66.316017;
    nextv[69] = 67.528509;
    nextv[70] = 68.841202;
    nextv[72] = 71.058504;
    nextv[74] = 72.418014;
    nextv[75] = 73.997704;
    nextv[77] = 76.165970;
    nextv[79] = 77.023613;
    nextv[80] = 79.212730;
    nextv[81] = 80.268917;
    nextv[83] = 81.452055;
    nextv[84] = 82.663697;
    nextv[85] = 84.110397;
    nextv[86] = 85.622196;
    nextv[88] = 86.805836;
    nextv[89] = 87.685941;
    nextv[90] = 89.316129;
    nextv[91] = 90.485414;
    nextv[93] = 91.911351;
    nextv[94] = 92.671823;
    nextv[95] = 93.871508;
    nextv[96] = 95.030857;
    nextv[98] = 96.841595;
    nextv[99] = 97.426979;
    nextv[100] = 98.807885;
    nextv[101] = 100.091416;
    nextv[103] = 101.704104;
    nextv[104] = 102.681870;
    nextv[105] = 103.820799;
    nextv[106] = 105.351384;
    nextv[108] = 106.839862;
    nextv[109] = 107.282658;
    nextv[110] = 109.010826;
    nextv[111] = 110.586093;
    nextv[113] = 110.875149;
    nextv[114] = 111.938799;
    nextv[115] = 113.657465;
    nextv[116] = 114.824444;
    nextv[118] = 116.316129;
    nextv[119] = 117.605411;
    nextv[120] = 118.864224;
    nextv[121] = 119.664071;
    nextv[123] = 121.764254;
    nextv[124] = 122.187978;
    nextv[125] = 123.794418;
    nextv[126] = 125.212259;
    nextv[128] = 125.807229;
    nextv[129] = 127.921634;
    nextv[130] = 128.264901;
    nextv[131] = 130.736402;
    nextv[133] = 131.267800;
    nextv[134] = 132.365900;
    nextv[135] = 133.922831;
    nextv[136] = 135.624099;
    nextv[138] = 135.814255;
    nextv[139] = 137.032771;
    nextv[140] = 138.910686;
    nextv[141] = 140.487755;
    nextv[143] = 141.616352;
    nextv[144] = 141.778132;
    nextv[145] = 143.572254;
    nextv[146] = 145.228296;
    nextv[148] = 146.089362;
    nextv[149] = 147.020986;
    nextv[150] = 148.452062;
    nextv[151] = 149.545356;
    nextv[153] = 151.504184;
    nextv[154] = 151.531674;
    nextv[155] = 153.454492;
    nextv[156] = 154.610577;
    nextv[158] = 155.667870;
    nextv[159] = 156.688782;
    nextv[160] = 157.935335;
    nextv[161] = 158.862614;
    nextv[163] = 160.910149;
    nextv[165] = 162.535990;
    nextv[166] = 163.743706;
    nextv[168] = 166.389078;
    nextv[170] = 167.174691;
    nextv[171] = 168.989064;
    nextv[173] = 170.233309;
    nextv[175] = 172.014641;
    nextv[176] = 173.357030;
    nextv[178] = 175.188085;
    nextv[180] = 175.942959;
    nextv[181] = 178.549957;
    nextv[183] = 180.460020;
    nextv[185] = 182.396975;
    nextv[186] = 183.397849;
    nextv[188] = 185.025845;
    nextv[190] = 187.110879;
    nextv[191] = 187.926092;
    nextv[193] = 189.439646;
    nextv[195] = 190.762025;
    nextv[196] = 193.182147;
    nextv[198] = 194.364796;
    nextv[200] = 196.994460;
    nextv[201] = 198.434605;
    nextv[203] = 200.559572;
    nextv[205] = 202.147239;
    nextv[206] = 202.384969;
    nextv[208] = 204.112698;
    nextv[210] = 206.392361;
    nextv[211] = 207.389948;
    nextv[213] = 209.449136;
    nextv[215] = 210.978022;
    nextv[216] = 212.250980;
    nextv[218] = 213.900433;
    nextv[220] = 215.534979;
    nextv[221] = 217.638350;
    nextv[223] = 219.813602;
    nextv[225] = 220.814070;
    nextv[226] = 222.632546;
    nextv[228] = 223.876056;
    nextv[230] = 225.800000;
    nextv[231] = 226.638629;
    nextv[233] = 229.937500;
    nextv[235] = 231.078431;
    nextv[236] = 230.856115;
    nextv[238] = 234.349206;
    nextv[240] = 235.961240;
    nextv[241] = 236.894515;
    nextv[243] = 238.698565;
    nextv[245] = 239.306306;
    nextv[246] = 240.545024;
    nextv[248] = 245.220000;
    nextv[250] = 246.811765;
    nextv[251] = 247.148810;
    nextv[253] = 248.969880;
    nextv[255] = 251.250000;
    nextv[256] = 250.978723;
    nextv[258] = 254.725806;
    nextv[260] = 256.842105;
    nextv[261] = 257.357143;
    nextv[263] = 257.241071;
    nextv[265] = 257.111111;
    nextv[266] = 259.837398;
    nextv[268] = 262.487805;
    nextv[270] = 267.619048;
    nextv[271] = 266.787037;
    nextv[273] = 267.701299;
    nextv[275] = 269.521739;
    nextv[276] = 273.756410;
    nextv[278] = 274.428571;
    nextv[280] = 271.933333;
    nextv[281] = 275.510204;
    nextv[283] = 280.282609;
    nextv[285] = 277.388889;
    nextv[286] = 280.760870;
    nextv[288] = 282.681818;
    nextv[290] = 286.411765;
    nextv[291] = 285.720930;
    nextv[293] = 290.208333;
    nextv[295] = 289.590909;
    nextv[296] = 292.416667;
    nextv[298] = 294.774194;
    nextv[300] = 298.545455;
    nextv[301] = 295.812500;
    nextv[303] = 300.083333;
    nextv[305] = 300.142857;
    nextv[306] = 290.000000;
    nextv[308] = 302.000000;
    nextv[310] = 294.333333;
    nextv[311] = 306.857143;
    nextv[313] = 309.600000;
    nextv[315] = 320.000000;
    nextv[316] = 312.250000;
    nextv[321] = 311.000000;
    nextv[322] = 316.000000;
    nextv[325] = 327.000000;
    nextv[326] = 325.000000;
    nextv[327] = 322.000000;
    nextv[331] = 318.500000;
    
    nextd[-92] = 40.000000;
    nextd[-83] = -26.000000;
    nextd[-82] = 38.000000;
    nextd[-81] = -11.000000;
    nextd[-80] = -1.000000;
    nextd[-75] = -1.666667;
    nextd[-74] = -14.500000;
    nextd[-71] = 12.250000;
    nextd[-70] = -33.000000;
    nextd[-69] = -27.000000;
    nextd[-68] = -16.500000;
    nextd[-67] = 30.000000;
    nextd[-66] = 13.333333;
    nextd[-65] = -11.166667;
    nextd[-64] = -15.600000;
    nextd[-63] = -2.090909;
    nextd[-62] = -9.800000;
    nextd[-61] = -9.400000;
    nextd[-60] = -19.000000;
    nextd[-59] = -2.666667;
    nextd[-58] = -14.428571;
    nextd[-57] = -13.428571;
    nextd[-56] = -15.181818;
    nextd[-55] = -18.157895;
    nextd[-54] = -13.947368;
    nextd[-53] = -20.541667;
    nextd[-52] = -20.150000;
    nextd[-51] = -24.000000;
    nextd[-50] = -13.000000;
    nextd[-49] = -7.590909;
    nextd[-48] = -11.153846;
    nextd[-47] = -17.878788;
    nextd[-46] = -14.095238;
    nextd[-45] = -21.230769;
    nextd[-44] = -15.909091;
    nextd[-43] = -14.258065;
    nextd[-42] = -16.463768;
    nextd[-41] = -16.000000;
    nextd[-40] = -10.598214;
    nextd[-39] = -10.492754;
    nextd[-38] = -12.077670;
    nextd[-37] = -14.152174;
    nextd[-36] = -13.217822;
    nextd[-35] = -14.278689;
    nextd[-34] = -9.972603;
    nextd[-33] = -14.075377;
    nextd[-32] = -12.989950;
    nextd[-31] = -11.419811;
    nextd[-30] = -11.637982;
    nextd[-29] = -10.213768;
    nextd[-28] = -11.537267;
    nextd[-27] = -11.156812;
    nextd[-26] = -11.058496;
    nextd[-25] = -11.294891;
    nextd[-24] = -9.928717;
    nextd[-23] = -8.881752;
    nextd[-22] = -10.173442;
    nextd[-21] = -9.230876;
    nextd[-20] = -9.552595;
    nextd[-19] = -9.662753;
    nextd[-18] = -8.564822;
    nextd[-17] = -8.372449;
    nextd[-16] = -8.932153;
    nextd[-15] = -7.701578;
    nextd[-14] = -6.694569;
    nextd[-13] = -6.852039;
    nextd[-12] = -6.636107;
    nextd[-11] = -6.282202;
    nextd[-10] = -5.817929;
    nextd[-9] = -4.749484;
    nextd[-8] = -4.629473;
    nextd[-7] = -4.125558;
    nextd[-6] = -3.746499;
    nextd[-5] = -3.134521;
    nextd[-4] = -2.097975;
    nextd[-3] = -1.989955;
    nextd[-2] = -1.529434;
    nextd[-1] = -1.312242;
    nextd[0] = -0.510852;
    nextd[1] = 0.288655;
    nextd[2] = 0.254218;
    nextd[3] = 0.727094;
    nextd[4] = 1.179327;
    nextd[5] = 1.558460;
    nextd[6] = 2.632621;
    nextd[7] = 2.597374;
    nextd[8] = 3.021129;
    nextd[9] = 3.334303;
    nextd[10] = 3.620537;
    nextd[11] = 4.833246;
    nextd[12] = 4.719552;
    nextd[13] = 5.207027;
    nextd[14] = 5.059009;
    nextd[15] = 6.096674;
    nextd[16] = 6.643836;
    nextd[17] = 7.360465;
    nextd[18] = 7.865991;
    nextd[19] = 7.947200;
    nextd[20] = 9.547404;
    nextd[21] = 9.797203;
    nextd[22] = 9.040230;
    nextd[23] = 9.757946;
    nextd[24] = 10.867069;
    nextd[25] = 10.947126;
    nextd[26] = 11.417323;
    nextd[27] = 12.796364;
    nextd[28] = 10.727679;
    nextd[29] = 15.515625;
    nextd[30] = 13.310861;
    nextd[31] = 15.814371;
    nextd[32] = 14.422535;
    nextd[33] = 14.856115;
    nextd[34] = 13.462963;
    nextd[35] = 13.854305;
    nextd[36] = 17.652632;
    nextd[37] = 19.831325;
    nextd[38] = 15.945055;
    nextd[39] = 19.030769;
    nextd[40] = 18.872093;
    nextd[41] = 23.112903;
    nextd[42] = 17.500000;
    nextd[43] = 19.866667;
    nextd[44] = 22.857143;
    nextd[45] = 22.611111;
    nextd[46] = 24.365854;
    nextd[47] = 21.689655;
    nextd[48] = 22.794118;
    nextd[49] = 10.435897;
    nextd[50] = 19.075000;
    nextd[51] = 23.448276;
    nextd[52] = 25.625000;
    nextd[53] = 18.533333;
    nextd[54] = 24.615385;
    nextd[55] = 14.538462;
    nextd[56] = 23.277778;
    nextd[57] = 21.066667;
    nextd[58] = 31.526316;
    nextd[59] = 22.000000;
    nextd[60] = 18.333333;
    nextd[61] = 16.272727;
    nextd[62] = 20.461538;
    nextd[63] = 18.166667;
    nextd[64] = 25.428571;
    nextd[65] = 10.000000;
    nextd[66] = 15.666667;
    nextd[67] = 29.666667;
    nextd[68] = 19.142857;
    nextd[69] = 29.666667;
    nextd[70] = 4.000000;
    nextd[71] = 16.250000;
    nextd[72] = 28.500000;
    nextd[73] = 17.333333;
    nextd[74] = 17.333333;
    nextd[75] = 15.500000;
    nextd[76] = 9.000000;
    nextd[77] = 23.200000;
    nextd[78] = 2.333333;
    nextd[81] = 16.000000;
    nextd[83] = 23.000000;
    nextd[88] = 46.000000;
    nextd[92] = 10.333333;
    nextd[93] = 5.000000;
    nextd[98] = -2.000000;
    nextd[102] = 26.000000;
    nextd[106] = 16.000000;
    nextd[115] = 15.000000;
}

const int maxv = 331, maxd = 115;

void solve() {
    vector<double> v(24);
    for (auto &i : v) cin >> i;
    double ofs = v[23] - v[0];
    for (int i = 24; i < 36; ++i) {
        int a = round(10 * v[i-1]);
        int d = round(10 * v[i-1] - 10 * v[i-2]);
        a = min(a, maxv);
        d = min(d, maxd);
        auto it1 = nextv.lower_bound(a);
        auto it2 = nextd.lower_bound(d);
        double nx = v[i-1] + it2->se / 10.0;
        nx = (nx + v[i-24] + ofs) / 2.0;
        cout << nx << ' ';
        v.push_back(nx);
    }
    cout << '\n';
}

int main() {
    cin.tie(0) -> sync_with_stdio(0);
    
    cout << fixed << setprecision(6);
    
#if 0
    int t = 0;
    if (t == 0) cin >> t;
    while (t--) day();
    precalc();
#else
    init();
    int t = 0;
    if (t == 0) cin >> t;
    while (t--) solve();
#endif
    return 0;
}

Test details

Test 1

Verdict: ACCEPTED

input
1000
-0.4 -0.1 -0.2 -0.3 -0.4 -0.5 ...

correct output
0.4 0.4 0.5 0.8 0.9 1.1 1.3 1....

user output
0.174457 0.311686 0.370276 0.3...
Truncated

Test 2

Verdict: ACCEPTED

input
1000
2.9 2.9 2.9 2.1 2.6 2 2 2.2 2....

correct output
2.3 1.6 1.5 1.1 1 0.7 0.6 0.8 ...

user output
2.612711 2.580813 2.564864 2.1...
Truncated

Test 3

Verdict: ACCEPTED

input
1000
6.6 6 6.4 6 4.6 4.6 4.2 4.3 4....

correct output
10 10.9 10.3 10.1 9.1 7.3 5.7 ...

user output
10.335978 9.930700 9.810451 9....
Truncated

Test 4

Verdict: ACCEPTED

input
1000
19.4 20.2 19.1 18.9 18.3 17.3 ...

correct output
18 18.2 17 17.5 17.2 16.2 12 8...

user output
17.123528 17.496152 17.257042 ...
Truncated

Test 5

Verdict: ACCEPTED

input
1000
-5.7 -5.8 -5.8 -5.9 -7.1 -6.9 ...

correct output
-4.2 -4.1 -4 -3.8 -3.5 -3.2 -3...

user output
-4.487289 -4.569187 -4.650206 ...
Truncated

Test 6

Verdict: ACCEPTED

input
1000
14.8 14.8 15.4 12.9 11.8 9.7 9...

correct output
11.8 11 11.6 10.8 10.4 10.4 10...

user output
12.523528 12.496152 12.822533 ...
Truncated

Test 7

Verdict: ACCEPTED

input
1000
0.7 1 2 1.4 0.6 -0.4 -0.9 -0.7...

correct output
-1.3 -0.5 -0.6 -1 -3.2 -7.2 -6...

user output
-1.787289 -1.669187 -1.070161 ...
Truncated

Test 8

Verdict: ACCEPTED

input
1000
15.1 15.3 14.9 14.4 14.4 13.7 ...

correct output
15.6 15.9 16 15.2 14.6 14.4 13...

user output
15.166715 15.196068 14.972492 ...
Truncated