amphora commited on
Commit
0e5db60
·
verified ·
1 Parent(s): 7105011

Add files using upload-large-folder tool

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. tasks/construct-ae-p32-spherical-design-l5-s0/environment/Dockerfile +7 -0
  2. tasks/construct-ae-p32-spherical-design-l5-s0/environment/instance.json +1 -0
  3. tasks/construct-ae-p32-spherical-design-l5-s0/solution/solve.sh +5 -0
  4. tasks/construct-ae-p32-spherical-design-l5-s0/tests/check.py +53 -0
  5. tasks/construct-ae-p32-spherical-design-l5-s0/tests/instance.json +1 -0
  6. tasks/construct-ae-p32-spherical-design-l5-s0/tests/run.py +127 -0
  7. tasks/construct-ae-p32-spherical-design-l5-s0/tests/test.sh +9 -0
  8. tasks/construct-ae-p38-factorial-factors-l2-s0/environment/Dockerfile +7 -0
  9. tasks/construct-ae-p38-factorial-factors-l2-s0/environment/instance.json +1 -0
  10. tasks/construct-ae-p38-factorial-factors-l2-s0/solution/solve.sh +5 -0
  11. tasks/construct-ae-p38-factorial-factors-l2-s0/tests/check.py +12 -0
  12. tasks/construct-ae-p38-factorial-factors-l2-s0/tests/instance.json +1 -0
  13. tasks/construct-ae-p38-factorial-factors-l2-s0/tests/run.py +127 -0
  14. tasks/construct-ae-p38-factorial-factors-l2-s0/tests/test.sh +9 -0
  15. tasks/construct-ae-p38-factorial-factors-l2-s7/environment/Dockerfile +7 -0
  16. tasks/construct-ae-p38-factorial-factors-l2-s7/environment/instance.json +1 -0
  17. tasks/construct-ae-p38-factorial-factors-l2-s7/solution/solve.sh +5 -0
  18. tasks/construct-ae-p38-factorial-factors-l2-s7/tests/check.py +12 -0
  19. tasks/construct-ae-p38-factorial-factors-l2-s7/tests/instance.json +1 -0
  20. tasks/construct-ae-p38-factorial-factors-l2-s7/tests/run.py +127 -0
  21. tasks/construct-ae-p38-factorial-factors-l2-s7/tests/test.sh +9 -0
  22. tasks/construct-ae-p38-factorial-factors-l2-s9/environment/Dockerfile +7 -0
  23. tasks/construct-ae-p38-factorial-factors-l2-s9/environment/instance.json +1 -0
  24. tasks/construct-ae-p38-factorial-factors-l2-s9/solution/solve.sh +5 -0
  25. tasks/construct-ae-p38-factorial-factors-l2-s9/tests/check.py +12 -0
  26. tasks/construct-ae-p38-factorial-factors-l2-s9/tests/instance.json +1 -0
  27. tasks/construct-ae-p38-factorial-factors-l2-s9/tests/run.py +127 -0
  28. tasks/construct-ae-p38-factorial-factors-l2-s9/tests/test.sh +9 -0
  29. tasks/construct-ae-p38-factorial-factors-l6-s1/environment/Dockerfile +7 -0
  30. tasks/construct-ae-p38-factorial-factors-l6-s1/environment/instance.json +1 -0
  31. tasks/construct-ae-p38-factorial-factors-l6-s1/solution/solve.sh +5 -0
  32. tasks/construct-ae-p38-factorial-factors-l6-s1/tests/check.py +12 -0
  33. tasks/construct-ae-p38-factorial-factors-l6-s1/tests/instance.json +1 -0
  34. tasks/construct-ae-p38-factorial-factors-l6-s1/tests/run.py +127 -0
  35. tasks/construct-ae-p38-factorial-factors-l6-s1/tests/test.sh +9 -0
  36. tasks/construct-ae-p38-factorial-factors-l6-s6/environment/Dockerfile +7 -0
  37. tasks/construct-ae-p38-factorial-factors-l6-s6/environment/instance.json +1 -0
  38. tasks/construct-ae-p38-factorial-factors-l6-s6/solution/solve.sh +5 -0
  39. tasks/construct-ae-p38-factorial-factors-l6-s6/tests/check.py +12 -0
  40. tasks/construct-ae-p38-factorial-factors-l6-s6/tests/instance.json +1 -0
  41. tasks/construct-ae-p38-factorial-factors-l6-s6/tests/run.py +127 -0
  42. tasks/construct-ae-p38-factorial-factors-l6-s6/tests/test.sh +9 -0
  43. tasks/construct-ae-p52-erdos-squarefree-l2-s2/environment/Dockerfile +7 -0
  44. tasks/construct-ae-p52-erdos-squarefree-l2-s2/environment/instance.json +1 -0
  45. tasks/construct-ae-p52-erdos-squarefree-l2-s2/solution/solve.sh +5 -0
  46. tasks/construct-ae-p52-erdos-squarefree-l2-s2/tests/check.py +38 -0
  47. tasks/construct-ae-p52-erdos-squarefree-l2-s2/tests/instance.json +1 -0
  48. tasks/construct-ae-p52-erdos-squarefree-l2-s2/tests/run.py +127 -0
  49. tasks/construct-ae-p52-erdos-squarefree-l2-s2/tests/test.sh +9 -0
  50. tasks/construct-ae-p52-erdos-squarefree-l2-s5/environment/Dockerfile +7 -0
