fork(1) download
  1. #include <iostream>
  2. #include <vector>
  3. #include<bits/stdc++.h>
  4. using namespace std;
  5. int main() {
  6. std::vector<int> scv = {
  7. -3, 13, 6, -29, -31, 43, 46, 8, 7, 21, 12, 6, 31, 38, 2, 31,
  8. 12, -8, 23, 14, -22, 37, 24, 19, -2, 24, 17, 31, -6, 2, 4, 11,
  9. -13, 41, 17, 4, 15, -9, -32, 33, 23, -6, 18, 32, 9, -6, 23, 9,
  10. -15, 20, 3, 19, -16, 11, 8
  11. };
  12.  
  13. std::vector<int> vti = {
  14. -2, 11, 12, -25, -36, 30, 21, -11, -1, 5, 16, -11, 19, 19, 1, 28,
  15. 15, -2, 12, 24, -10, 29, 6, 8, -1, 34, 19, 30, 24, 19, -13, -9,
  16. -25, 30, 8, 2, 12, 1, -37, 26, 16, -2, 14, 31, 12, 0, 11, 19,
  17. -7, 28, 19, 18, -24, 22, 20
  18. };
  19.  
  20. int t = vti.size();
  21. vector<double> tmp(t,1.0);
  22. vector<vector<double>> telltale(t, tmp);
  23.  
  24. for(int l=0;l< t;l++)
  25. {
  26. for(int r=l; r<t;r++)
  27. {
  28. int cnt = r-l+1;
  29. double d= 1.0;
  30. for(int k=0; k<cnt;k++)
  31. {
  32. double scv_r = (100.0 +scv[l+k])/100,
  33. vti_r = (100.0 +vti[l+k])/100;
  34. d = (d*scv_r)/vti_r;
  35. }
  36. telltale[l][r]= d;
  37. }
  38. }
  39. vector<vector<double>> distribution_telltale_rolling_period(t+1);
  40. for(int l=0;l<t;l++)
  41. {
  42. for(int r=l;r<t;r++)
  43. {
  44. distribution_telltale_rolling_period[r-l+1].push_back(telltale[l][r]);
  45. }
  46. }
  47.  
  48. for(int i=1;i< (t+1);i++)
  49. {
  50. sort(distribution_telltale_rolling_period[i].begin(),
  51. distribution_telltale_rolling_period[i].end());
  52. if(i!=1)
  53. cout<<"\n";
  54. for(int j=0; j< distribution_telltale_rolling_period[i].size();j++)
  55. {
  56. if(j!=0)
  57. cout<<",";
  58. cout<<int(10000*distribution_telltale_rolling_period[i][j]);
  59. }
  60. }
  61.  
  62. // for(int i=1;i< (t+1);i++)
  63. // {
  64. // sort(distribution_telltale_rolling_period[i].begin(),
  65. // distribution_telltale_rolling_period[i].end());
  66. // //cout<<"\n"<<i;
  67. // for(int j=0; j< distribution_telltale_rolling_period[i].size();j++)
  68. // {
  69. // cout<<"(";
  70. // cout<<i<<","<<distribution_telltale_rolling_period[i][j]<<"),";
  71. // }
  72. // }
  73. return 0;
  74. }
  75.  
