Submission #1179925

#TimeUsernameProblemLanguageResultExecution timeMemory
1179925BlockOGScales (IOI15_scales)C++20
100 / 100
0 ms328 KiB
#include "scales.h" // meeeow mrrow :3c // steam on free !vivid/stasis play int bytecode[1812] = {390,603,603,1036,200,200,4028,66,66,781,21,21,4173,6,6,5793,1,1,208554,89754,111354,3093,1,1,111804,204504,209004,601,1,1,85254,74904,90204,5313,6,6,3093,1,1,170254,165754,166204,2043,1,1,75304,218554,204904,601,1,1,169679,165629,170129,3153,6,6,5973,1,1,111904,90304,105454,2043,1,1,75004,216754,204604,4023,1,1,104879,209104,105329,751,21,21,4203,6,6,5793,1,1,203154,73554,57354,2043,1,1,74004,210804,203604,571,1,1,52854,113604,57804,5313,6,6,2043,1,1,164854,172054,172654,3093,1,1,114154,218404,211354,571,1,1,164279,171929,164729,2073,6,6,6003,1,1,74104,57904,67654,3093,1,1,113704,215704,210904,3993,1,1,67079,203704,67529,605,21,21,4203,6,6,5793,1,1,180754,177454,178054,5793,1,1,107129,107254,107854,751,1,1,216204,177329,216304,4173,6,6,5793,1,1,180604,177004,176554,5793,1,1,68429,69004,68554,751,1,1,215304,176429,215404,4713,5,6,391,0,1,85079,52679,991,1,1,89129,88679,89254,991,1,1,56729,56279,56854,4928,66,66,601,21,21,5253,6,6,5793,1,1,208579,89779,111379,3093,1,1,111979,205579,209179,4923,1,1,85279,90379,75979,991,6,6,4923,1,1,130829,131429,127829,2043,1,1,76204,223954,205804,3093,1,1,131554,127954,128404,3183,6,6,6153,1,1,112054,90454,99154,2043,1,1,76054,223054,205654,4923,1,1,98429,209254,99029,571,21,21,5283,6,6,5793,1,1,203179,73579,57379,2043,1,1,74179,211879,203779,4893,1,1,52879,57979,114679,991,6,6,4893,1,1,125429,126029,134129,3093,1,1,115054,223804,212254,2043,1,1,126154,134254,134854,2103,6,6,6183,1,1,74254,58054,61354,3093,1,1,114754,222004,211954,4893,1,1,60629,203854,61229,608,21,21,5288,6,6,961,1,1,84929,148354,145654,5793,1,1,101729,101854,102454,5973,1,1,144929,145054,222679,5288,6,6,5793,1,1,63029,63604,63154,931,1,1,52529,148204,144604,5973,1,1,144029,144154,221779,787,6,6,1021,1,1,55829,55229,55954,1021,1,1,88229,87629,88354,391,0,1,222754,221854,4928,66,66,6003,21,21,601,6,6,4923,1,1,85129,88729,67129,751,1,1,130854,191554,70804,751,1,1,98454,190654,70654,823,6,6,2043,1,1,67879,131604,135204,1683,1,1,67954,89554,174454,6153,1,1,135304,131704,89479,6153,6,6,2733,1,1,102904,150904,151504,781,1,1,99204,129304,99304,5793,1,1,151404,70579,102804,5973,21,21,571,6,6,4893,1,1,52729,56329,104929,781,1,1,125454,191404,109654,781,1,1,60654,189604,109354,818,6,6,3093,1,1,105679,126204,128904,2733,1,1,105754,57154,168004,6183,1,1,129004,126304,57079,751,6,6,5793,1,1,150504,64104,61404,6183,1,1,151954,135754,109279,5793,1,1,150604,64204,61504,785,21,21,991,6,6,5793,1,1,190279,170479,174079,5793,1,1,190354,170554,174154,601,1,1,169729,153754,103354,991,6,6,5793,1,1,189379,167779,165079,5793,1,1,189454,167854,165154,571,1,1,164329,153604,64504,3633,5,6,391,0,1,84954,52554,1021,1,1,88404,88504,87654,1021,1,1,56004,56104,55254,1036,200,200,4023,66,66,6213,21,21,2043,6,6,781,1,1,79854,218529,216729,4713,1,1,36429,36054,36129,1893,1,1,83454,83754,83829,2913,6,6,5793,1,1,159729,159179,159279,2073,1,1,103979,104279,104379,2073,1,1,168779,169079,169179,3093,6,6,4713,1,1,198429,198054,198129,1893,1,1,110454,110754,110829,1893,1,1,207654,207954,208029,751,21,21,811,6,6,2073,1,1,157979,158279,158379,5793,1,1,171879,171779,172629,3093,1,1,218229,114129,211329,4208,6,6,5793,1,1,34854,196854,18654,961,1,1,197154,210654,35154,571,1,1,113454,15054,18954,811,6,6,3093,1,1,214629,113529,210729,5793,1,1,35229,197229,19029,2073,1,1,28379,28679,28779,600,21,21,4208,6,6,5793,1,1,177279,180729,178029,5793,1,1,107079,106979,107829,751,1,1,177179,216054,216129,4173,6,6,5793,1,1,30129,29579,29679,5793,1,1,175929,180429,175479,751,1,1,175379,214254,214329,4713,6,5,2073,1,1,82379,82679,82779,391,1,0,79679,14879,2073,1,1,17579,17879,17979,4923,66,66,6213,21,21,2043,6,6,601,1,1,79879,223929,223029,3633,1,1,37329,37129,37179,1893,1,1,83479,83979,83929,3093,6,6,3633,1,1,199329,199129,199179,1893,1,1,110479,110979,110929,1893,1,1,207679,208179,208129,2733,6,6,5793,1,1,121929,121379,121479,2103,1,1,97529,97979,98079,2103,1,1,129929,130379,130479,571,21,21,811,6,6,2103,1,1,119129,119579,119679,3093,1,1,223629,115029,212229,5793,1,1,134079,133979,134829,5288,6,6,5793,1,1,34879,196879,18679,961,1,1,197329,211729,35329,4893,1,1,19129,15079,114529,811,6,6,3093,1,1,220929,114579,211779,2103,1,1,21929,22379,22479,5793,1,1,35379,197379,19179,1683,21,21,5283,6,6,961,1,1,79529,148329,145629,5793,1,1,101679,101579,102429,5973,1,1,144879,144779,222529,5283,6,6,5793,1,1,24729,24179,24279,931,1,1,148029,14729,143529,5973,1,1,143079,142979,220729,782,6,6,2103,1,1,16529,16979,17079,2103,1,1,81329,81779,81879,391,1,0,222579,220779,4923,66,66,2103,21,21,961,6,6,601,1,1,79729,129954,97554,4203,1,1,151254,190629,191529,4203,1,1,135054,102654,174429,3153,6,6,600,1,1,102729,149829,28429,5793,1,1,130629,82429,135129,2733,1,1,122829,98229,151329,1683,6,6,601,1,1,83029,130554,98154,3153,1,1,29029,31929,31729,3093,1,1,29079,83079,31779,5973,21,21,1893,6,6,3093,1,1,119754,104629,122454,2733,1,1,18279,104679,161529,6183,1,1,122529,119829,18229,571,6,6,780,1,1,109629,191229,119154,4893,1,1,17629,14929,104029,780,1,1,109179,188529,21954,751,6,6,6183,1,1,151929,135729,109129,5793,1,1,25254,149454,22554,5793,1,1,25329,149529,22629,780,21,21,961,6,6,2073,1,1,168829,169479,169429,571,1,1,153729,190129,190179,3633,1,1,173979,173929,103329,961,6,6,571,1,1,153429,188329,188379,2073,1,1,158029,158679,158629,3633,1,1,25629,161329,161379,3633,6,5,2103,1,1,81354,82029,81954,391,1,0,79554,14754,2103,1,1,16554,17229,17154,1036,200,200,3993,66,66,6213,21,21,3093,6,6,751,1,1,42054,218354,215654,4713,1,1,36404,35954,35904,2973,1,1,44754,44904,44954,751,6,6,5793,1,1,159704,159104,159029,3153,1,1,162479,162629,162704,3153,1,1,65279,65429,65504,931,6,6,4713,1,1,198404,197954,197904,2973,1,1,201354,201504,201554,2973,1,1,71754,71904,71954,781,21,21,811,6,6,3153,1,1,157079,157229,157304,5793,1,1,165404,166154,165329,931,1,1,218204,204854,75254,4208,6,6,931,1,1,196104,204204,34104,5793,1,1,33954,12354,195954,2733,1,1,74604,9654,12504,811,6,6,931,1,1,214604,204254,74654,5793,1,1,34154,12554,196154,3153,1,1,27479,27629,27704,570,21,21,4208,6,6,5793,1,1,68204,68954,68129,5793,1,1,176204,176954,180554,781,1,1,176129,215004,215054,4203,6,6,5793,1,1,30104,29504,29429,5793,1,1,175904,175304,180404,781,1,1,175229,214104,214154,4713,6,6,3153,1,1,43679,43829,43904,3153,1,1,11279,11429,11504,391,1,1,41879,9479,4893,66,66,6213,21,21,3093,6,6,571,1,1,42079,223754,221954,3633,1,1,37304,37004,36979,2973,1,1,44779,45104,45079,931,6,6,3633,1,1,199304,199004,198979,2973,1,1,201379,201704,201679,2973,1,1,71779,72104,72079,571,6,6,5793,1,1,121904,121304,121229,3183,1,1,123629,123929,124004,3183,1,1,58829,59129,59204,601,21,21,811,6,6,3183,1,1,118229,118529,118604,931,1,1,223604,205754,76154,5793,1,1,127604,128354,127529,5288,6,6,931,1,1,196279,205279,34279,5793,1,1,33979,12379,195979,2913,1,1,75679,9679,12679,811,6,6,931,1,1,220904,205304,75704,3183,1,1,21029,21329,21404,5793,1,1,34304,12704,196304,2733,21,21,5253,6,6,931,1,1,41729,148154,144554,5793,1,1,62804,63554,62729,6003,1,1,143804,143729,221479,5253,6,6,5793,1,1,24704,24104,24029,931,1,1,148004,9329,143504,6003,1,1,142904,142829,220579,752,6,6,3183,1,1,10229,10529,10604,3183,1,1,42629,42929,43004,391,1,1,221504,220604,4893,66,66,3183,21,21,931,6,6,571,1,1,41929,123654,58854,4173,1,1,150204,189554,191354,4173,1,1,128604,63804,167954,2073,6,6,570,1,1,63854,149804,27529,5793,1,1,124154,128654,43729,571,1,1,122804,150254,59354,2733,6,6,571,1,1,44179,124104,59304,2073,1,1,27979,31904,31579,931,1,1,44204,28004,31604,6003,21,21,2973,6,6,931,1,1,65779,118704,122304,571,1,1,65804,11804,161504,6153,1,1,122354,118754,11779,601,6,6,750,1,1,70754,191204,118254,2913,1,1,65329,9529,11329,750,1,1,70304,188504,21054,2913,6,6,6153,1,1,150854,129254,70279,5793,1,1,25104,21504,149304,5793,1,1,25154,21554,149354,750,21,21,931,6,6,3153,1,1,162529,163004,162979,601,1,1,153554,189079,189104,3633,1,1,167504,64454,167479,931,6,6,601,1,1,153404,188179,188204,3153,1,1,157129,157604,157579,3633,1,1,25604,161204,161179,3633,6,6,3183,1,1,42654,43154,43104,3183,1,1,10254,10754,10704,391,1,1,41754,9354}; void init(int T) {} void ans(int a, int b, int c, int d, int e, int f) { int res[6] = {a + 1, b + 1, c + 1, d + 1, e + 1, f + 1}; answer(res); } int l(int a, int b, int c, int d) { return getLightest(a + 1, b + 1, c + 1) - 1; } int m(int a, int b, int c, int d) { return getMedian(a + 1, b + 1, c + 1) - 1; } int h(int a, int b, int c, int d) { return getHeaviest(a + 1, b + 1, c + 1) - 1; } int w(int a, int b, int c, int d) { return getNextLightest(a + 1, b + 1, c + 1, d + 1) - 1; } void orderCoins() { int (*funcs[4])(int, int, int, int) = {l, m, h, w}; for (int i = 0;;) { int v = bytecode[i++]; int ins = v % 5; int a = v / 5 % 6; int b = v / 30 % 6; int c = v / 180 % 6; int d = v / 1080 % 6; int e = v / 6480 % 6; int f = v / 38880; if (ins == 4) { ans(a, b, c, d, e, f); break; } else { int la = bytecode[i++]; int lb = bytecode[i++]; int res = funcs[ins](a, b, c, d); if (res == b) i += la; else if (res == c) i += la + lb; } } }
#Verdict Execution timeMemoryGrader output
Fetching results...