tasks/construct-ae-p32-spherical-design-l5-s0/environment/Dockerfile ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ FROM python:3.11.16-slim
2
+ RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
3
+ && rm -rf /var/lib/apt/lists/*
4
+ RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
5
+ python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
6
+ WORKDIR /workdir
7
+ COPY instance.json /workdir/instance.json
tasks/construct-ae-p32-spherical-design-l5-s0/environment/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"t": 19, "N": 198, "family": "ae_p32_spherical_designs", "subset": "construct"}
tasks/construct-ae-p32-spherical-design-l5-s0/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # oracle: a known valid construction (planted witness or published solution)
3
+ cat > /workdir/answer.json <<'RLMATH_EOF'
4
+ {"points": [[0.2527759326534977, -0.9566791840084274, -0.14446199069694396], [-0.9071773294756267, 0.015962244615743904, 0.4204455965190948], [-0.616471714044581, -0.20797033654468083, -0.7594148832492214], [-0.6669229800600651, 0.5278085911769907, 0.5259580113921283], [-0.6636953921393339, 0.3035315017983519, 0.6836498035317884], [0.31817569095244375, -0.44817056008107137, -0.8354085101096073], [0.2326406142491498, -0.24753928264553166, 0.9405331722747018], [-0.3319418441602898, -0.9192339146644295, 0.21171589979539565], [-0.989901155923375, 0.1415575057627732, -0.007561353304026967], [-0.6940970558319106, 0.6760457881341818, -0.2473688934193353], [-0.08911173314110848, 0.9893781402186134, -0.11484770208474272], [0.2735331014272552, 0.7929939249348656, 0.5443714517128755], [0.32114904661040294, -0.6978190818804829, -0.6402435621110993], [0.21606086388133405, 0.07253477182773413, -0.9736818833555189], [0.8306685695380677, -0.4996653571337416, 0.2456099722364527], [-0.7035966501809142, 0.24681134255272794, -0.6663601991727268], [0.4543377579132473, 0.7882960418129363, -0.4149295749840217], [-0.5919086482263421, -0.7718702467816513, 0.23207859506662187], [-0.2249564240346492, 0.21451439366744082, 0.9504620887731574], [-0.8011025199330664, 0.5981993327173948, 0.019806839559972398], [0.09650672442045342, -0.7614513104034255, -0.6409979360548214], [-0.4266304636681133, -0.9044257167599649, -0.0007552043131550039], [0.5235350644098383, -0.8265605597363971, 0.20666077862439322], [-0.9261324157660965, -0.33800494493485767, 0.16742582138618242], [0.9465137815640404, -0.2113845759594981, -0.24377904412759377], [0.12400589991688678, 0.888531738466774, 0.44173961393904376], [-0.12939512081224766, -0.9899593659558957, 0.056897772066969186], [0.4100400904645589, -0.5310449354787828, 0.7415243763452094], [0.6121495060822961, 0.7885835096084429, 0.058386904155225586], [-0.7078016213647221, 0.6476889699819802, 0.281985572249986], [-0.1194170666444374, 0.8959375342669865, 0.4278264822163659], [0.6086077390900811, -0.0016517171884538452, -0.7934695279278147], [-0.308138028628882, -0.5828648450548394, -0.7518773355487612], [-0.9126931985878572, 0.10092396281459982, -0.3959867156626136], [-0.9075848215163033, 0.4135334997082516, 0.07266248256332415], [-0.7874335947163372, -0.2277029010667165, -0.5727998976587794], [0.35617243852259417, -0.7157128445966555, 0.6007464674188543], [0.49712463559744313, -0.3049878550572983, -0.8123112118822796], [0.6355129615942835, -0.7707274245027393, -0.04585316526737344], [-0.823582504518911, 0.26161188229867044, 0.5032604507514024], [-0.4201349780087122, 0.05916594126653794, 0.9055307789620757], [-0.2253379394752148, -0.8181432292461877, 0.5290221824004023], [-0.9830920749470742, -0.18146865560772074, -0.024476503185355214], [-0.8033875419800142, -0.47840137728962945, 0.3545427754146127], [0.5398038974785598, 0.2398736117536441, -0.8068905766280943], [0.18478396225343577, 0.07036047252750102, 0.9802572576623075], [0.404307861510866, 0.11963473301407422, 0.9067649550887824], [0.6778781841518116, -0.4876071985105816, 0.5502003157139269], [-0.8358098645616144, 0.43872985822206406, 0.330057543173828], [-0.14984441916540825, -0.6995632380288731, 0.6986829939561573], [0.0963038700715653, 0.6802852343346977, 0.726593121736935], [-0.33744432759092335, -0.2667688050118576, 0.9027545239151422], [-0.3038737867589575, 0.9408790043663904, -0.14969108478223306], [0.07727695919431263, 0.43760558542338684, 0.8958401772548134], [0.5002309144546911, 0.4114399071385071, 0.7618964726507665], [0.21299187911141404, 0.9597274541901863, 0.18318753534619306], [-0.033254368176864536, 0.981169112540872, 0.190266443685993], [-0.5550674692406724, -0.7413685764233726, -0.3771905864185068], [0.44738173345883014, 0.6394806495135349, -0.6252312240004652], [-0.5132747276097992, 0.35942130959293683, -0.7793364974178899], [-0.908273120300105, -0.36781789712904284, -0.1993738535813558], [-0.9768756076125094, -0.025557939745362766, -0.21227538474270402], [0.41914159368881443, -0.1457417138413139, 0.896147129263157], [0.9819720031081934, 0.051074934296201316, -0.1819954290588663], [-0.6456468813502989, -0.40889643816847426, 0.6449370569720492], [-0.730168261847292, -0.6539132126792329, -0.19812071995232802], [0.9002405973380224, 0.2173386052333339, 0.37726754111599575], [-0.658609660927967, -0.5896536350330548, 0.4674846577425333], [-0.2856532096842435, -0.338834354695996, -0.8964337810875032], [0.45615708893873547, -0.885109791409485, -0.09220285983632291], [0.7541965839668618, 0.6406478050061248, -0.14407603087797236], [0.8073817596027736, -0.02094710596910639, 0.5896574539614063], [0.1221387974181635, 0.9305767959068604, -0.3451216323051431], [0.11181964695244331, -0.9155430576224537, 0.386364175609954], [-0.8860359794901508, -0.23651242737783115, 0.3987506924693364], [-0.021795294178684615, 0.2209727617537001, 0.9750364114814416], [0.14306901425289, 0.5109208299293874, -0.8476385802362776], [-0.020096912554200586, 0.08803980061814769, -0.9959142069540456], [0.4026370219134751, 0.8707978285727904, 0.28212509696508903], [0.4959527301737703, -0.5845756082399554, -0.6421076605087885], [0.1788190994230974, -0.45893101861561447, 0.8702907846426658], [-0.36556095187326415, 0.8407639172119178, -0.39935100598343864], [-0.11794637205580971, 0.643753088529289, -0.7560890253983812], [0.8624215507412237, 0.5060954097355691, 0.009823698982011181], [0.9398678224326774, -0.293004688620821, 0.1754899678097663], [-0.3526844893273538, 0.8468217430548174, 0.3981288566249682], [0.6754400632233013, 0.4675915503976405, 0.5702094904415689], [0.08877249205595145, -0.8062034468725888, 0.5849405498894165], [0.5310150431668822, -0.763080439370121, -0.3684172457705761], [-0.3919840334282161, -0.4962128757093599, 0.7746749637864867], [0.7726359079275378, 0.5087840035682575, 0.379700660381365], [-0.6194288470162496, 0.03579306714779061, -0.7842364183256688], [0.05985044578163838, 0.33165256956803507, -0.9415011934345378], [-0.12824565900342727, 0.5369778154222951, 0.8337912668594438], [-0.5807511705169693, 0.6554449759612124, -0.482824980122586], [-0.49272174249670225, -0.6488509094724098, -0.5798428940220274], [0.8340826825905289, -0.3325409293775602, 0.44013930623303293], [-0.7684859294902381, 0.032294968844228396, 0.6390511803939299], [0.7643670735167464, 0.22568566431123574, -0.603994170375709], [-0.2527759326534968, 0.9566791840084277, 0.14446199069694388], [0.9071773294756266, -0.01596224461574326, -0.4204455965190951], [0.6164717140445807, 0.20797033654468125, 0.7594148832492216], [0.6669229800600647, -0.5278085911769923, -0.5259580113921275], [0.6636953921393342, -0.3035315017983534, -0.6836498035317875], [-0.3181756909524427, 0.448170560081072, 0.8354085101096074], [-0.23264061424914967, 0.24753928264553246, -0.9405331722747016], [0.3319418441602907, 0.919233914664429, -0.21171589979539662], [0.989901155923375, -0.14155750576277343, 0.007561353304025757], [0.694097055831911, -0.676045788134181, 0.2473688934193365], [0.08911173314110969, -0.9893781402186133, 0.1148477020847424], [-0.27353310142725545, -0.7929939249348655, -0.5443714517128756], [-0.3211490466104028, 0.6978190818804832, 0.6402435621110991], [-0.21606086388133558, -0.07253477182773363, 0.9736818833555185], [-0.8306685695380671, 0.4996653571337424, -0.2456099722364526], [0.7035966501809146, -0.24681134255272658, 0.6663601991727272], [-0.45433775791324676, -0.7882960418129371, 0.414929574984021], [0.5919086482263427, 0.7718702467816507, -0.2320785950666222], [0.22495642403464883, -0.21451439366744066, -0.9504620887731575], [0.8011025199330667, -0.5981993327173944, -0.019806839559971607], [-0.09650672442045395, 0.7614513104034264, 0.6409979360548201], [0.4266304636681138, 0.9044257167599646, 0.0007552043131546822], [-0.5235350644098381, 0.8265605597363976, -0.20666077862439178], [0.9261324157660966, 0.3380049449348574, -0.16742582138618228], [-0.9465137815640406, 0.21138457595949808, 0.2437790441275926], [-0.12400589991688762, -0.8885317384667737, -0.44173961393904404], [0.1293951208122493, 0.9899593659558954, -0.05689777206696995], [-0.41004009046456014, 0.5310449354787834, -0.7415243763452083], [-0.6121495060822965, -0.7885835096084427, -0.058386904155225246], [0.7078016213647216, -0.6476889699819816, -0.28198557224998455], [0.1194170666444368, -0.8959375342669857, -0.4278264822163674], [-0.608607739090081, 0.0016517171884530132, 0.7934695279278148], [0.30813802862888084, 0.5828648450548393, 0.7518773355487617], [0.9126931985878572, -0.10092396281459975, 0.39598671566261373], [0.9075848215163032, -0.4135334997082516, -0.07266248256332514], [0.7874335947163371, 0.2277029010667176, 0.5727998976587794], [-0.35617243852259384, 0.7157128445966562, -0.6007464674188535], [-0.49712463559744247, 0.30498785505729914, 0.8123112118822797], [-0.635512961594283, 0.7707274245027396, 0.045853165267375116], [0.8235825045189108, -0.2616118822986709, -0.5032604507514022], [0.42013497800871114, -0.059165941266537896, -0.9055307789620761], [0.22533793947521502, 0.8181432292461873, -0.5290221824004026], [0.9830920749470742, 0.18146865560772032, 0.024476503185355113], [0.803387541980014, 0.4784013772896299, -0.3545427754146124], [-0.5398038974785595, -0.23987361175364486, 0.8068905766280943], [-0.18478396225343693, -0.07036047252750098, -0.9802572576623073], [-0.40430786151086634, -0.1196347330140753, -0.9067649550887821], [-0.6778781841518111, 0.4876071985105826, -0.5502003157139266], [0.8358098645616138, -0.4387298582220654, -0.3300575431738279], [0.14984441916540825, 0.6995632380288727, -0.6986829939561577], [-0.09630387007156574, -0.6802852343346971, -0.7265931217369357], [0.33744432759092347, 0.2667688050118574, -0.9027545239151422], [0.30387378675895843, -0.94087900436639, 0.1496910847822334], [-0.07727695919431204, -0.43760558542338723, -0.8958401772548132], [-0.5002309144546915, -0.41143990713850703, -0.7618964726507663], [-0.21299187911141224, -0.9597274541901867, -0.18318753534619295], [0.03325436817686638, -0.9811691125408718, -0.19026644368599416], [0.5550674692406736, 0.7413685764233714, 0.3771905864185075], [-0.4473817334588305, -0.6394806495135353, 0.6252312240004645], [0.5132747276097999, -0.3594213095929372, 0.7793364974178892], [0.9082731203001051, 0.3678178971290424, 0.1993738535813559], [0.9768756076125096, 0.02555793974536197, 0.21227538474270327], [-0.41914159368881376, 0.145741713841313, -0.8961471292631574], [-0.9819720031081937, -0.051074934296201184, 0.18199542905886554], [0.6456468813502991, 0.40889643816847365, -0.6449370569720493], [0.7301682618472926, 0.6539132126792325, 0.19812071995232772], [-0.9002405973380221, -0.2173386052333345, -0.37726754111599625], [0.6586096609279669, 0.589653635033054, -0.46748465774253417], [0.28565320968424435, 0.3388343546959951, 0.8964337810875033], [-0.4561570889387348, 0.8851097914094853, 0.0922028598363237], [-0.754196583966862, -0.6406478050061246, 0.1440760308779729], [-0.8073817596027738, 0.020947105969107437, -0.589657453961406], [-0.12213879741816341, -0.9305767959068605, 0.34512163230514276], [-0.11181964695244383, 0.9155430576224537, -0.3863641756099539], [0.8860359794901503, 0.2365124273778322, -0.39875069246933675], [0.021795294178683994, -0.22097276175369854, -0.9750364114814419], [-0.14306901425288976, -0.510920829929387, 0.8476385802362778], [0.020096912554199767, -0.08803980061814638, 0.9959142069540458], [-0.40263702191347434, -0.8707978285727911, -0.2821250969650881], [-0.49595273017377034, 0.5845756082399551, 0.6421076605087888], [-0.1788190994230981, 0.45893101861561525, -0.8702907846426652], [0.36556095187326376, -0.8407639172119177, 0.39935100598343914], [0.11794637205580955, -0.6437530885292885, 0.7560890253983816], [-0.8624215507412235, -0.5060954097355697, -0.00982369898201106], [-0.9398678224326774, 0.29300468862082085, -0.17548996780976683], [0.35268448932735325, -0.8468217430548174, -0.3981288566249687], [-0.6754400632233021, -0.46759155039763967, -0.5702094904415687], [-0.08877249205595086, 0.8062034468725892, -0.5849405498894161], [-0.5310150431668829, 0.7630804393701205, 0.3684172457705766], [0.3919840334282165, 0.4962128757093591, -0.774674963786487], [-0.7726359079275372, -0.508784003568258, -0.3797006603813651], [0.6194288470162492, -0.035793067147790125, 0.7842364183256691], [-0.059850445781638735, -0.3316525695680343, 0.941501193434538], [0.1282456590034283, -0.5369778154222943, -0.8337912668594442], [0.5807511705169689, -0.655444975961212, 0.4828249801225871], [0.492721742496701, 0.64885090947241, 0.5798428940220283], [-0.8340826825905289, 0.3325409293775607, -0.44013930623303266], [0.7684859294902381, -0.03229496884422952, -0.6390511803939298], [-0.7643670735167466, -0.2256856643112364, 0.6039941703757086]]}
5
+ RLMATH_EOF
tasks/construct-ae-p32-spherical-design-l5-s0/tests/check.py ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Spherical t-design with N points on S^2 (numerical, tolerance 1e-10 on every harmonic average).
2
+
3
+ Upstream (AlphaEvolve `spherical_t_designs.ipynb`) scored sum_k dim_k/C_k(1) * sum_{i,j} C_k(<x_i,x_j>), whose
4
+ pair sums cancel to ~1e-10 in float64 and can even go negative; its printed acceptance test
5
+ `calculate_design_score(...) < 1e-8` compares the NEGATED error and is therefore always true (bug). Here we
6
+ evaluate the point averages of an orthonormal real spherical-harmonic basis directly (no cancellation).
7
+ """
8
+ import numpy as np
9
+
10
+ from run import Invalid, float_matrix
11
+
12
+ TOL = 1e-10
13
+
14
+
15
+ def harmonics(X, t):
16
+ """Rows: real spherical harmonics Y_lm (1 <= l <= t) normalised so that their mean square on S^2 is 1."""
17
+ ct = np.clip(X[:, 2], -1.0, 1.0)
18
+ st = np.sqrt(np.maximum(0.0, 1.0 - ct * ct))
19
+ ph = np.arctan2(X[:, 1], X[:, 0])
20
+ P = {(0, 0): np.ones_like(ct)}
21
+ for m in range(1, t + 1):
22
+ P[(m, m)] = (np.sqrt(3.0) if m == 1 else np.sqrt((2 * m + 1) / (2 * m))) * st * P[(m - 1, m - 1)]
23
+ for m in range(0, t):
24
+ P[(m + 1, m)] = np.sqrt(2 * m + 3) * ct * P[(m, m)]
25
+ for m in range(0, t + 1):
26
+ for l in range(m + 2, t + 1):
27
+ a = np.sqrt((4 * l * l - 1) / (l * l - m * m))
28
+ b = np.sqrt(((l - 1) ** 2 - m * m) / (4 * (l - 1) ** 2 - 1))
29
+ P[(l, m)] = a * (ct * P[(l - 1, m)] - b * P[(l - 2, m)])
30
+ rows = []
31
+ for l in range(1, t + 1):
32
+ rows.append(P[(l, 0)])
33
+ for m in range(1, l + 1):
34
+ rows.append(P[(l, m)] * np.cos(m * ph))
35
+ rows.append(P[(l, m)] * np.sin(m * ph))
36
+ return np.array(rows)
37
+
38
+
39
+ def check(inst, ans):
40
+ t, n = inst["t"], inst["N"]
41
+ X = np.array(float_matrix(ans.get("points"), n, 3, "points"))
42
+ nr = np.linalg.norm(X, axis=1)
43
+ if nr.min() < 0.5 or nr.max() > 2.0:
44
+ raise Invalid("points must be (approximately) unit vectors")
45
+ X = X / nr[:, None]
46
+ G = X @ X.T
47
+ np.fill_diagonal(G, -1.0)
48
+ if G.max() > 1.0 - 1e-8:
49
+ raise Invalid("two points coincide (or nearly: distance < 1.4e-4)")
50
+ dev = np.abs(harmonics(X, t).mean(axis=1)).max()
51
+ if not dev <= TOL:
52
+ raise Invalid(f"not a {t}-design: some harmonic of degree <= {t} has point average {dev:.3e} > {TOL}")
53
+ return None, {"max_harmonic_average": float(dev)}
tasks/construct-ae-p32-spherical-design-l5-s0/tests/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"t": 19, "N": 198, "family": "ae_p32_spherical_designs", "subset": "construct"}
tasks/construct-ae-p32-spherical-design-l5-s0/tests/run.py ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
2
+
3
+ Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
4
+
5
+ python3 /tests/run.py /tests/instance.json /workdir/answer.json
6
+
7
+ Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
8
+
9
+ check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
10
+ construct : value is ignored; a returned check means the witness is valid -> reward 1.0
11
+ optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
12
+ progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
13
+ clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
14
+ inst must carry "direction", "baseline", "best_known".
15
+ """
16
+ import json
17
+ import math
18
+ import os
19
+ import sys
20
+
21
+ VALID_FLOOR = 0.1
22
+
23
+
24
+ class Invalid(Exception):
25
+ pass
26
+
27
+
28
+ # ------------------------------------------------------------ input helpers
29
+
30
+ def int_list(v, n=None, lo=None, hi=None, name="list"):
31
+ if not isinstance(v, list):
32
+ raise Invalid(f"{name} must be a list")
33
+ if n is not None and len(v) != n:
34
+ raise Invalid(f"{name} must have length {n}, got {len(v)}")
35
+ for x in v:
36
+ if isinstance(x, bool) or not isinstance(x, int):
37
+ raise Invalid(f"{name} must contain integers only")
38
+ if (lo is not None and x < lo) or (hi is not None and x > hi):
39
+ raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
40
+ return v
41
+
42
+
43
+ def as_int(x, name="value", lo=None, hi=None):
44
+ return int_list([x], 1, lo, hi, name)[0]
45
+
46
+
47
+ def num(x, name="value"):
48
+ if isinstance(x, bool) or not isinstance(x, (int, float)):
49
+ raise Invalid(f"{name} must be a number")
50
+ if not math.isfinite(x):
51
+ raise Invalid(f"{name} is not finite")
52
+ return float(x)
53
+
54
+
55
+ def float_matrix(v, rows=None, cols=None, name="matrix"):
56
+ if not isinstance(v, list) or (rows is not None and len(v) != rows):
57
+ raise Invalid(f"{name} must be a list of {rows} rows")
58
+ out = []
59
+ for r in v:
60
+ if not isinstance(r, list) or (cols is not None and len(r) != cols):
61
+ raise Invalid(f"each row of {name} must have {cols} numbers")
62
+ out.append([num(x, name) for x in r])
63
+ return out
64
+
65
+
66
+ def float_list(v, n=None, name="list"):
67
+ if not isinstance(v, list) or (n is not None and len(v) != n):
68
+ raise Invalid(f"{name} must be a list of length {n}")
69
+ return [num(x, name) for x in v]
70
+
71
+
72
+ # ------------------------------------------------------------------ reward
73
+
74
+ def optimize_reward(inst, s):
75
+ b, best = inst["baseline"], inst["best_known"]
76
+ if inst.get("progress_scale") == "log":
77
+ # for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
78
+ # progress is measured in log10(value + floor)
79
+ f = inst.get("log_floor", 1e-3)
80
+ b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
81
+ if inst["direction"] == "maximize":
82
+ p = (s - b) / (best - b)
83
+ else:
84
+ p = (b - s) / (b - best)
85
+ return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
86
+
87
+
88
+ def grade(inst, ans, check):
89
+ try:
90
+ if not isinstance(ans, dict):
91
+ raise Invalid("answer must be a JSON object")
92
+ value, extra = check(inst, ans)
93
+ if inst.get("subset") == "optimize":
94
+ s = float(value)
95
+ if not math.isfinite(s):
96
+ raise Invalid("non-finite score")
97
+ return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
98
+ return 1.0, {"valid": True, **(extra or {})}
99
+ except Invalid as e:
100
+ return 0.0, {"valid": False, "error": str(e)}
101
+ except Exception as e: # any malformed answer
102
+ return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
103
+
104
+
105
+ def main():
106
+ here = os.path.dirname(os.path.abspath(__file__))
107
+ sys.path.insert(0, here)
108
+ # import ourselves as `run` so check.py's `from run import Invalid` is the same class
109
+ import run as R # noqa: E402
110
+ import check as family # noqa: E402
111
+
112
+ inst = json.load(open(sys.argv[1]))
113
+ try:
114
+ ans = json.load(open(sys.argv[2]))
115
+ except Exception as e:
116
+ reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
117
+ else:
118
+ reward, det = R.grade(inst, ans, family.check)
119
+ det["reward"] = reward
120
+ if os.path.isdir("/logs/verifier"):
121
+ with open("/logs/verifier/details.json", "w") as f:
122
+ json.dump(det, f)
123
+ print(reward)
124
+
125
+
126
+ if __name__ == "__main__":
127
+ main()
tasks/construct-ae-p32-spherical-design-l5-s0/tests/test.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ mkdir -p /logs/verifier
3
+ if [ ! -s /workdir/answer.json ]; then
4
+ echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
5
+ echo 0 > /logs/verifier/reward.txt
6
+ exit 0
7
+ fi
8
+ timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
9
+ > /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
tasks/construct-ae-p38-factorial-factors-l2-s0/environment/Dockerfile ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ FROM python:3.11.16-slim
2
+ RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
3
+ && rm -rf /var/lib/apt/lists/*
4
+ RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
5
+ python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
6
+ WORKDIR /workdir
7
+ COPY instance.json /workdir/instance.json
tasks/construct-ae-p38-factorial-factors-l2-s0/environment/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"N": 86, "t": 24, "family": "ae_p38_factorial_factors", "subset": "construct"}
tasks/construct-ae-p38-factorial-factors-l2-s0/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # oracle: a known valid construction (planted witness or published solution)
3
+ cat > /workdir/answer.json <<'RLMATH_EOF'
4
+ {"factors": [288, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 31, 31, 33, 33, 33, 33, 33, 33, 33, 34, 34, 34, 34, 34, 37, 37, 38, 38, 38, 38, 41, 41, 43, 43, 46, 46, 46, 47, 53, 59, 61, 67, 71, 73, 79, 83]}
5
+ RLMATH_EOF
tasks/construct-ae-p38-factorial-factors-l2-s0/tests/check.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Factor N! into N factors, each >= t (AlphaEvolve problem 38 / OEIS A034258). Exact big-integer check."""
2
+ import math
3
+
4
+ from run import Invalid, int_list
5
+
6
+
7
+ def check(inst, ans):
8
+ n, t = inst["N"], inst["t"]
9
+ f = int_list(ans.get("factors"), n, t, None, "factors")
10
+ if math.prod(f) != math.factorial(n):
11
+ raise Invalid(f"the product of the factors is not {n}!")
12
+ return None, {"min_factor": min(f)}
tasks/construct-ae-p38-factorial-factors-l2-s0/tests/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"N": 86, "t": 24, "family": "ae_p38_factorial_factors", "subset": "construct"}
tasks/construct-ae-p38-factorial-factors-l2-s0/tests/run.py ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
2
+
3
+ Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
4
+
5
+ python3 /tests/run.py /tests/instance.json /workdir/answer.json
6
+
7
+ Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
8
+
9
+ check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
10
+ construct : value is ignored; a returned check means the witness is valid -> reward 1.0
11
+ optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
12
+ progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
13
+ clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
14
+ inst must carry "direction", "baseline", "best_known".
15
+ """
16
+ import json
17
+ import math
18
+ import os
19
+ import sys
20
+
21
+ VALID_FLOOR = 0.1
22
+
23
+
24
+ class Invalid(Exception):
25
+ pass
26
+
27
+
28
+ # ------------------------------------------------------------ input helpers
29
+
30
+ def int_list(v, n=None, lo=None, hi=None, name="list"):
31
+ if not isinstance(v, list):
32
+ raise Invalid(f"{name} must be a list")
33
+ if n is not None and len(v) != n:
34
+ raise Invalid(f"{name} must have length {n}, got {len(v)}")
35
+ for x in v:
36
+ if isinstance(x, bool) or not isinstance(x, int):
37
+ raise Invalid(f"{name} must contain integers only")
38
+ if (lo is not None and x < lo) or (hi is not None and x > hi):
39
+ raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
40
+ return v
41
+
42
+
43
+ def as_int(x, name="value", lo=None, hi=None):
44
+ return int_list([x], 1, lo, hi, name)[0]
45
+
46
+
47
+ def num(x, name="value"):
48
+ if isinstance(x, bool) or not isinstance(x, (int, float)):
49
+ raise Invalid(f"{name} must be a number")
50
+ if not math.isfinite(x):
51
+ raise Invalid(f"{name} is not finite")
52
+ return float(x)
53
+
54
+
55
+ def float_matrix(v, rows=None, cols=None, name="matrix"):
56
+ if not isinstance(v, list) or (rows is not None and len(v) != rows):
57
+ raise Invalid(f"{name} must be a list of {rows} rows")
58
+ out = []
59
+ for r in v:
60
+ if not isinstance(r, list) or (cols is not None and len(r) != cols):
61
+ raise Invalid(f"each row of {name} must have {cols} numbers")
62
+ out.append([num(x, name) for x in r])
63
+ return out
64
+
65
+
66
+ def float_list(v, n=None, name="list"):
67
+ if not isinstance(v, list) or (n is not None and len(v) != n):
68
+ raise Invalid(f"{name} must be a list of length {n}")
69
+ return [num(x, name) for x in v]
70
+
71
+
72
+ # ------------------------------------------------------------------ reward
73
+
74
+ def optimize_reward(inst, s):
75
+ b, best = inst["baseline"], inst["best_known"]
76
+ if inst.get("progress_scale") == "log":
77
+ # for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
78
+ # progress is measured in log10(value + floor)
79
+ f = inst.get("log_floor", 1e-3)
80
+ b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
81
+ if inst["direction"] == "maximize":
82
+ p = (s - b) / (best - b)
83
+ else:
84
+ p = (b - s) / (b - best)
85
+ return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
86
+
87
+
88
+ def grade(inst, ans, check):
89
+ try:
90
+ if not isinstance(ans, dict):
91
+ raise Invalid("answer must be a JSON object")
92
+ value, extra = check(inst, ans)
93
+ if inst.get("subset") == "optimize":
94
+ s = float(value)
95
+ if not math.isfinite(s):
96
+ raise Invalid("non-finite score")
97
+ return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
98
+ return 1.0, {"valid": True, **(extra or {})}
99
+ except Invalid as e:
100
+ return 0.0, {"valid": False, "error": str(e)}
101
+ except Exception as e: # any malformed answer
102
+ return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
103
+
104
+
105
+ def main():
106
+ here = os.path.dirname(os.path.abspath(__file__))
107
+ sys.path.insert(0, here)
108
+ # import ourselves as `run` so check.py's `from run import Invalid` is the same class
109
+ import run as R # noqa: E402
110
+ import check as family # noqa: E402
111
+
112
+ inst = json.load(open(sys.argv[1]))
113
+ try:
114
+ ans = json.load(open(sys.argv[2]))
115
+ except Exception as e:
116
+ reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
117
+ else:
118
+ reward, det = R.grade(inst, ans, family.check)
119
+ det["reward"] = reward
120
+ if os.path.isdir("/logs/verifier"):
121
+ with open("/logs/verifier/details.json", "w") as f:
122
+ json.dump(det, f)
123
+ print(reward)
124
+
125
+
126
+ if __name__ == "__main__":
127
+ main()
tasks/construct-ae-p38-factorial-factors-l2-s0/tests/test.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ mkdir -p /logs/verifier
3
+ if [ ! -s /workdir/answer.json ]; then
4
+ echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
5
+ echo 0 > /logs/verifier/reward.txt
6
+ exit 0
7
+ fi
8
+ timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
9
+ > /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
tasks/construct-ae-p38-factorial-factors-l2-s7/environment/Dockerfile ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ FROM python:3.11.16-slim
2
+ RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
3
+ && rm -rf /var/lib/apt/lists/*
4
+ RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
5
+ python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
6
+ WORKDIR /workdir
7
+ COPY instance.json /workdir/instance.json
tasks/construct-ae-p38-factorial-factors-l2-s7/environment/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"N": 134, "t": 39, "family": "ae_p38_factorial_factors", "subset": "construct"}
tasks/construct-ae-p38-factorial-factors-l2-s7/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # oracle: a known valid construction (planted witness or published solution)
3
+ cat > /workdir/answer.json <<'RLMATH_EOF'
4
+ {"factors": [585, 39, 39, 39, 39, 39, 39, 39, 39, 39, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 41, 41, 41, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 43, 43, 43, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, 47, 47, 51, 51, 51, 51, 51, 51, 51, 53, 53, 56, 57, 57, 57, 57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 61, 61, 62, 62, 62, 62, 67, 67, 71, 73, 74, 74, 74, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131]}
5
+ RLMATH_EOF
tasks/construct-ae-p38-factorial-factors-l2-s7/tests/check.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Factor N! into N factors, each >= t (AlphaEvolve problem 38 / OEIS A034258). Exact big-integer check."""
2
+ import math
3
+
4
+ from run import Invalid, int_list
5
+
6
+
7
+ def check(inst, ans):
8
+ n, t = inst["N"], inst["t"]
9
+ f = int_list(ans.get("factors"), n, t, None, "factors")
10
+ if math.prod(f) != math.factorial(n):
11
+ raise Invalid(f"the product of the factors is not {n}!")
12
+ return None, {"min_factor": min(f)}
tasks/construct-ae-p38-factorial-factors-l2-s7/tests/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"N": 134, "t": 39, "family": "ae_p38_factorial_factors", "subset": "construct"}
tasks/construct-ae-p38-factorial-factors-l2-s7/tests/run.py ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
2
+
3
+ Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
4
+
5
+ python3 /tests/run.py /tests/instance.json /workdir/answer.json
6
+
7
+ Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
8
+
9
+ check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
10
+ construct : value is ignored; a returned check means the witness is valid -> reward 1.0
11
+ optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
12
+ progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
13
+ clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
14
+ inst must carry "direction", "baseline", "best_known".
15
+ """
16
+ import json
17
+ import math
18
+ import os
19
+ import sys
20
+
21
+ VALID_FLOOR = 0.1
22
+
23
+
24
+ class Invalid(Exception):
25
+ pass
26
+
27
+
28
+ # ------------------------------------------------------------ input helpers
29
+
30
+ def int_list(v, n=None, lo=None, hi=None, name="list"):
31
+ if not isinstance(v, list):
32
+ raise Invalid(f"{name} must be a list")
33
+ if n is not None and len(v) != n:
34
+ raise Invalid(f"{name} must have length {n}, got {len(v)}")
35
+ for x in v:
36
+ if isinstance(x, bool) or not isinstance(x, int):
37
+ raise Invalid(f"{name} must contain integers only")
38
+ if (lo is not None and x < lo) or (hi is not None and x > hi):
39
+ raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
40
+ return v
41
+
42
+
43
+ def as_int(x, name="value", lo=None, hi=None):
44
+ return int_list([x], 1, lo, hi, name)[0]
45
+
46
+
47
+ def num(x, name="value"):
48
+ if isinstance(x, bool) or not isinstance(x, (int, float)):
49
+ raise Invalid(f"{name} must be a number")
50
+ if not math.isfinite(x):
51
+ raise Invalid(f"{name} is not finite")
52
+ return float(x)
53
+
54
+
55
+ def float_matrix(v, rows=None, cols=None, name="matrix"):
56
+ if not isinstance(v, list) or (rows is not None and len(v) != rows):
57
+ raise Invalid(f"{name} must be a list of {rows} rows")
58
+ out = []
59
+ for r in v:
60
+ if not isinstance(r, list) or (cols is not None and len(r) != cols):
61
+ raise Invalid(f"each row of {name} must have {cols} numbers")
62
+ out.append([num(x, name) for x in r])
63
+ return out
64
+
65
+
66
+ def float_list(v, n=None, name="list"):
67
+ if not isinstance(v, list) or (n is not None and len(v) != n):
68
+ raise Invalid(f"{name} must be a list of length {n}")
69
+ return [num(x, name) for x in v]
70
+
71
+
72
+ # ------------------------------------------------------------------ reward
73
+
74
+ def optimize_reward(inst, s):
75
+ b, best = inst["baseline"], inst["best_known"]
76
+ if inst.get("progress_scale") == "log":
77
+ # for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
78
+ # progress is measured in log10(value + floor)
79
+ f = inst.get("log_floor", 1e-3)
80
+ b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
81
+ if inst["direction"] == "maximize":
82
+ p = (s - b) / (best - b)
83
+ else:
84
+ p = (b - s) / (b - best)
85
+ return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
86
+
87
+
88
+ def grade(inst, ans, check):
89
+ try:
90
+ if not isinstance(ans, dict):
91
+ raise Invalid("answer must be a JSON object")
92
+ value, extra = check(inst, ans)
93
+ if inst.get("subset") == "optimize":
94
+ s = float(value)
95
+ if not math.isfinite(s):
96
+ raise Invalid("non-finite score")
97
+ return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
98
+ return 1.0, {"valid": True, **(extra or {})}
99
+ except Invalid as e:
100
+ return 0.0, {"valid": False, "error": str(e)}
101
+ except Exception as e: # any malformed answer
102
+ return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
103
+
104
+
105
+ def main():
106
+ here = os.path.dirname(os.path.abspath(__file__))
107
+ sys.path.insert(0, here)
108
+ # import ourselves as `run` so check.py's `from run import Invalid` is the same class
109
+ import run as R # noqa: E402
110
+ import check as family # noqa: E402
111
+
112
+ inst = json.load(open(sys.argv[1]))
113
+ try:
114
+ ans = json.load(open(sys.argv[2]))
115
+ except Exception as e:
116
+ reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
117
+ else:
118
+ reward, det = R.grade(inst, ans, family.check)
119
+ det["reward"] = reward
120
+ if os.path.isdir("/logs/verifier"):
121
+ with open("/logs/verifier/details.json", "w") as f:
122
+ json.dump(det, f)
123
+ print(reward)
124
+
125
+
126
+ if __name__ == "__main__":
127
+ main()
tasks/construct-ae-p38-factorial-factors-l2-s7/tests/test.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ mkdir -p /logs/verifier
3
+ if [ ! -s /workdir/answer.json ]; then
4
+ echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
5
+ echo 0 > /logs/verifier/reward.txt
6
+ exit 0
7
+ fi
8
+ timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
9
+ > /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
tasks/construct-ae-p38-factorial-factors-l2-s9/environment/Dockerfile ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ FROM python:3.11.16-slim
2
+ RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
3
+ && rm -rf /var/lib/apt/lists/*
4
+ RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
5
+ python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
6
+ WORKDIR /workdir
7
+ COPY instance.json /workdir/instance.json
tasks/construct-ae-p38-factorial-factors-l2-s9/environment/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"N": 152, "t": 44, "family": "ae_p38_factorial_factors", "subset": "construct"}
tasks/construct-ae-p38-factorial-factors-l2-s9/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # oracle: a known valid construction (planted witness or published solution)
3
+ cat > /workdir/answer.json <<'RLMATH_EOF'
4
+ {"factors": [704, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 46, 46, 46, 46, 46, 46, 47, 47, 47, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 49, 50, 50, 50, 50, 50, 50, 50, 50, 51, 51, 51, 51, 51, 51, 51, 51, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 53, 53, 57, 57, 57, 57, 57, 57, 57, 57, 58, 58, 58, 58, 58, 59, 59, 61, 61, 62, 62, 62, 62, 64, 67, 67, 71, 71, 73, 73, 74, 74, 74, 74, 79, 82, 82, 82, 83, 86, 86, 86, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151]}
5
+ RLMATH_EOF
tasks/construct-ae-p38-factorial-factors-l2-s9/tests/check.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Factor N! into N factors, each >= t (AlphaEvolve problem 38 / OEIS A034258). Exact big-integer check."""
2
+ import math
3
+
4
+ from run import Invalid, int_list
5
+
6
+
7
+ def check(inst, ans):
8
+ n, t = inst["N"], inst["t"]
9
+ f = int_list(ans.get("factors"), n, t, None, "factors")
10
+ if math.prod(f) != math.factorial(n):
11
+ raise Invalid(f"the product of the factors is not {n}!")
12
+ return None, {"min_factor": min(f)}
tasks/construct-ae-p38-factorial-factors-l2-s9/tests/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"N": 152, "t": 44, "family": "ae_p38_factorial_factors", "subset": "construct"}
tasks/construct-ae-p38-factorial-factors-l2-s9/tests/run.py ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
2
+
3
+ Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
4
+
5
+ python3 /tests/run.py /tests/instance.json /workdir/answer.json
6
+
7
+ Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
8
+
9
+ check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
10
+ construct : value is ignored; a returned check means the witness is valid -> reward 1.0
11
+ optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
12
+ progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
13
+ clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
14
+ inst must carry "direction", "baseline", "best_known".
15
+ """
16
+ import json
17
+ import math
18
+ import os
19
+ import sys
20
+
21
+ VALID_FLOOR = 0.1
22
+
23
+
24
+ class Invalid(Exception):
25
+ pass
26
+
27
+
28
+ # ------------------------------------------------------------ input helpers
29
+
30
+ def int_list(v, n=None, lo=None, hi=None, name="list"):
31
+ if not isinstance(v, list):
32
+ raise Invalid(f"{name} must be a list")
33
+ if n is not None and len(v) != n:
34
+ raise Invalid(f"{name} must have length {n}, got {len(v)}")
35
+ for x in v:
36
+ if isinstance(x, bool) or not isinstance(x, int):
37
+ raise Invalid(f"{name} must contain integers only")
38
+ if (lo is not None and x < lo) or (hi is not None and x > hi):
39
+ raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
40
+ return v
41
+
42
+
43
+ def as_int(x, name="value", lo=None, hi=None):
44
+ return int_list([x], 1, lo, hi, name)[0]
45
+
46
+
47
+ def num(x, name="value"):
48
+ if isinstance(x, bool) or not isinstance(x, (int, float)):
49
+ raise Invalid(f"{name} must be a number")
50
+ if not math.isfinite(x):
51
+ raise Invalid(f"{name} is not finite")
52
+ return float(x)
53
+
54
+
55
+ def float_matrix(v, rows=None, cols=None, name="matrix"):
56
+ if not isinstance(v, list) or (rows is not None and len(v) != rows):
57
+ raise Invalid(f"{name} must be a list of {rows} rows")
58
+ out = []
59
+ for r in v:
60
+ if not isinstance(r, list) or (cols is not None and len(r) != cols):
61
+ raise Invalid(f"each row of {name} must have {cols} numbers")
62
+ out.append([num(x, name) for x in r])
63
+ return out
64
+
65
+
66
+ def float_list(v, n=None, name="list"):
67
+ if not isinstance(v, list) or (n is not None and len(v) != n):
68
+ raise Invalid(f"{name} must be a list of length {n}")
69
+ return [num(x, name) for x in v]
70
+
71
+
72
+ # ------------------------------------------------------------------ reward
73
+
74
+ def optimize_reward(inst, s):
75
+ b, best = inst["baseline"], inst["best_known"]
76
+ if inst.get("progress_scale") == "log":
77
+ # for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
78
+ # progress is measured in log10(value + floor)
79
+ f = inst.get("log_floor", 1e-3)
80
+ b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
81
+ if inst["direction"] == "maximize":
82
+ p = (s - b) / (best - b)
83
+ else:
84
+ p = (b - s) / (b - best)
85
+ return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
86
+
87
+
88
+ def grade(inst, ans, check):
89
+ try:
90
+ if not isinstance(ans, dict):
91
+ raise Invalid("answer must be a JSON object")
92
+ value, extra = check(inst, ans)
93
+ if inst.get("subset") == "optimize":
94
+ s = float(value)
95
+ if not math.isfinite(s):
96
+ raise Invalid("non-finite score")
97
+ return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
98
+ return 1.0, {"valid": True, **(extra or {})}
99
+ except Invalid as e:
100
+ return 0.0, {"valid": False, "error": str(e)}
101
+ except Exception as e: # any malformed answer
102
+ return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
103
+
104
+
105
+ def main():
106
+ here = os.path.dirname(os.path.abspath(__file__))
107
+ sys.path.insert(0, here)
108
+ # import ourselves as `run` so check.py's `from run import Invalid` is the same class
109
+ import run as R # noqa: E402
110
+ import check as family # noqa: E402
111
+
112
+ inst = json.load(open(sys.argv[1]))
113
+ try:
114
+ ans = json.load(open(sys.argv[2]))
115
+ except Exception as e:
116
+ reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
117
+ else:
118
+ reward, det = R.grade(inst, ans, family.check)
119
+ det["reward"] = reward
120
+ if os.path.isdir("/logs/verifier"):
121
+ with open("/logs/verifier/details.json", "w") as f:
122
+ json.dump(det, f)
123
+ print(reward)
124
+
125
+
126
+ if __name__ == "__main__":
127
+ main()
tasks/construct-ae-p38-factorial-factors-l2-s9/tests/test.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ mkdir -p /logs/verifier
3
+ if [ ! -s /workdir/answer.json ]; then
4
+ echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
5
+ echo 0 > /logs/verifier/reward.txt
6
+ exit 0
7
+ fi
8
+ timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
9
+ > /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
tasks/construct-ae-p38-factorial-factors-l6-s1/environment/Dockerfile ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ FROM python:3.11.16-slim
2
+ RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
3
+ && rm -rf /var/lib/apt/lists/*
4
+ RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
5
+ python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
6
+ WORKDIR /workdir
7
+ COPY instance.json /workdir/instance.json
tasks/construct-ae-p38-factorial-factors-l6-s1/environment/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"N": 5728, "t": 1856, "family": "ae_p38_factorial_factors", "subset": "construct"}
tasks/construct-ae-p38-factorial-factors-l6-s1/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # oracle: a known valid construction (planted witness or published solution)
3
+ cat > /workdir/answer.json <<'RLMATH_EOF'
4
+ {"factors": [1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1856, 1857, 1857, 1857, 1857, 1857, 1857, 1857, 1857, 1857, 1858, 1858, 1858, 1858, 1858, 1858, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1859, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1860, 1861, 1861, 1861, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1862, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1863, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1864, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1865, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1866, 1867, 1867, 1867, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1868, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1869, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1870, 1871, 1871, 1871, 1873, 1873, 1873, 1874, 1874, 1874, 1874, 1874, 1874, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1875, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1876, 1877, 1877, 1877, 1878, 1878, 1878, 1878, 1878, 1878, 1878, 1878, 1878, 1878, 1878, 1878, 1878, 1878, 1878, 1878, 1878, 1878, 1879, 1879, 1879, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1880, 1882, 1882, 1882, 1882, 1882, 1882, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1883, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1884, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1886, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1887, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1888, 1889, 1889, 1889, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1890, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1891, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1892, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1893, 1894, 1894, 1894, 1894, 1894, 1894, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1895, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1896, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1897, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1898, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1899, 1901, 1901, 1901, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1902, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1903, 1904, 1904, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1905, 1906, 1906, 1906, 1906, 1906, 1906, 1907, 1907, 1907, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1908, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1909, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1910, 1911, 1911, 1911, 1911, 1911, 1911, 1911, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1912, 1913, 1913, 1915, 1915, 1915, 1915, 1915, 1915, 1915, 1915, 1915, 1915, 1915, 1915, 1915, 1915, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1916, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1917, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1918, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1919, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1921, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1923, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1925, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1926, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1927, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1928, 1929, 1929, 1929, 1929, 1929, 1929, 1929, 1929, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1930, 1931, 1931, 1933, 1933, 1934, 1934, 1934, 1934, 1934, 1935, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1937, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1939, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1940, 1941, 1941, 1941, 1941, 1941, 1941, 1941, 1941, 1942, 1942, 1942, 1942, 1942, 1944, 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1945, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1946, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1948, 1949, 1949, 1951, 1951, 1954, 1954, 1954, 1954, 1954, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1956, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1957, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1959, 1961, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1962, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1963, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1964, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1965, 1966, 1966, 1966, 1966, 1966, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1967, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1969, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1970, 1973, 1973, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1977, 1979, 1979, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1981, 1982, 1982, 1982, 1982, 1982, 1983, 1983, 1983, 1983, 1983, 1983, 1983, 1983, 1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985, 1985, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1986, 1987, 1987, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1990, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1991, 1993, 1993, 1994, 1994, 1994, 1994, 1994, 1996, 1996, 1996, 1996, 1996, 1996, 1996, 1996, 1996, 1996, 1996, 1997, 1997, 1999, 1999, 2003, 2003, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2004, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2005, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2007, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2008, 2011, 2011, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2012, 2017, 2017, 2018, 2018, 2018, 2018, 2018, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2019, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2022, 2023, 2026, 2026, 2026, 2026, 2026, 2027, 2027, 2029, 2029, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2031, 2036, 2036, 2036, 2036, 2036, 2036, 2036, 2036, 2036, 2036, 2036, 2038, 2038, 2038, 2038, 2038, 2039, 2039, 2042, 2042, 2042, 2042, 2042, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2043, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2045, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2049, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2051, 2053, 2053, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2056, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2061, 2062, 2062, 2062, 2062, 2062, 2063, 2063, 2066, 2066, 2066, 2066, 2066, 2069, 2069, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2073, 2078, 2078, 2078, 2078, 2078, 2081, 2081, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2082, 2083, 2083, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2084, 2087, 2087, 2089, 2089, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2092, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2094, 2095, 2095, 2095, 2095, 2095, 2095, 2095, 2095, 2095, 2095, 2095, 2095, 2095, 2098, 2098, 2098, 2098, 2098, 2099, 2099, 2102, 2102, 2102, 2102, 2102, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2103, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2104, 2105, 2105, 2105, 2105, 2105, 2105, 2105, 2105, 2105, 2105, 2105, 2105, 2105, 2111, 2111, 2113, 2113, 2115, 2118, 2118, 2118, 2118, 2118, 2118, 2118, 2118, 2118, 2118, 2118, 2118, 2118, 2118, 2118, 2118, 2122, 2122, 2122, 2122, 2122, 2126, 2126, 2126, 2126, 2126, 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2127, 2129, 2129, 2131, 2131, 2137, 2137, 2138, 2138, 2138, 2138, 2138, 2141, 2141, 2143, 2143, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2149, 2153, 2153, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2154, 2155, 2155, 2155, 2155, 2155, 2155, 2155, 2155, 2155, 2155, 2155, 2155, 2155, 2157, 2157, 2157, 2157, 2157, 2157, 2157, 2161, 2161, 2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164, 2164, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2165, 2174, 2174, 2174, 2174, 2174, 2179, 2179, 2181, 2181, 2181, 2181, 2181, 2181, 2181, 2182, 2182, 2182, 2182, 2182, 2186, 2186, 2186, 2186, 2186, 2188, 2188, 2188, 2188, 2188, 2188, 2188, 2188, 2188, 2188, 2194, 2194, 2194, 2194, 2194, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2195, 2199, 2199, 2199, 2199, 2199, 2199, 2199, 2202, 2202, 2202, 2202, 2202, 2202, 2202, 2202, 2202, 2202, 2202, 2202, 2202, 2202, 2202, 2203, 2203, 2206, 2206, 2206, 2206, 2206, 2207, 2207, 2213, 2213, 2215, 2215, 2215, 2215, 2215, 2215, 2215, 2215, 2215, 2215, 2215, 2215, 2217, 2217, 2217, 2217, 2217, 2217, 2217, 2218, 2218, 2218, 2218, 2218, 2221, 2221, 2228, 2228, 2228, 2228, 2228, 2228, 2228, 2228, 2228, 2228, 2229, 2229, 2229, 2229, 2229, 2229, 2229, 2234, 2234, 2234, 2234, 2234, 2237, 2237, 2239, 2239, 2243, 2243, 2245, 2245, 2245, 2245, 2245, 2245, 2245, 2245, 2245, 2245, 2245, 2245, 2246, 2246, 2246, 2246, 2246, 2251, 2251, 2252, 2252, 2252, 2252, 2252, 2252, 2252, 2252, 2252, 2252, 2253, 2253, 2253, 2253, 2253, 2253, 2253, 2258, 2258, 2258, 2258, 2258, 2267, 2267, 2269, 2269, 2271, 2271, 2271, 2271, 2271, 2271, 2271, 2273, 2273, 2276, 2276, 2276, 2276, 2276, 2276, 2276, 2276, 2276, 2276, 2281, 2281, 2283, 2283, 2283, 2283, 2283, 2283, 2283, 2284, 2284, 2284, 2284, 2284, 2284, 2284, 2284, 2284, 2284, 2285, 2285, 2285, 2285, 2285, 2285, 2285, 2285, 2285, 2285, 2285, 2285, 2286, 2287, 2287, 2293, 2293, 2297, 2297, 2302, 2302, 2302, 2302, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2305, 2306, 2306, 2306, 2306, 2307, 2307, 2307, 2307, 2307, 2307, 2307, 2308, 2308, 2308, 2308, 2308, 2308, 2308, 2308, 2308, 2309, 2309, 2311, 2311, 2315, 2315, 2315, 2315, 2315, 2315, 2315, 2315, 2315, 2315, 2315, 2315, 2319, 2319, 2319, 2319, 2319, 2319, 2319, 2326, 2326, 2326, 2326, 2333, 2333, 2339, 2339, 2341, 2341, 2342, 2342, 2342, 2342, 2347, 2347, 2348, 2348, 2348, 2348, 2348, 2348, 2348, 2348, 2348, 2351, 2351, 2357, 2357, 2361, 2361, 2361, 2361, 2361, 2361, 2361, 2362, 2362, 2362, 2362, 2371, 2371, 2372, 2372, 2372, 2372, 2372, 2372, 2372, 2372, 2372, 2374, 2374, 2374, 2374, 2377, 2377, 2381, 2381, 2383, 2383, 2386, 2386, 2386, 2386, 2389, 2389, 2391, 2391, 2391, 2391, 2391, 2391, 2391, 2393, 2393, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2396, 2399, 2399, 2402, 2402, 2402, 2402, 2404, 2404, 2404, 2404, 2404, 2404, 2404, 2404, 2404, 2411, 2411, 2417, 2417, 2423, 2423, 2426, 2426, 2426, 2426, 2427, 2427, 2427, 2427, 2427, 2427, 2427, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2428, 2433, 2433, 2433, 2433, 2433, 2433, 2433, 2434, 2434, 2434, 2434, 2437, 2437, 2441, 2441, 2446, 2446, 2446, 2446, 2447, 2447, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2452, 2458, 2458, 2458, 2458, 2459, 2459, 2462, 2462, 2462, 2462, 2463, 2463, 2463, 2463, 2463, 2463, 2467, 2467, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2468, 2469, 2469, 2469, 2469, 2469, 2469, 2473, 2473, 2474, 2474, 2474, 2474, 2477, 2477, 2481, 2481, 2481, 2481, 2481, 2481, 2487, 2487, 2487, 2487, 2487, 2487, 2498, 2498, 2498, 2498, 2503, 2503, 2517, 2517, 2517, 2517, 2517, 2517, 2518, 2518, 2518, 2518, 2521, 2521, 2531, 2531, 2539, 2539, 2543, 2543, 2549, 2549, 2551, 2551, 2554, 2554, 2554, 2554, 2557, 2557, 2558, 2558, 2558, 2558, 2559, 2559, 2559, 2559, 2559, 2559, 2566, 2566, 2566, 2566, 2571, 2571, 2571, 2571, 2571, 2571, 2577, 2577, 2577, 2577, 2577, 2577, 2578, 2578, 2578, 2578, 2579, 2579, 2582, 2582, 2582, 2582, 2589, 2589, 2589, 2589, 2589, 2589, 2591, 2591, 2593, 2593, 2594, 2594, 2594, 2594, 2602, 2602, 2602, 2602, 2606, 2606, 2606, 2606, 2609, 2609, 2614, 2614, 2614, 2614, 2617, 2617, 2621, 2621, 2631, 2631, 2631, 2631, 2631, 2631, 2633, 2633, 2638, 2638, 2638, 2638, 2642, 2642, 2642, 2642, 2643, 2643, 2643, 2643, 2643, 2643, 2647, 2647, 2649, 2649, 2649, 2649, 2649, 2649, 2654, 2654, 2654, 2654, 2657, 2657, 2659, 2659, 2661, 2661, 2661, 2661, 2661, 2661, 2663, 2663, 2671, 2671, 2677, 2677, 2683, 2683, 2687, 2687, 2689, 2689, 2693, 2693, 2699, 2699, 2707, 2707, 2711, 2711, 2713, 2713, 2719, 2719, 2721, 2721, 2721, 2721, 2721, 2721, 2722, 2722, 2722, 2722, 2729, 2729, 2731, 2731, 2733, 2733, 2733, 2733, 2733, 2733, 2734, 2734, 2734, 2734, 2741, 2741, 2746, 2746, 2746, 2746, 2749, 2749, 2753, 2753, 2757, 2757, 2757, 2757, 2757, 2757, 2762, 2762, 2762, 2762, 2767, 2767, 2777, 2777, 2789, 2789, 2791, 2791, 2797, 2797, 2798, 2798, 2798, 2798, 2801, 2801, 2803, 2803, 2818, 2818, 2818, 2818, 2819, 2819, 2833, 2833, 2837, 2837, 2843, 2843, 2846, 2846, 2846, 2846, 2851, 2851, 2854, 2854, 2854, 2854, 2857, 2857, 2858, 2858, 2858, 2858, 2861, 2861, 2866, 2866, 2866, 2878, 2878, 2878, 2879, 2887, 2894, 2894, 2894, 2897, 2902, 2902, 2902, 2903, 2906, 2906, 2906, 2909, 2917, 2918, 2918, 2918, 2927, 2939, 2942, 2942, 2942, 2953, 2957, 2962, 2962, 2962, 2963, 2966, 2966, 2966, 2969, 2971, 2974, 2974, 2974, 2978, 2978, 2978, 2986, 2986, 2986, 2998, 2998, 2998, 2999, 3001, 3011, 3019, 3022, 3022, 3022, 3023, 3037, 3041, 3046, 3046, 3046, 3049, 3061, 3062, 3062, 3062, 3067, 3079, 3083, 3086, 3086, 3086, 3089, 3098, 3098, 3098, 3106, 3106, 3106, 3109, 3118, 3118, 3118, 3119, 3121, 3134, 3134, 3134, 3137, 3142, 3142, 3142, 3158, 3158, 3158, 3163, 3166, 3166, 3166, 3167, 3169, 3181, 3187, 3191, 3194, 3194, 3194, 3202, 3202, 3202, 3203, 3209, 3214, 3214, 3214, 3217, 3218, 3218, 3218, 3221, 3226, 3226, 3226, 3229, 3238, 3238, 3238, 3242, 3242, 3242, 3251, 3253, 3254, 3254, 3254, 3257, 3259, 3271, 3274, 3274, 3274, 3299, 3301, 3307, 3313, 3314, 3314, 3314, 3319, 3323, 3326, 3326, 3326, 3329, 3331, 3334, 3334, 3334, 3338, 3338, 3338, 3343, 3347, 3359, 3361, 3371, 3373, 3386, 3386, 3386, 3389, 3391, 3394, 3394, 3394, 3398, 3398, 3398, 3407, 3413, 3418, 3418, 3418, 3433, 3442, 3442, 3442, 3446, 3446, 3446, 3449, 3457, 3461, 3463, 3466, 3466, 3466, 3467, 3469, 3482, 3482, 3482, 3491, 3494, 3494, 3494, 3499, 3506, 3506, 3506, 3511, 3517, 3518, 3518, 3518, 3527, 3529, 3533, 3539, 3541, 3547, 3554, 3554, 3554, 3557, 3559, 3566, 3566, 3566, 3571, 3574, 3574, 3574, 3578, 3578, 3578, 3581, 3583, 3593, 3602, 3602, 3602, 3607, 3613, 3617, 3622, 3622, 3622, 3623, 3631, 3637, 3643, 3646, 3646, 3646, 3659, 3662, 3662, 3662, 3671, 3673, 3677, 3691, 3694, 3694, 3694, 3697, 3701, 3709, 3719, 3727, 3733, 3739, 3761, 3767, 3769, 3779, 3793, 3797, 3803, 3821, 3823, 3833, 3847, 3851, 3853, 3863, 3877, 3881, 3889, 3907, 3911, 3917, 3919, 3923, 3929, 3931, 3943, 3947, 3967, 3989, 4001, 4003, 4007, 4013, 4019, 4021, 4027, 4049, 4051, 4057, 4073, 4079, 4091, 4093, 4099, 4111, 4127, 4129, 4133, 4139, 4153, 4157, 4159, 4177, 4201, 4211, 4217, 4219, 4229, 4231, 4241, 4243, 4253, 4259, 4261, 4271, 4273, 4283, 4289, 4297, 4327, 4337, 4339, 4349, 4357, 4363, 4373, 4391, 4397, 4409, 4421, 4423, 4441, 4447, 4451, 4457, 4463, 4481, 4483, 4493, 4507, 4513, 4517, 4519, 4523, 4547, 4549, 4561, 4567, 4583, 4591, 4597, 4603, 4621, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4673, 4679, 4691, 4703, 4721, 4723, 4729, 4733, 4751, 4759, 4783, 4787, 4789, 4793, 4799, 4801, 4813, 4817, 4831, 4861, 4871, 4877, 4889, 4903, 4909, 4919, 4931, 4933, 4937, 4943, 4951, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5009, 5011, 5021, 5023, 5039, 5051, 5059, 5077, 5081, 5087, 5099, 5101, 5107, 5113, 5119, 5147, 5153, 5167, 5171, 5179, 5189, 5197, 5209, 5227, 5231, 5233, 5237, 5261, 5273, 5279, 5281, 5297, 5303, 5309, 5323, 5333, 5347, 5351, 5381, 5387, 5393, 5399, 5407, 5413, 5417, 5419, 5431, 5437, 5441, 5443, 5449, 5471, 5477, 5479, 5483, 5501, 5503, 5507, 5519, 5521, 5527, 5531, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717]}
5
+ RLMATH_EOF
tasks/construct-ae-p38-factorial-factors-l6-s1/tests/check.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Factor N! into N factors, each >= t (AlphaEvolve problem 38 / OEIS A034258). Exact big-integer check."""
2
+ import math
3
+
4
+ from run import Invalid, int_list
5
+
6
+
7
+ def check(inst, ans):
8
+ n, t = inst["N"], inst["t"]
9
+ f = int_list(ans.get("factors"), n, t, None, "factors")
10
+ if math.prod(f) != math.factorial(n):
11
+ raise Invalid(f"the product of the factors is not {n}!")
12
+ return None, {"min_factor": min(f)}
tasks/construct-ae-p38-factorial-factors-l6-s1/tests/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"N": 5728, "t": 1856, "family": "ae_p38_factorial_factors", "subset": "construct"}
tasks/construct-ae-p38-factorial-factors-l6-s1/tests/run.py ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
2
+
3
+ Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
4
+
5
+ python3 /tests/run.py /tests/instance.json /workdir/answer.json
6
+
7
+ Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
8
+
9
+ check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
10
+ construct : value is ignored; a returned check means the witness is valid -> reward 1.0
11
+ optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
12
+ progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
13
+ clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
14
+ inst must carry "direction", "baseline", "best_known".
15
+ """
16
+ import json
17
+ import math
18
+ import os
19
+ import sys
20
+
21
+ VALID_FLOOR = 0.1
22
+
23
+
24
+ class Invalid(Exception):
25
+ pass
26
+
27
+
28
+ # ------------------------------------------------------------ input helpers
29
+
30
+ def int_list(v, n=None, lo=None, hi=None, name="list"):
31
+ if not isinstance(v, list):
32
+ raise Invalid(f"{name} must be a list")
33
+ if n is not None and len(v) != n:
34
+ raise Invalid(f"{name} must have length {n}, got {len(v)}")
35
+ for x in v:
36
+ if isinstance(x, bool) or not isinstance(x, int):
37
+ raise Invalid(f"{name} must contain integers only")
38
+ if (lo is not None and x < lo) or (hi is not None and x > hi):
39
+ raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
40
+ return v
41
+
42
+
43
+ def as_int(x, name="value", lo=None, hi=None):
44
+ return int_list([x], 1, lo, hi, name)[0]
45
+
46
+
47
+ def num(x, name="value"):
48
+ if isinstance(x, bool) or not isinstance(x, (int, float)):
49
+ raise Invalid(f"{name} must be a number")
50
+ if not math.isfinite(x):
51
+ raise Invalid(f"{name} is not finite")
52
+ return float(x)
53
+
54
+
55
+ def float_matrix(v, rows=None, cols=None, name="matrix"):
56
+ if not isinstance(v, list) or (rows is not None and len(v) != rows):
57
+ raise Invalid(f"{name} must be a list of {rows} rows")
58
+ out = []
59
+ for r in v:
60
+ if not isinstance(r, list) or (cols is not None and len(r) != cols):
61
+ raise Invalid(f"each row of {name} must have {cols} numbers")
62
+ out.append([num(x, name) for x in r])
63
+ return out
64
+
65
+
66
+ def float_list(v, n=None, name="list"):
67
+ if not isinstance(v, list) or (n is not None and len(v) != n):
68
+ raise Invalid(f"{name} must be a list of length {n}")
69
+ return [num(x, name) for x in v]
70
+
71
+
72
+ # ------------------------------------------------------------------ reward
73
+
74
+ def optimize_reward(inst, s):
75
+ b, best = inst["baseline"], inst["best_known"]
76
+ if inst.get("progress_scale") == "log":
77
+ # for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
78
+ # progress is measured in log10(value + floor)
79
+ f = inst.get("log_floor", 1e-3)
80
+ b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
81
+ if inst["direction"] == "maximize":
82
+ p = (s - b) / (best - b)
83
+ else:
84
+ p = (b - s) / (b - best)
85
+ return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
86
+
87
+
88
+ def grade(inst, ans, check):
89
+ try:
90
+ if not isinstance(ans, dict):
91
+ raise Invalid("answer must be a JSON object")
92
+ value, extra = check(inst, ans)
93
+ if inst.get("subset") == "optimize":
94
+ s = float(value)
95
+ if not math.isfinite(s):
96
+ raise Invalid("non-finite score")
97
+ return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
98
+ return 1.0, {"valid": True, **(extra or {})}
99
+ except Invalid as e:
100
+ return 0.0, {"valid": False, "error": str(e)}
101
+ except Exception as e: # any malformed answer
102
+ return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
103
+
104
+
105
+ def main():
106
+ here = os.path.dirname(os.path.abspath(__file__))
107
+ sys.path.insert(0, here)
108
+ # import ourselves as `run` so check.py's `from run import Invalid` is the same class
109
+ import run as R # noqa: E402
110
+ import check as family # noqa: E402
111
+
112
+ inst = json.load(open(sys.argv[1]))
113
+ try:
114
+ ans = json.load(open(sys.argv[2]))
115
+ except Exception as e:
116
+ reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
117
+ else:
118
+ reward, det = R.grade(inst, ans, family.check)
119
+ det["reward"] = reward
120
+ if os.path.isdir("/logs/verifier"):
121
+ with open("/logs/verifier/details.json", "w") as f:
122
+ json.dump(det, f)
123
+ print(reward)
124
+
125
+
126
+ if __name__ == "__main__":
127
+ main()
tasks/construct-ae-p38-factorial-factors-l6-s1/tests/test.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ mkdir -p /logs/verifier
3
+ if [ ! -s /workdir/answer.json ]; then
4
+ echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
5
+ echo 0 > /logs/verifier/reward.txt
6
+ exit 0
7
+ fi
8
+ timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
9
+ > /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
tasks/construct-ae-p38-factorial-factors-l6-s6/environment/Dockerfile ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ FROM python:3.11.16-slim
2
+ RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
3
+ && rm -rf /var/lib/apt/lists/*
4
+ RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
5
+ python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
6
+ WORKDIR /workdir
7
+ COPY instance.json /workdir/instance.json
tasks/construct-ae-p38-factorial-factors-l6-s6/environment/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"N": 8484, "t": 2770, "family": "ae_p38_factorial_factors", "subset": "construct"}
tasks/construct-ae-p38-factorial-factors-l6-s6/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # oracle: a known valid construction (planted witness or published solution)
3
+ cat > /workdir/answer.json <<'RLMATH_EOF'
4
+ {"factors": [33240, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2770, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2771, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2772, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2773, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2774, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2775, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2776, 2777, 2777, 2777, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2778, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2779, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2780, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2781, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2782, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2783, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2784, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2785, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2786, 2787, 2787, 2787, 2787, 2787, 2787, 2787, 2787, 2787, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2788, 2789, 2789, 2789, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2790, 2791, 2791, 2791, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2792, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2793, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2794, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2795, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2796, 2797, 2797, 2797, 2798, 2798, 2798, 2798, 2798, 2798, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2799, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2800, 2801, 2801, 2801, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2802, 2803, 2803, 2803, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2804, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2806, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2807, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2808, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2809, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2810, 2811, 2811, 2811, 2811, 2811, 2811, 2811, 2811, 2811, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2813, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2814, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2815, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2817, 2818, 2818, 2818, 2818, 2818, 2818, 2819, 2819, 2819, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2820, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2821, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2822, 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2823, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2824, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2825, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2826, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2827, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2828, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2830, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2831, 2833, 2833, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2834, 2835, 2836, 2836, 2836, 2836, 2836, 2836, 2836, 2836, 2836, 2836, 2836, 2837, 2837, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2839, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2840, 2841, 2841, 2841, 2841, 2841, 2841, 2841, 2841, 2843, 2843, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2844, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2845, 2846, 2846, 2846, 2846, 2846, 2847, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2848, 2851, 2851, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2853, 2854, 2854, 2854, 2854, 2854, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2855, 2857, 2857, 2858, 2858, 2858, 2858, 2858, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2859, 2861, 2861, 2862, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2863, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2864, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2865, 2866, 2866, 2866, 2866, 2866, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2868, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2869, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2872, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2874, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2876, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2877, 2878, 2878, 2878, 2878, 2878, 2879, 2879, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2882, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2885, 2887, 2887, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2890, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2892, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2893, 2894, 2894, 2894, 2894, 2894, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2895, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2896, 2897, 2897, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2899, 2901, 2901, 2901, 2901, 2901, 2901, 2901, 2901, 2902, 2902, 2902, 2902, 2902, 2903, 2903, 2906, 2906, 2906, 2906, 2906, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2908, 2909, 2909, 2913, 2913, 2913, 2913, 2913, 2913, 2913, 2913, 2917, 2917, 2918, 2918, 2918, 2918, 2918, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2921, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2922, 2927, 2927, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2930, 2931, 2931, 2931, 2931, 2931, 2931, 2931, 2931, 2932, 2932, 2932, 2932, 2932, 2932, 2932, 2932, 2932, 2932, 2932, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2933, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2935, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2936, 2939, 2939, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2941, 2942, 2942, 2942, 2942, 2942, 2946, 2946, 2946, 2946, 2946, 2946, 2946, 2946, 2946, 2946, 2946, 2946, 2946, 2946, 2946, 2946, 2946, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2947, 2949, 2949, 2949, 2949, 2949, 2949, 2949, 2949, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2951, 2953, 2953, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2954, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2955, 2956, 2956, 2956, 2956, 2956, 2956, 2956, 2956, 2956, 2956, 2956, 2957, 2957, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2959, 2962, 2962, 2962, 2962, 2962, 2963, 2963, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2965, 2966, 2966, 2966, 2966, 2966, 2969, 2969, 2971, 2971, 2972, 2972, 2972, 2972, 2972, 2972, 2972, 2972, 2972, 2972, 2972, 2973, 2973, 2973, 2973, 2973, 2973, 2973, 2973, 2974, 2974, 2974, 2974, 2974, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2977, 2978, 2978, 2978, 2978, 2978, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2979, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2981, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2984, 2986, 2986, 2986, 2986, 2986, 2991, 2991, 2991, 2991, 2991, 2991, 2991, 2991, 2994, 2994, 2994, 2994, 2994, 2994, 2994, 2994, 2994, 2994, 2994, 2994, 2994, 2994, 2994, 2994, 2994, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2995, 2998, 2998, 2998, 2998, 2998, 2999, 2999, 3001, 3001, 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3004, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3005, 3008, 3011, 3011, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3012, 3017, 3017, 3017, 3017, 3017, 3017, 3017, 3017, 3017, 3017, 3017, 3017, 3017, 3017, 3017, 3017, 3017, 3017, 3017, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3018, 3019, 3019, 3022, 3022, 3022, 3022, 3022, 3023, 3023, 3027, 3027, 3027, 3027, 3027, 3027, 3027, 3027, 3028, 3028, 3028, 3028, 3028, 3028, 3028, 3028, 3028, 3028, 3028, 3031, 3031, 3031, 3031, 3031, 3031, 3031, 3031, 3031, 3031, 3031, 3031, 3031, 3031, 3031, 3031, 3031, 3031, 3031, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3032, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3033, 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3035, 3037, 3037, 3039, 3039, 3039, 3039, 3039, 3039, 3039, 3039, 3041, 3041, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3044, 3046, 3046, 3046, 3046, 3046, 3049, 3049, 3054, 3054, 3054, 3054, 3054, 3054, 3054, 3054, 3054, 3054, 3054, 3054, 3054, 3054, 3054, 3054, 3057, 3057, 3057, 3057, 3057, 3057, 3057, 3057, 3061, 3061, 3062, 3062, 3062, 3062, 3062, 3063, 3063, 3063, 3063, 3063, 3063, 3063, 3063, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3064, 3065, 3065, 3065, 3065, 3065, 3065, 3065, 3065, 3065, 3065, 3065, 3065, 3065, 3067, 3067, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3070, 3073, 3073, 3073, 3073, 3073, 3073, 3073, 3073, 3073, 3073, 3073, 3073, 3073, 3073, 3073, 3073, 3073, 3073, 3073, 3076, 3076, 3076, 3076, 3076, 3076, 3076, 3076, 3076, 3076, 3076, 3079, 3079, 3083, 3083, 3085, 3085, 3085, 3085, 3085, 3085, 3085, 3085, 3085, 3085, 3085, 3085, 3085, 3086, 3086, 3086, 3086, 3086, 3089, 3089, 3092, 3092, 3092, 3092, 3092, 3092, 3092, 3092, 3092, 3092, 3093, 3093, 3093, 3093, 3093, 3093, 3093, 3093, 3095, 3095, 3095, 3095, 3095, 3095, 3095, 3095, 3095, 3095, 3095, 3095, 3095, 3098, 3098, 3098, 3098, 3098, 3099, 3099, 3099, 3099, 3099, 3099, 3099, 3099, 3101, 3101, 3101, 3101, 3101, 3101, 3101, 3101, 3101, 3101, 3101, 3101, 3101, 3101, 3101, 3101, 3101, 3101, 3101, 3106, 3106, 3106, 3106, 3106, 3109, 3109, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3112, 3117, 3117, 3117, 3117, 3117, 3117, 3117, 3117, 3118, 3118, 3118, 3118, 3118, 3119, 3119, 3121, 3121, 3126, 3126, 3126, 3126, 3126, 3126, 3126, 3126, 3126, 3126, 3126, 3126, 3126, 3126, 3126, 3126, 3134, 3134, 3134, 3134, 3134, 3137, 3137, 3138, 3138, 3138, 3138, 3138, 3138, 3138, 3138, 3138, 3138, 3138, 3138, 3138, 3138, 3138, 3138, 3142, 3142, 3142, 3142, 3142, 3143, 3143, 3143, 3143, 3143, 3143, 3143, 3143, 3143, 3143, 3143, 3143, 3143, 3143, 3143, 3143, 3143, 3143, 3147, 3147, 3147, 3147, 3147, 3147, 3147, 3147, 3148, 3148, 3148, 3148, 3148, 3148, 3148, 3148, 3148, 3148, 3153, 3153, 3153, 3153, 3153, 3153, 3153, 3153, 3155, 3155, 3155, 3155, 3155, 3155, 3155, 3155, 3155, 3155, 3155, 3155, 3155, 3158, 3158, 3158, 3158, 3158, 3163, 3163, 3166, 3166, 3166, 3166, 3166, 3167, 3167, 3169, 3169, 3181, 3181, 3183, 3183, 3183, 3183, 3183, 3183, 3183, 3187, 3187, 3188, 3188, 3188, 3188, 3188, 3188, 3188, 3188, 3188, 3188, 3189, 3189, 3189, 3189, 3189, 3189, 3189, 3191, 3191, 3194, 3194, 3194, 3194, 3194, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3199, 3202, 3202, 3202, 3202, 3202, 3203, 3203, 3205, 3205, 3205, 3205, 3205, 3205, 3205, 3205, 3205, 3205, 3205, 3205, 3205, 3207, 3207, 3207, 3207, 3207, 3207, 3207, 3209, 3209, 3214, 3214, 3214, 3214, 3214, 3215, 3215, 3215, 3215, 3215, 3215, 3215, 3215, 3215, 3215, 3215, 3215, 3215, 3217, 3217, 3218, 3218, 3218, 3218, 3218, 3221, 3221, 3226, 3226, 3226, 3226, 3226, 3227, 3227, 3227, 3227, 3227, 3227, 3227, 3227, 3227, 3227, 3227, 3227, 3227, 3227, 3227, 3227, 3227, 3227, 3229, 3229, 3235, 3235, 3235, 3235, 3235, 3235, 3235, 3235, 3235, 3235, 3235, 3235, 3235, 3236, 3236, 3236, 3236, 3236, 3236, 3236, 3236, 3236, 3236, 3238, 3238, 3238, 3238, 3238, 3242, 3242, 3242, 3242, 3242, 3244, 3244, 3244, 3244, 3244, 3244, 3244, 3244, 3244, 3244, 3246, 3246, 3246, 3246, 3246, 3246, 3246, 3246, 3246, 3246, 3246, 3246, 3246, 3246, 3246, 3251, 3251, 3253, 3253, 3254, 3254, 3254, 3254, 3254, 3257, 3257, 3259, 3259, 3261, 3261, 3261, 3261, 3261, 3261, 3261, 3265, 3265, 3265, 3265, 3265, 3265, 3265, 3265, 3265, 3265, 3265, 3265, 3271, 3271, 3273, 3273, 3273, 3273, 3273, 3273, 3273, 3274, 3274, 3274, 3274, 3274, 3279, 3279, 3279, 3279, 3279, 3279, 3279, 3282, 3282, 3282, 3282, 3282, 3282, 3282, 3282, 3282, 3282, 3282, 3282, 3282, 3282, 3282, 3284, 3284, 3284, 3284, 3284, 3284, 3284, 3284, 3284, 3284, 3291, 3291, 3291, 3291, 3291, 3291, 3291, 3292, 3292, 3292, 3292, 3292, 3292, 3292, 3292, 3292, 3292, 3295, 3295, 3295, 3295, 3295, 3295, 3295, 3295, 3295, 3295, 3295, 3295, 3299, 3299, 3301, 3301, 3305, 3305, 3305, 3305, 3305, 3305, 3305, 3305, 3305, 3305, 3305, 3305, 3307, 3307, 3308, 3308, 3308, 3308, 3308, 3308, 3308, 3308, 3308, 3308, 3309, 3309, 3309, 3309, 3309, 3309, 3309, 3313, 3313, 3314, 3314, 3314, 3314, 3314, 3316, 3316, 3316, 3316, 3316, 3316, 3316, 3316, 3316, 3316, 3319, 3319, 3323, 3323, 3326, 3326, 3326, 3326, 3326, 3327, 3327, 3327, 3327, 3327, 3327, 3327, 3329, 3329, 3331, 3331, 3334, 3334, 3334, 3334, 3334, 3338, 3338, 3338, 3338, 3338, 3343, 3343, 3347, 3347, 3351, 3351, 3351, 3351, 3351, 3351, 3351, 3356, 3356, 3356, 3356, 3356, 3356, 3356, 3356, 3356, 3356, 3359, 3359, 3361, 3361, 3365, 3365, 3365, 3365, 3365, 3365, 3365, 3365, 3365, 3365, 3365, 3365, 3369, 3369, 3369, 3369, 3369, 3369, 3369, 3371, 3371, 3373, 3373, 3385, 3385, 3385, 3385, 3385, 3385, 3385, 3385, 3385, 3385, 3385, 3385, 3386, 3386, 3386, 3386, 3386, 3387, 3387, 3387, 3387, 3387, 3387, 3387, 3389, 3389, 3391, 3391, 3394, 3394, 3394, 3394, 3398, 3398, 3398, 3398, 3407, 3407, 3412, 3412, 3412, 3412, 3412, 3412, 3412, 3412, 3412, 3413, 3413, 3415, 3415, 3415, 3415, 3415, 3415, 3415, 3415, 3415, 3415, 3415, 3415, 3418, 3418, 3418, 3418, 3428, 3428, 3428, 3428, 3428, 3428, 3428, 3428, 3428, 3433, 3433, 3436, 3436, 3436, 3436, 3436, 3436, 3436, 3436, 3436, 3442, 3442, 3442, 3442, 3446, 3446, 3446, 3446, 3449, 3449, 3452, 3452, 3452, 3452, 3452, 3452, 3452, 3452, 3452, 3453, 3453, 3453, 3453, 3453, 3453, 3453, 3455, 3455, 3455, 3455, 3455, 3455, 3455, 3455, 3455, 3455, 3455, 3455, 3457, 3457, 3459, 3459, 3459, 3459, 3459, 3459, 3459, 3461, 3461, 3463, 3463, 3466, 3466, 3466, 3466, 3467, 3467, 3469, 3469, 3482, 3482, 3482, 3482, 3489, 3489, 3489, 3489, 3489, 3489, 3489, 3491, 3491, 3494, 3494, 3494, 3494, 3499, 3499, 3506, 3506, 3506, 3506, 3508, 3508, 3508, 3508, 3508, 3508, 3508, 3508, 3508, 3511, 3511, 3513, 3513, 3513, 3513, 3513, 3513, 3513, 3517, 3517, 3518, 3518, 3518, 3518, 3524, 3524, 3524, 3524, 3524, 3524, 3524, 3524, 3524, 3527, 3527, 3529, 3529, 3532, 3532, 3532, 3532, 3532, 3532, 3532, 3532, 3532, 3533, 3533, 3539, 3539, 3541, 3541, 3543, 3543, 3543, 3543, 3543, 3543, 3543, 3547, 3547, 3548, 3548, 3548, 3548, 3548, 3548, 3548, 3548, 3548, 3554, 3554, 3554, 3554, 3557, 3557, 3559, 3559, 3561, 3561, 3561, 3561, 3561, 3561, 3561, 3566, 3566, 3566, 3566, 3571, 3571, 3574, 3574, 3574, 3574, 3578, 3578, 3578, 3578, 3579, 3579, 3579, 3579, 3579, 3579, 3579, 3581, 3581, 3583, 3583, 3593, 3593, 3602, 3602, 3602, 3602, 3603, 3603, 3603, 3603, 3603, 3603, 3603, 3607, 3607, 3613, 3613, 3617, 3617, 3622, 3622, 3622, 3622, 3623, 3623, 3628, 3628, 3628, 3628, 3628, 3628, 3628, 3628, 3628, 3631, 3631, 3637, 3637, 3639, 3639, 3639, 3639, 3639, 3639, 3643, 3643, 3644, 3644, 3644, 3644, 3644, 3644, 3644, 3644, 3644, 3646, 3646, 3646, 3646, 3651, 3651, 3651, 3651, 3651, 3651, 3659, 3659, 3662, 3662, 3662, 3662, 3669, 3669, 3669, 3669, 3669, 3669, 3671, 3671, 3673, 3673, 3676, 3676, 3676, 3676, 3676, 3676, 3676, 3676, 3676, 3677, 3677, 3687, 3687, 3687, 3687, 3687, 3687, 3691, 3691, 3693, 3693, 3693, 3693, 3693, 3693, 3694, 3694, 3694, 3694, 3697, 3697, 3701, 3701, 3709, 3709, 3711, 3711, 3711, 3711, 3711, 3711, 3719, 3719, 3722, 3722, 3722, 3722, 3727, 3727, 3733, 3733, 3734, 3734, 3734, 3734, 3739, 3739, 3742, 3742, 3742, 3742, 3746, 3746, 3746, 3746, 3747, 3747, 3747, 3747, 3747, 3747, 3754, 3754, 3754, 3754, 3758, 3758, 3758, 3758, 3761, 3761, 3767, 3767, 3769, 3769, 3777, 3777, 3777, 3777, 3777, 3777, 3778, 3778, 3778, 3778, 3779, 3779, 3793, 3793, 3797, 3797, 3802, 3802, 3802, 3802, 3803, 3803, 3814, 3814, 3814, 3814, 3821, 3821, 3823, 3823, 3826, 3826, 3826, 3826, 3831, 3831, 3831, 3831, 3831, 3831, 3833, 3833, 3837, 3837, 3837, 3837, 3837, 3837, 3847, 3847, 3849, 3849, 3849, 3849, 3849, 3849, 3851, 3851, 3853, 3853, 3862, 3862, 3862, 3862, 3863, 3863, 3866, 3866, 3866, 3866, 3867, 3867, 3867, 3867, 3867, 3867, 3873, 3873, 3873, 3873, 3873, 3873, 3877, 3877, 3881, 3881, 3889, 3889, 3891, 3891, 3891, 3891, 3891, 3891, 3898, 3898, 3898, 3898, 3902, 3902, 3902, 3902, 3903, 3903, 3903, 3903, 3903, 3903, 3907, 3907, 3909, 3909, 3909, 3909, 3909, 3909, 3911, 3911, 3917, 3917, 3919, 3919, 3921, 3921, 3921, 3921, 3921, 3921, 3923, 3923, 3929, 3929, 3931, 3931, 3943, 3943, 3946, 3946, 3946, 3946, 3947, 3947, 3957, 3957, 3957, 3957, 3957, 3957, 3958, 3958, 3958, 3958, 3963, 3963, 3963, 3963, 3963, 3963, 3967, 3967, 3974, 3974, 3974, 3974, 3981, 3981, 3981, 3981, 3981, 3981, 3986, 3986, 3986, 3986, 3989, 3989, 3994, 3994, 3994, 3994, 3998, 3998, 3998, 3998, 4001, 4001, 4003, 4003, 4006, 4006, 4006, 4006, 4007, 4007, 4013, 4013, 4019, 4019, 4021, 4021, 4022, 4022, 4022, 4022, 4027, 4027, 4034, 4034, 4034, 4034, 4049, 4049, 4051, 4051, 4054, 4054, 4054, 4054, 4057, 4057, 4058, 4058, 4058, 4058, 4073, 4073, 4078, 4078, 4078, 4078, 4079, 4079, 4083, 4083, 4083, 4083, 4083, 4083, 4091, 4091, 4093, 4093, 4099, 4099, 4101, 4101, 4101, 4101, 4101, 4101, 4106, 4106, 4106, 4106, 4111, 4111, 4119, 4119, 4119, 4119, 4119, 4119, 4126, 4126, 4126, 4126, 4127, 4127, 4129, 4129, 4133, 4133, 4138, 4138, 4138, 4138, 4139, 4139, 4143, 4143, 4143, 4143, 4143, 4143, 4153, 4153, 4157, 4157, 4159, 4159, 4162, 4162, 4162, 4162, 4166, 4166, 4166, 4166, 4174, 4174, 4174, 4174, 4177, 4177, 4178, 4178, 4178, 4178, 4198, 4198, 4198, 4198, 4201, 4201, 4211, 4211, 4217, 4217, 4219, 4219, 4222, 4222, 4222, 4222, 4226, 4226, 4226, 4226, 4229, 4229, 4231, 4231, 4241, 4241, 4243, 4253, 4258, 4258, 4258, 4259, 4261, 4262, 4262, 4262, 4271, 4273, 4274, 4274, 4274, 4282, 4282, 4282, 4283, 4286, 4286, 4286, 4289, 4297, 4306, 4306, 4306, 4322, 4322, 4322, 4327, 4337, 4339, 4349, 4357, 4358, 4358, 4358, 4363, 4373, 4391, 4397, 4406, 4406, 4406, 4409, 4414, 4414, 4414, 4421, 4423, 4426, 4426, 4426, 4441, 4442, 4442, 4442, 4447, 4451, 4457, 4463, 4474, 4474, 4474, 4478, 4478, 4478, 4481, 4483, 4486, 4486, 4486, 4493, 4502, 4502, 4502, 4507, 4513, 4517, 4519, 4523, 4534, 4534, 4534, 4538, 4538, 4538, 4546, 4546, 4546, 4547, 4549, 4561, 4562, 4562, 4562, 4567, 4574, 4574, 4574, 4583, 4586, 4586, 4586, 4591, 4594, 4594, 4594, 4597, 4603, 4618, 4618, 4618, 4621, 4622, 4622, 4622, 4637, 4639, 4643, 4649, 4651, 4657, 4663, 4666, 4666, 4666, 4673, 4678, 4678, 4678, 4679, 4682, 4682, 4682, 4691, 4694, 4694, 4694, 4702, 4702, 4702, 4703, 4714, 4714, 4714, 4721, 4723, 4729, 4733, 4742, 4742, 4742, 4751, 4754, 4754, 4754, 4759, 4762, 4762, 4762, 4766, 4766, 4766, 4778, 4778, 4778, 4783, 4786, 4786, 4786, 4787, 4789, 4793, 4798, 4798, 4798, 4799, 4801, 4813, 4817, 4822, 4822, 4822, 4831, 4834, 4834, 4834, 4846, 4846, 4846, 4861, 4871, 4874, 4874, 4874, 4877, 4882, 4882, 4882, 4889, 4894, 4894, 4894, 4903, 4909, 4918, 4918, 4918, 4919, 4931, 4933, 4934, 4934, 4934, 4937, 4943, 4946, 4946, 4946, 4951, 4954, 4954, 4954, 4957, 4967, 4969, 4973, 4987, 4993, 4999, 5003, 5006, 5006, 5006, 5009, 5011, 5021, 5023, 5039, 5042, 5042, 5042, 5051, 5059, 5062, 5062, 5062, 5077, 5078, 5078, 5078, 5081, 5086, 5086, 5086, 5087, 5098, 5098, 5098, 5099, 5101, 5102, 5102, 5102, 5107, 5113, 5114, 5114, 5114, 5119, 5147, 5153, 5158, 5158, 5158, 5167, 5171, 5179, 5182, 5182, 5182, 5186, 5186, 5186, 5189, 5197, 5209, 5218, 5218, 5218, 5227, 5231, 5233, 5234, 5234, 5234, 5237, 5242, 5242, 5242, 5261, 5266, 5266, 5266, 5273, 5279, 5281, 5294, 5294, 5294, 5297, 5303, 5309, 5314, 5314, 5314, 5318, 5318, 5318, 5323, 5326, 5326, 5326, 5333, 5342, 5342, 5342, 5347, 5351, 5354, 5354, 5354, 5366, 5366, 5366, 5374, 5374, 5374, 5378, 5378, 5378, 5381, 5386, 5386, 5386, 5387, 5393, 5398, 5398, 5398, 5399, 5407, 5413, 5414, 5414, 5414, 5417, 5419, 5422, 5422, 5422, 5426, 5426, 5426, 5431, 5437, 5438, 5438, 5438, 5441, 5443, 5449, 5458, 5458, 5458, 5462, 5462, 5462, 5471, 5477, 5479, 5482, 5482, 5482, 5483, 5498, 5498, 5498, 5501, 5503, 5506, 5506, 5506, 5507, 5519, 5521, 5527, 5531, 5534, 5534, 5534, 5557, 5563, 5569, 5573, 5581, 5591, 5623, 5639, 5641, 5647, 5651, 5653, 5657, 5659, 5669, 5683, 5689, 5693, 5701, 5711, 5717, 5737, 5741, 5743, 5749, 5779, 5783, 5791, 5801, 5807, 5813, 5821, 5827, 5839, 5843, 5849, 5851, 5857, 5861, 5867, 5869, 5879, 5881, 5897, 5903, 5923, 5927, 5939, 5953, 5981, 5987, 6007, 6011, 6029, 6037, 6043, 6047, 6053, 6067, 6073, 6079, 6089, 6091, 6101, 6113, 6121, 6131, 6133, 6143, 6151, 6163, 6173, 6197, 6199, 6203, 6211, 6217, 6221, 6229, 6247, 6257, 6263, 6269, 6271, 6277, 6287, 6299, 6301, 6311, 6317, 6323, 6329, 6337, 6343, 6353, 6359, 6361, 6367, 6373, 6379, 6389, 6397, 6421, 6427, 6449, 6451, 6469, 6473, 6481, 6491, 6521, 6529, 6547, 6551, 6553, 6563, 6569, 6571, 6577, 6581, 6599, 6607, 6619, 6637, 6653, 6659, 6661, 6673, 6679, 6689, 6691, 6701, 6703, 6709, 6719, 6733, 6737, 6761, 6763, 6779, 6781, 6791, 6793, 6803, 6823, 6827, 6829, 6833, 6841, 6857, 6863, 6869, 6871, 6883, 6899, 6907, 6911, 6917, 6947, 6949, 6959, 6961, 6967, 6971, 6977, 6983, 6991, 6997, 7001, 7013, 7019, 7027, 7039, 7043, 7057, 7069, 7079, 7103, 7109, 7121, 7127, 7129, 7151, 7159, 7177, 7187, 7193, 7207, 7211, 7213, 7219, 7229, 7237, 7243, 7247, 7253, 7283, 7297, 7307, 7309, 7321, 7331, 7333, 7349, 7351, 7369, 7393, 7411, 7417, 7433, 7451, 7457, 7459, 7477, 7481, 7487, 7489, 7499, 7507, 7517, 7523, 7529, 7537, 7541, 7547, 7549, 7559, 7561, 7573, 7577, 7583, 7589, 7591, 7603, 7607, 7621, 7639, 7643, 7649, 7669, 7673, 7681, 7687, 7691, 7699, 7703, 7717, 7723, 7727, 7741, 7753, 7757, 7759, 7789, 7793, 7817, 7823, 7829, 7841, 7853, 7867, 7873, 7877, 7879, 7883, 7901, 7907, 7919, 7927, 7933, 7937, 7949, 7951, 7963, 7993, 8009, 8011, 8017, 8039, 8053, 8059, 8069, 8081, 8087, 8089, 8093, 8101, 8111, 8117, 8123, 8147, 8161, 8167, 8171, 8179, 8191, 8209, 8219, 8221, 8231, 8233, 8237, 8243, 8263, 8269, 8273, 8287, 8291, 8293, 8297, 8311, 8317, 8329, 8353, 8363, 8369, 8377, 8387, 8389, 8419, 8423, 8429, 8431, 8443, 8447, 8461, 8467]}
5
+ RLMATH_EOF
tasks/construct-ae-p38-factorial-factors-l6-s6/tests/check.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Factor N! into N factors, each >= t (AlphaEvolve problem 38 / OEIS A034258). Exact big-integer check."""
2
+ import math
3
+
4
+ from run import Invalid, int_list
5
+
6
+
7
+ def check(inst, ans):
8
+ n, t = inst["N"], inst["t"]
9
+ f = int_list(ans.get("factors"), n, t, None, "factors")
10
+ if math.prod(f) != math.factorial(n):
11
+ raise Invalid(f"the product of the factors is not {n}!")
12
+ return None, {"min_factor": min(f)}
tasks/construct-ae-p38-factorial-factors-l6-s6/tests/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"N": 8484, "t": 2770, "family": "ae_p38_factorial_factors", "subset": "construct"}
tasks/construct-ae-p38-factorial-factors-l6-s6/tests/run.py ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
2
+
3
+ Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
4
+
5
+ python3 /tests/run.py /tests/instance.json /workdir/answer.json
6
+
7
+ Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
8
+
9
+ check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
10
+ construct : value is ignored; a returned check means the witness is valid -> reward 1.0
11
+ optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
12
+ progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
13
+ clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
14
+ inst must carry "direction", "baseline", "best_known".
15
+ """
16
+ import json
17
+ import math
18
+ import os
19
+ import sys
20
+
21
+ VALID_FLOOR = 0.1
22
+
23
+
24
+ class Invalid(Exception):
25
+ pass
26
+
27
+
28
+ # ------------------------------------------------------------ input helpers
29
+
30
+ def int_list(v, n=None, lo=None, hi=None, name="list"):
31
+ if not isinstance(v, list):
32
+ raise Invalid(f"{name} must be a list")
33
+ if n is not None and len(v) != n:
34
+ raise Invalid(f"{name} must have length {n}, got {len(v)}")
35
+ for x in v:
36
+ if isinstance(x, bool) or not isinstance(x, int):
37
+ raise Invalid(f"{name} must contain integers only")
38
+ if (lo is not None and x < lo) or (hi is not None and x > hi):
39
+ raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
40
+ return v
41
+
42
+
43
+ def as_int(x, name="value", lo=None, hi=None):
44
+ return int_list([x], 1, lo, hi, name)[0]
45
+
46
+
47
+ def num(x, name="value"):
48
+ if isinstance(x, bool) or not isinstance(x, (int, float)):
49
+ raise Invalid(f"{name} must be a number")
50
+ if not math.isfinite(x):
51
+ raise Invalid(f"{name} is not finite")
52
+ return float(x)
53
+
54
+
55
+ def float_matrix(v, rows=None, cols=None, name="matrix"):
56
+ if not isinstance(v, list) or (rows is not None and len(v) != rows):
57
+ raise Invalid(f"{name} must be a list of {rows} rows")
58
+ out = []
59
+ for r in v:
60
+ if not isinstance(r, list) or (cols is not None and len(r) != cols):
61
+ raise Invalid(f"each row of {name} must have {cols} numbers")
62
+ out.append([num(x, name) for x in r])
63
+ return out
64
+
65
+
66
+ def float_list(v, n=None, name="list"):
67
+ if not isinstance(v, list) or (n is not None and len(v) != n):
68
+ raise Invalid(f"{name} must be a list of length {n}")
69
+ return [num(x, name) for x in v]
70
+
71
+
72
+ # ------------------------------------------------------------------ reward
73
+
74
+ def optimize_reward(inst, s):
75
+ b, best = inst["baseline"], inst["best_known"]
76
+ if inst.get("progress_scale") == "log":
77
+ # for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
78
+ # progress is measured in log10(value + floor)
79
+ f = inst.get("log_floor", 1e-3)
80
+ b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
81
+ if inst["direction"] == "maximize":
82
+ p = (s - b) / (best - b)
83
+ else:
84
+ p = (b - s) / (b - best)
85
+ return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
86
+
87
+
88
+ def grade(inst, ans, check):
89
+ try:
90
+ if not isinstance(ans, dict):
91
+ raise Invalid("answer must be a JSON object")
92
+ value, extra = check(inst, ans)
93
+ if inst.get("subset") == "optimize":
94
+ s = float(value)
95
+ if not math.isfinite(s):
96
+ raise Invalid("non-finite score")
97
+ return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
98
+ return 1.0, {"valid": True, **(extra or {})}
99
+ except Invalid as e:
100
+ return 0.0, {"valid": False, "error": str(e)}
101
+ except Exception as e: # any malformed answer
102
+ return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
103
+
104
+
105
+ def main():
106
+ here = os.path.dirname(os.path.abspath(__file__))
107
+ sys.path.insert(0, here)
108
+ # import ourselves as `run` so check.py's `from run import Invalid` is the same class
109
+ import run as R # noqa: E402
110
+ import check as family # noqa: E402
111
+
112
+ inst = json.load(open(sys.argv[1]))
113
+ try:
114
+ ans = json.load(open(sys.argv[2]))
115
+ except Exception as e:
116
+ reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
117
+ else:
118
+ reward, det = R.grade(inst, ans, family.check)
119
+ det["reward"] = reward
120
+ if os.path.isdir("/logs/verifier"):
121
+ with open("/logs/verifier/details.json", "w") as f:
122
+ json.dump(det, f)
123
+ print(reward)
124
+
125
+
126
+ if __name__ == "__main__":
127
+ main()
tasks/construct-ae-p38-factorial-factors-l6-s6/tests/test.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ mkdir -p /logs/verifier
3
+ if [ ! -s /workdir/answer.json ]; then
4
+ echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
5
+ echo 0 > /logs/verifier/reward.txt
6
+ exit 0
7
+ fi
8
+ timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
9
+ > /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
tasks/construct-ae-p52-erdos-squarefree-l2-s2/environment/Dockerfile ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ FROM python:3.11.16-slim
2
+ RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
3
+ && rm -rf /var/lib/apt/lists/*
4
+ RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
5
+ python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
6
+ WORKDIR /workdir
7
+ COPY instance.json /workdir/instance.json
tasks/construct-ae-p52-erdos-squarefree-l2-s2/environment/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"N": 361, "t": 15, "family": "ae_p52_erdos_squarefree", "subset": "construct"}
tasks/construct-ae-p52-erdos-squarefree-l2-s2/solution/solve.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ # oracle: a known valid construction (planted witness or published solution)
3
+ cat > /workdir/answer.json <<'RLMATH_EOF'
4
+ {"A": [7, 32, 57, 82, 107, 132, 157, 182, 207, 232, 257, 282, 307, 332, 357]}
5
+ RLMATH_EOF
tasks/construct-ae-p52-erdos-squarefree-l2-s2/tests/check.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Erdos squarefree problem (AlphaEvolve problem 52): A in [1, N], |A| >= t, ab+1 NOT squarefree for all a, b in A
2
+ (a = b included). The repo's problem page says "square-free"; the notebook and the Erdos problem ask for
3
+ "never squarefree", which is what we check. Exact: for every pair we find a prime p with p^2 | ab+1."""
4
+ import numpy as np
5
+
6
+ from run import Invalid, int_list
7
+
8
+
9
+ def _primes(n):
10
+ s = np.ones(n + 1, dtype=bool)
11
+ s[:2] = False
12
+ for i in range(2, int(n ** .5) + 1):
13
+ if s[i]:
14
+ s[i * i::i] = False
15
+ return np.nonzero(s)[0]
16
+
17
+
18
+ def check(inst, ans):
19
+ n, t = inst["N"], inst["t"]
20
+ a = ans.get("A")
21
+ if not isinstance(a, list) or not (t <= len(a) <= 2 * t + 20):
22
+ raise Invalid(f"A must be a list of {t}..{2 * t + 20} integers")
23
+ int_list(a, None, 1, n, "A")
24
+ if len(set(a)) != len(a):
25
+ raise Invalid("A must consist of distinct integers")
26
+ x = np.array(sorted(a), dtype=np.int64)
27
+ iu, ju = np.triu_indices(len(x))
28
+ va, vb = x[iu], x[ju]
29
+ left = np.ones(len(iu), dtype=bool) # pairs without a square divisor found yet
30
+ for p in _primes(int((n * n + 1) ** .5) + 1):
31
+ q = int(p) * int(p)
32
+ idx = np.nonzero(left)[0]
33
+ hit = ((va[idx] % q) * (vb[idx] % q) + 1) % q == 0
34
+ left[idx[hit]] = False
35
+ if not left.any():
36
+ return None, {"size": len(a)}
37
+ k = int(np.nonzero(left)[0][0])
38
+ raise Invalid(f"{int(va[k])}*{int(vb[k])}+1 = {int(va[k]) * int(vb[k]) + 1} is squarefree")
tasks/construct-ae-p52-erdos-squarefree-l2-s2/tests/instance.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"N": 361, "t": 15, "family": "ae_p52_erdos_squarefree", "subset": "construct"}
tasks/construct-ae-p52-erdos-squarefree-l2-s2/tests/run.py ADDED
@@ -0,0 +1,127 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """rlmath runtime grader. Copied into every task as /tests/run.py next to /tests/check.py.
2
+
3
+ Deterministic; no LLM in the reward path. Runs with python3 + numpy/scipy/sympy/networkx only.
4
+
5
+ python3 /tests/run.py /tests/instance.json /workdir/answer.json
6
+
7
+ Prints the reward in [0, 1] and writes /logs/verifier/details.json when that directory exists.
8
+
9
+ check.py must define check(inst, ans) -> (value, extra_dict) and raise Invalid for a bad answer.
10
+ construct : value is ignored; a returned check means the witness is valid -> reward 1.0
11
+ optimize : value is the raw objective; reward = 0.1 + 0.9 * progress, where
12
+ progress = clip((s - baseline) / (best_known - baseline), 0, 1) (maximize)
13
+ clip((baseline - s) / (baseline - best_known), 0, 1) (minimize)
14
+ inst must carry "direction", "baseline", "best_known".
15
+ """
16
+ import json
17
+ import math
18
+ import os
19
+ import sys
20
+
21
+ VALID_FLOOR = 0.1
22
+
23
+
24
+ class Invalid(Exception):
25
+ pass
26
+
27
+
28
+ # ------------------------------------------------------------ input helpers
29
+
30
+ def int_list(v, n=None, lo=None, hi=None, name="list"):
31
+ if not isinstance(v, list):
32
+ raise Invalid(f"{name} must be a list")
33
+ if n is not None and len(v) != n:
34
+ raise Invalid(f"{name} must have length {n}, got {len(v)}")
35
+ for x in v:
36
+ if isinstance(x, bool) or not isinstance(x, int):
37
+ raise Invalid(f"{name} must contain integers only")
38
+ if (lo is not None and x < lo) or (hi is not None and x > hi):
39
+ raise Invalid(f"{name} entry {x} out of range [{lo}, {hi}]")
40
+ return v
41
+
42
+
43
+ def as_int(x, name="value", lo=None, hi=None):
44
+ return int_list([x], 1, lo, hi, name)[0]
45
+
46
+
47
+ def num(x, name="value"):
48
+ if isinstance(x, bool) or not isinstance(x, (int, float)):
49
+ raise Invalid(f"{name} must be a number")
50
+ if not math.isfinite(x):
51
+ raise Invalid(f"{name} is not finite")
52
+ return float(x)
53
+
54
+
55
+ def float_matrix(v, rows=None, cols=None, name="matrix"):
56
+ if not isinstance(v, list) or (rows is not None and len(v) != rows):
57
+ raise Invalid(f"{name} must be a list of {rows} rows")
58
+ out = []
59
+ for r in v:
60
+ if not isinstance(r, list) or (cols is not None and len(r) != cols):
61
+ raise Invalid(f"each row of {name} must have {cols} numbers")
62
+ out.append([num(x, name) for x in r])
63
+ return out
64
+
65
+
66
+ def float_list(v, n=None, name="list"):
67
+ if not isinstance(v, list) or (n is not None and len(v) != n):
68
+ raise Invalid(f"{name} must be a list of length {n}")
69
+ return [num(x, name) for x in v]
70
+
71
+
72
+ # ------------------------------------------------------------------ reward
73
+
74
+ def optimize_reward(inst, s):
75
+ b, best = inst["baseline"], inst["best_known"]
76
+ if inst.get("progress_scale") == "log":
77
+ # for non-negative losses spanning orders of magnitude (e.g. overlap loss -> 0);
78
+ # progress is measured in log10(value + floor)
79
+ f = inst.get("log_floor", 1e-3)
80
+ b, best, s = (math.log10(max(x, 0.0) + f) for x in (b, best, s))
81
+ if inst["direction"] == "maximize":
82
+ p = (s - b) / (best - b)
83
+ else:
84
+ p = (b - s) / (b - best)
85
+ return VALID_FLOOR + (1 - VALID_FLOOR) * max(0.0, min(1.0, p))
86
+
87
+
88
+ def grade(inst, ans, check):
89
+ try:
90
+ if not isinstance(ans, dict):
91
+ raise Invalid("answer must be a JSON object")
92
+ value, extra = check(inst, ans)
93
+ if inst.get("subset") == "optimize":
94
+ s = float(value)
95
+ if not math.isfinite(s):
96
+ raise Invalid("non-finite score")
97
+ return optimize_reward(inst, s), {"valid": True, "raw_score": s, **(extra or {})}
98
+ return 1.0, {"valid": True, **(extra or {})}
99
+ except Invalid as e:
100
+ return 0.0, {"valid": False, "error": str(e)}
101
+ except Exception as e: # any malformed answer
102
+ return 0.0, {"valid": False, "error": f"{type(e).__name__}: {e}"}
103
+
104
+
105
+ def main():
106
+ here = os.path.dirname(os.path.abspath(__file__))
107
+ sys.path.insert(0, here)
108
+ # import ourselves as `run` so check.py's `from run import Invalid` is the same class
109
+ import run as R # noqa: E402
110
+ import check as family # noqa: E402
111
+
112
+ inst = json.load(open(sys.argv[1]))
113
+ try:
114
+ ans = json.load(open(sys.argv[2]))
115
+ except Exception as e:
116
+ reward, det = 0.0, {"valid": False, "error": f"unreadable answer: {e}"}
117
+ else:
118
+ reward, det = R.grade(inst, ans, family.check)
119
+ det["reward"] = reward
120
+ if os.path.isdir("/logs/verifier"):
121
+ with open("/logs/verifier/details.json", "w") as f:
122
+ json.dump(det, f)
123
+ print(reward)
124
+
125
+
126
+ if __name__ == "__main__":
127
+ main()
tasks/construct-ae-p52-erdos-squarefree-l2-s2/tests/test.sh ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+ mkdir -p /logs/verifier
3
+ if [ ! -s /workdir/answer.json ]; then
4
+ echo '{"valid": false, "error": "no /workdir/answer.json"}' > /logs/verifier/details.json
5
+ echo 0 > /logs/verifier/reward.txt
6
+ exit 0
7
+ fi
8
+ timeout 290 python3 /tests/run.py /tests/instance.json /workdir/answer.json \
9
+ > /logs/verifier/reward.txt 2> /logs/verifier/grader.log || echo 0 > /logs/verifier/reward.txt
tasks/construct-ae-p52-erdos-squarefree-l2-s5/environment/Dockerfile ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ FROM python:3.11.16-slim
2
+ RUN apt-get update && apt-get install -y --no-install-recommends tmux curl git procps build-essential \
3
+ && rm -rf /var/lib/apt/lists/*
4
+ RUN pip install --no-cache-dir numpy==2.4.6 scipy==1.17.1 sympy==1.14.0 networkx==3.6.1 \
5
+ python-sat==1.9.dev15 z3-solver==5.1.0.0 PuLP==3.3.2 ortools==9.15.6755
6
+ WORKDIR /workdir
7
+ COPY instance.json /workdir/instance.json