Success #stdin #stdout 0.01s 5292KB
stdin
Standard input is empty
stdout
7580,8571,8655,8666,9000,9009,9098,9139,9159,9193,9253,9375,9387,9400,9464,9466,9591,9655,9732,9739,9831,9897,9898,10076,10076,10084,10099,10180,10196,10234,10267,10350,10555,10603,10620,10781,10793,10808,10833,10846,10982,10999,11008,11018,11052,11081,11523,11596,11600,11698,11910,11954,12066,12134,12197
6497,7638,7967,8114,8188,8371,8568,8728,8959,9098,9142,9148,9160,9204,9251,9634,9724,9806,9907,9928,9967,10056,10076,10096,10149,10170,10206,10246,10309,10335,10416,10429,10469,10907,11045,11126,11146,11192,11393,11499,11711,11749,11859,12423,12455,12581,12766,12889,13111,13115,13272,14149,14581,14642
6547,7416,7510,7767,7848,8183,8461,8750,9006,9050,9120,9168,9218,9276,9357,9432,9478,9536,9540,9647,9659,9985,10004,10040,10066,10093,10137,10141,10150,10265,10527,10735,10767,11226,11341,11980,11985,12025,12080,12498,12659,12759,12892,13251,13629,13688,14309,15113,15204,15346,15825,16106,16914
6437,6793,6950,7479,7827,8214,8696,8720,8777,9027,9044,9075,9127,9231,9285,9292,9449,9474,9541,9736,9833,9898,9923,10181,10214,10218,10276,10540,10607,10625,10884,11112,11587,11673,11807,11863,12301,13194,13546,13550,13897,14322,14497,14588,14592,14680,15355,16625,17364,17407,18236,18345
5957,6850,6879,7527,7695,7899,8000,8175,8229,8266,8486,8723,9152,9356,9447,9547,9733,9999,10323,10377,10440,10573,10746,10816,10870,10906,10958,10990,11029,11083,11176,11197,11608,11743,11994,12539,12820,12850,14269,14825,15714,15724,15766,16438,16917,16951,17380,17607,18767,19874,20060
5897,7075,7121,7406,7521,7571,7580,7591,7956,8187,8496,8551,9386,9540,9684,9704,10141,10205,10706,10720,10796,10806,10867,10897,11074,11395,11642,11698,11920,11962,11978,12034,12063,12085,12328,12856,13051,15173,15304,15557,17035,17084,17405,17766,18284,19132,19368,20263,20971,21627
6497,6769,6886,6889,7049,7135,8016,8268,8390,8686,8695,8851,8867,9289,9939,9991,10243,10684,10753,10888,10889,10930,11064,11096,11244,11762,11857,12012,12345,12423,12627,12913,12918,13248,13877,14367,14777,15682,15838,16814,17369,17485,18465,20474,20806,20881,22187,23068,23085
6200,6939,6944,7601,7634,7767,7887,8298,8490,8598,8781,9417,9589,9823,9849,10076,10172,10597,10767,10951,10972,11056,11131,11180,11313,11350,11810,11841,12180,13013,13166,13389,13872,14647,15676,15779,16926,17028,17117,17834,18746,18898,19377,19768,22407,24870,25394,26771
6870,6997,7175,7182,7675,7959,8072,8162,9002,9086,9474,9898,9961,9974,10183,10272,10300,10396,10556,10787,10840,10881,10928,11208,11400,12251,12256,12794,12843,13268,13519,14506,15234,15531,15986,16068,16943,17867,18405,18709,19726,20234,22932,23544,27036,27378,29449
6458,6889,6983,6996,7243,7503,7734,8439,9502,9649,10031,10127,10228,10818,10870,10990,11038,11083,11094,11094,11210,11222,11319,11839,11913,12181,12350,12572,13045,13293,13623,14006,14897,17278,17343,17556,18945,19046,19525,21358,22282,22334,25918,27670,29740,31749
6285,6431,6947,7037,7305,8005,8240,8363,8908,9863,10111,10205,10256,10266,10429,11204,11334,11719,11770,11920,12019,12071,12138,12274,12856,13114,13126,13147,13352,13394,13395,15420,16140,18172,18307,18851,18975,20966,22647,22684,24529,26948,30056,30437,32064
6333,7063,7283,7366,7679,7688,7710,7736,9241,9615,9939,10094,10201,10368,10381,11298,11556,11949,12068,12395,12891,12913,12993,13036,13248,13653,13878,13944,13988,14450,15538,15619,17444,18809,19412,21723,22452,23026,24971,25298,28446,29643,30353,32815
6555,6631,6986,7534,7776,8142,8322,8443,8663,9378,9488,10172,10194,10585,11167,11833,12024,12254,12269,12519,13026,13166,13984,14304,14715,14809,14856,15080,15106,15118,15122,17210,18619,18953,21169,22485,24716,27783,27828,28727,28958,31065,31959
6288,6458,7408,7498,7711,7926,8393,8594,8895,9674,10272,10299,10879,11054,11467,11822,12054,12834,13236,13519,13578,13749,14115,14214,14828,15402,16043,16056,16616,17036,17378,18346,18445,19273,22657,25542,28663,29245,29401,30002,30255,30561
6609,6667,7562,7699,7720,7787,7819,9070,9276,9669,10481,11799,11912,11932,11947,12180,12437,12723,13014,13904,14223,14579,14610,15751,15765,15815,16357,16448,17339,18783,19148,19420,19484,22050,22137,28097,28402,28634,28947,29930,32949
6674,7037,7764,7850,7901,8358,8440,9030,9416,9826,11216,11367,12595,12782,12958,13114,13147,13491,13984,14176,14249,14427,14721,14722,15221,15500,16796,18900,18955,19213,20696,20727,22793,23510,24350,26881,29150,29625,30292,31192
7596,7604,7740,7917,7979,8504,8582,9637,9941,10657,10923,12165,12940,13033,13186,13355,13878,14038,14327,14475,14556,14835,14965,15133,15380,15619,17540,17598,17766,20487,22967,25114,25861,26253,27365,27502,28676,28852,29521
6844,7808,8521,8576,8750,9224,9253,9732,11179,11840,11847,12362,12810,13115,13178,13382,13395,13467,14313,14437,14585,14715,15080,16085,16234,16334,17246,18958,19686,21037,24853,24860,27086,27140,27881,30053,30252,30303
7027,7961,9302,9479,10148,10186,10700,11286,11290,11432,12057,12125,12835,13259,13437,13497,13571,14114,14156,14195,14697,14923,15079,17214,17241,17378,18032,18639,19228,23005,23521,26394,27629,29746,29997,32616,33333
7165,8625,9798,10281,10791,12132,12245,12425,13014,13052,13086,13092,13135,13135,13174,13241,13343,13360,13669,13797,14610,14942,15038,16481,16511,18026,18282,18783,22618,23945,24980,27347,27758,30876,32997,35938
7762,9354,11292,11713,11927,12347,12431,12493,13003,13162,13265,13393,13437,13737,13774,14200,14238,14292,14413,14721,14785,14798,15451,15602,15844,17091,17535,22792,23701,25430,27292,29222,30534,34021,35575
8419,10851,11712,12106,12204,12222,12589,13373,13417,13498,13526,13543,13682,13752,14288,14327,14548,14566,15086,15197,15384,15632,15734,17166,17221,17278,18151,25171,27502,29748,30021,32198,32920,33677
9766,10138,11803,12378,12390,12532,13067,13236,13467,13487,13544,13888,13972,14163,14589,14810,15685,15730,15997,16465,16574,16760,16935,17391,18289,18618,20848,29445,30252,31164,31873,32366,32778
10216,10224,11454,11604,11912,12406,12513,13374,13793,14462,14906,14923,15017,15344,15754,15823,15851,16105,17267,17704,17795,17799,17870,17976,19099,20170,22933,29494,30640,32444,32447,32615
10044,10302,10738,11300,11338,13506,13562,13669,14117,14240,14404,14511,14572,14626,15426,15882,16731,17457,17730,19474,19657,20565,20643,20716,21361,21595,24724,28999,30026,30876,32116
9294,10129,10281,10630,11387,12206,12493,14029,14182,14256,14500,14910,14968,15662,15974,15990,16004,18540,19856,21116,21192,22390,22442,23406,23498,25050,26056,29222,29521,29719
9200,9253,9373,10360,11195,11712,13331,14357,14521,14615,15024,15117,15575,16068,16533,16982,17242,19025,20062,20388,22152,22882,24255,25333,27169,28662,29220,29748,30225
9278,9324,10138,10186,10360,13701,14500,14621,14632,14640,14718,14772,14861,15521,17530,18200,18369,18987,20535,22551,23495,23982,24731,29434,29445,30901,32783,33248
9167,9426,10223,10255,11859,13452,13531,13744,14240,14551,14975,15008,16223,16815,19298,19329,19827,21169,21676,22321,22697,25393,29253,30011,35515,35846,36061
8483,9330,11300,11960,12367,12595,12611,13385,14574,14860,15123,15230,17405,18510,19132,20929,22849,22879,22984,23106,27686,30815,33934,36211,38879,39067
8397,10281,10915,11594,12701,13219,13581,13699,13950,14718,14833,17538,19160,22046,22192,22871,24118,24695,27764,28185,32116,36805,37181,39833,42119
9253,10035,11008,12027,12733,12750,13586,13835,14038,15180,17068,19306,21286,22820,25573,26067,27897,29967,32695,33500,34833,39872,40900,42945
10120,10824,11021,11953,12167,12417,12773,13904,15330,16044,18789,22033,22994,24530,27640,31632,32361,35461,36159,36850,37736,40654,44095
10346,11070,11114,11185,11495,11641,12708,14042,17662,17778,22201,22378,25390,26512,33541,35099,38168,38416,38476,39729,39775,41743
9963,10076,10177,10434,11914,12284,12834,16284,19571,21035,21606,25584,27442,32172,37610,38024,39169,39507,40471,41984,42882
9159,10161,10312,11176,11532,12032,14883,17926,20310,23309,24899,27652,33301,35595,38770,38819,40219,40595,44518,45264
10059,10399,10414,10492,11231,13953,16384,21351,22506,23405,26911,33555,36237,38420,39808,40181,42701,42850,47996
9443,10218,10502,11494,12077,15360,19514,20614,25296,25935,32656,35867,39113,40488,40555,44199,45436,46037
9196,10458,11608,12179,13295,18294,18841,23756,28031,30697,38713,39403,41285,43002,43582,44537,47652
9412,10561,13408,13461,15835,17663,21712,25675,34015,37039,40864,41247,43344,43777,45111,48016
9505,12248,14819,15288,15969,20355,23467,31157,40743,41043,41990,42694,43330,45455,46730
11023,13483,15418,17618,17650,22000,28477,37594,41562,43020,43463,43926,44238,45148
12134,16058,17041,17768,19042,26697,34360,41354,41583,41868,43020,43795,48675
14452,15505,19203,19638,23107,32213,37796,39356,42622,43348,44585,46079
13954,17867,21225,23303,27882,35434,40065,40749,42187,42207,43610
16080,19311,25756,28118,30670,38202,38576,39656,39946,44396
17380,23434,30930,31078,33066,36165,36509,40665,43943
21090,28276,31302,33346,34185,34227,37167,40250
25448,29625,31103,31568,34844,36788,36856
27993,29876,30159,33533,34489,34891
29851,30180,30415,31745,33021
28570,30044,30104,33616
27040,30585,33273
27527,30273
27246