diff --git a/README.md b/README.md index f3a2eee..be15e12 100644 --- a/README.md +++ b/README.md @@ -7,22 +7,24 @@ ## Рейтинг Результаты тестирования моделей: +- openai_gpt_oss_20b: 87% - google_gemini_2_0_flash_001: 86% - openai_o3_mini_high: 85% - moonshotai_kimi_k2: 83% - deepseek_deepseek_chat_v3_0324: 82% - google_gemini_2_5_flash_preview: 82% +- openai_gpt_oss_120b: 82% - deepseek_deepseek_chat_free: 78% - google_gemini_2_0_flash_lite_001: 78% - google_gemini_2_5_flash_lite_preview_06_17: 78% - google_gemma_3_27b_it: 77% - openai_gpt_4o_mini: 77% - deepseek_deepseek_chat: 76% -- google_gemini_flash_1_5: 75% - qwen_qwen_2_5_coder_32b_instruct: 75% - mistralai_codestral_2501: 75% -- z_ai_glm_4: 74% +- google_gemini_flash_1_5: 75% - inception_mercury_coder_small_beta: 74% +- z_ai_glm_4: 74% - google_gemma_3_12b_it: 71% - meta_llama_llama_3_1_70b_instruct: 69% - mistralai_mistral_small_3_1_24b_instruct: 67% diff --git a/config/models.yml b/config/models.yml index 509ef97..a9e3df0 100644 --- a/config/models.yml +++ b/config/models.yml @@ -158,6 +158,12 @@ openrouter: note: https://openrouter.ai/openai/gpt-oss-20b done: false + openai-gpt-oss-120b: + name: openai/gpt-oss-120b + provider: openrouter.ai + note: https://openrouter.ai/openai/gpt-oss-120b + done: false + # Ollama модели ollama: ollama_llama3_2: diff --git a/reports/human_eval_for_ruby_report_full.html b/reports/human_eval_for_ruby_report_full.html index 0c2badd..fb96858 100644 --- a/reports/human_eval_for_ruby_report_full.html +++ b/reports/human_eval_for_ruby_report_full.html @@ -64,7 +64,7 @@

Отчет о тестировании моделей

-

Дата: 2025-08-09 18:04:26

+

Дата: 2025-08-09 18:29:10

Результаты по моделям

@@ -76,6 +76,7 @@

Результаты по моделям

+ @@ -123,6 +124,7 @@

Детальные результаты по задачам

+ @@ -154,6 +156,7 @@

Детальные результаты по задачам

+ @@ -180,6 +183,7 @@

Детальные результаты по задачам

+ @@ -211,6 +215,7 @@

Детальные результаты по задачам

+ @@ -240,6 +245,7 @@

Детальные результаты по задачам

+ @@ -269,6 +275,7 @@

Детальные результаты по задачам

+ @@ -302,6 +309,7 @@

Детальные результаты по задачам

+ @@ -330,6 +338,7 @@

Детальные результаты по задачам

+ @@ -361,6 +370,7 @@

Детальные результаты по задачам

+ @@ -391,6 +401,7 @@

Детальные результаты по задачам

+ @@ -419,6 +430,7 @@

Детальные результаты по задачам

+ @@ -453,6 +465,7 @@

Детальные результаты по задачам

+ @@ -481,6 +494,7 @@

Детальные результаты по задачам

+ @@ -511,6 +525,7 @@

Детальные результаты по задачам

+ @@ -542,6 +557,7 @@

Детальные результаты по задачам

+ @@ -573,6 +589,7 @@

Детальные результаты по задачам

+ @@ -602,6 +619,7 @@

Детальные результаты по задачам

+ @@ -633,6 +651,7 @@

Детальные результаты по задачам

+ @@ -663,6 +682,7 @@

Детальные результаты по задачам

+ @@ -695,6 +715,7 @@

Детальные результаты по задачам

+ @@ -725,6 +746,7 @@

Детальные результаты по задачам

+ @@ -756,6 +778,7 @@

Детальные результаты по задачам

+ @@ -783,6 +806,7 @@

Детальные результаты по задачам

+ @@ -814,6 +838,7 @@

Детальные результаты по задачам

+ @@ -844,6 +869,7 @@

Детальные результаты по задачам

+ @@ -878,6 +904,7 @@

Детальные результаты по задачам

+ @@ -904,6 +931,7 @@

Детальные результаты по задачам

+ @@ -934,6 +962,7 @@

Детальные результаты по задачам

+ @@ -967,6 +996,7 @@

Детальные результаты по задачам

+ @@ -991,6 +1021,7 @@

Детальные результаты по задачам

+ @@ -1022,6 +1053,7 @@

Детальные результаты по задачам

+ @@ -1053,6 +1085,7 @@

Детальные результаты по задачам

+ @@ -1081,6 +1114,7 @@

Детальные результаты по задачам

+ @@ -1109,6 +1143,7 @@

Детальные результаты по задачам

+ @@ -1142,6 +1177,7 @@

Детальные результаты по задачам

+ @@ -1166,6 +1202,7 @@

Детальные результаты по задачам

+ @@ -1197,6 +1234,7 @@

Детальные результаты по задачам

+ @@ -1226,6 +1264,7 @@

Детальные результаты по задачам

+ @@ -1255,6 +1294,7 @@

Детальные результаты по задачам

+ @@ -1286,6 +1326,7 @@

Детальные результаты по задачам

+ @@ -1312,6 +1353,7 @@

Детальные результаты по задачам

+ @@ -1347,6 +1389,7 @@

Детальные результаты по задачам

+ @@ -1372,6 +1415,7 @@

Детальные результаты по задачам

+ @@ -1405,6 +1449,7 @@

Детальные результаты по задачам

+ @@ -1434,6 +1479,7 @@

Детальные результаты по задачам

+ @@ -1459,6 +1505,7 @@

Детальные результаты по задачам

+ @@ -1492,6 +1539,7 @@

Детальные результаты по задачам

+ @@ -1521,6 +1569,7 @@

Детальные результаты по задачам

+ @@ -1546,6 +1595,7 @@

Детальные результаты по задачам

+ @@ -1574,6 +1624,7 @@

Детальные результаты по задачам

+ @@ -1608,6 +1659,7 @@

Детальные результаты по задачам

+ @@ -1637,6 +1689,7 @@

Детальные результаты по задачам

+ @@ -1666,6 +1719,7 @@

Детальные результаты по задачам

+ @@ -1692,6 +1746,7 @@

Детальные результаты по задачам

+ @@ -1719,6 +1774,7 @@

Детальные результаты по задачам

+ @@ -1750,6 +1806,7 @@

Детальные результаты по задачам

+ @@ -1779,6 +1836,7 @@

Детальные результаты по задачам

+ @@ -1812,6 +1870,7 @@

Детальные результаты по задачам

+ @@ -1841,6 +1900,7 @@

Детальные результаты по задачам

+ @@ -1865,6 +1925,7 @@

Детальные результаты по задачам

+ @@ -1899,6 +1960,7 @@

Детальные результаты по задачам

+ @@ -1925,6 +1987,7 @@

Детальные результаты по задачам

+ @@ -1952,6 +2015,7 @@

Детальные результаты по задачам

+ @@ -1983,6 +2047,7 @@

Детальные результаты по задачам

+ @@ -2012,6 +2077,7 @@

Детальные результаты по задачам

+ @@ -2044,6 +2110,7 @@

Детальные результаты по задачам

+ @@ -2073,6 +2140,7 @@

Детальные результаты по задачам

+ @@ -2099,6 +2167,7 @@

Детальные результаты по задачам

+ @@ -2129,6 +2198,7 @@

Детальные результаты по задачам

+ @@ -2159,6 +2229,7 @@

Детальные результаты по задачам

+ @@ -2186,6 +2257,7 @@

Детальные результаты по задачам

+ @@ -2214,6 +2286,7 @@

Детальные результаты по задачам

+ @@ -2248,6 +2321,7 @@

Детальные результаты по задачам

+ @@ -2274,6 +2348,7 @@

Детальные результаты по задачам

+ @@ -2307,6 +2382,7 @@

Детальные результаты по задачам

+ @@ -2336,6 +2412,7 @@

Детальные результаты по задачам

+ @@ -2361,6 +2438,7 @@

Детальные результаты по задачам

+ @@ -2395,6 +2473,7 @@

Детальные результаты по задачам

+ @@ -2421,6 +2500,7 @@

Детальные результаты по задачам

+ @@ -2454,6 +2534,7 @@

Детальные результаты по задачам

+ @@ -2483,6 +2564,7 @@

Детальные результаты по задачам

+ @@ -2512,6 +2594,7 @@

Детальные результаты по задачам

+ @@ -2541,6 +2624,7 @@

Детальные результаты по задачам

+ @@ -2565,6 +2649,7 @@

Детальные результаты по задачам

+ @@ -2597,6 +2682,7 @@

Детальные результаты по задачам

+ @@ -2626,6 +2712,7 @@

Детальные результаты по задачам

+ @@ -2658,6 +2745,7 @@

Детальные результаты по задачам

+ @@ -2687,6 +2775,7 @@

Детальные результаты по задачам

+ @@ -2716,6 +2805,7 @@

Детальные результаты по задачам

+ @@ -2745,6 +2835,7 @@

Детальные результаты по задачам

+ @@ -2774,6 +2865,7 @@

Детальные результаты по задачам

+ @@ -2800,6 +2892,7 @@

Детальные результаты по задачам

+ @@ -2829,6 +2922,7 @@

Детальные результаты по задачам

+ @@ -2860,6 +2954,7 @@

Детальные результаты по задачам

+ @@ -2890,6 +2985,7 @@

Детальные результаты по задачам

+ @@ -2916,6 +3012,7 @@

Детальные результаты по задачам

+ @@ -2946,6 +3043,7 @@

Детальные результаты по задачам

+ @@ -2973,6 +3071,7 @@

Детальные результаты по задачам

+ @@ -3004,6 +3103,7 @@

Детальные результаты по задачам

+ @@ -3037,6 +3137,7 @@

Детальные результаты по задачам

+ @@ -3063,6 +3164,7 @@

Детальные результаты по задачам

+ @@ -3095,6 +3197,7 @@

Детальные результаты по задачам

+ @@ -3124,6 +3227,7 @@

Детальные результаты по задачам

+ @@ -3150,6 +3254,7 @@

Детальные результаты по задачам

+ @@ -3179,6 +3284,7 @@

Детальные результаты по задачам

+ @@ -3213,6 +3319,7 @@

Детальные результаты по задачам

+ @@ -3243,6 +3350,7 @@

Детальные результаты по задачам

+ @@ -3269,6 +3377,7 @@

Детальные результаты по задачам

+ @@ -3301,6 +3410,7 @@

Детальные результаты по задачам

+ @@ -3325,6 +3435,7 @@

Детальные результаты по задачам

+ @@ -3360,6 +3471,7 @@

Детальные результаты по задачам

+ @@ -3386,6 +3498,7 @@

Детальные результаты по задачам

+ @@ -3418,6 +3531,7 @@

Детальные результаты по задачам

+ @@ -3447,6 +3561,7 @@

Детальные результаты по задачам

+ @@ -3476,6 +3591,7 @@

Детальные результаты по задачам

+ @@ -3505,6 +3621,7 @@

Детальные результаты по задачам

+ @@ -3531,6 +3648,7 @@

Детальные результаты по задачам

+ @@ -3562,6 +3680,7 @@

Детальные результаты по задачам

+ @@ -3589,6 +3708,7 @@

Детальные результаты по задачам

+ @@ -3618,6 +3738,7 @@

Детальные результаты по задачам

+ @@ -3647,6 +3768,7 @@

Детальные результаты по задачам

+ @@ -3674,6 +3796,7 @@

Детальные результаты по задачам

+ @@ -3708,6 +3831,7 @@

Детальные результаты по задачам

+ @@ -3736,6 +3860,7 @@

Детальные результаты по задачам

+ @@ -3762,6 +3887,7 @@

Детальные результаты по задачам

+ @@ -3795,6 +3921,7 @@

Детальные результаты по задачам

+ @@ -3821,6 +3948,7 @@

Детальные результаты по задачам

+ @@ -3853,6 +3981,7 @@

Детальные результаты по задачам

+ @@ -3882,6 +4011,7 @@

Детальные результаты по задачам

+ @@ -3908,6 +4038,7 @@

Детальные результаты по задачам

+ @@ -3937,6 +4068,7 @@

Детальные результаты по задачам

+ @@ -3966,6 +4098,7 @@

Детальные результаты по задачам

+ @@ -3998,6 +4131,7 @@

Детальные результаты по задачам

+ @@ -4024,6 +4158,7 @@

Детальные результаты по задачам

+ @@ -4053,6 +4188,7 @@

Детальные результаты по задачам

+ @@ -4082,6 +4218,7 @@

Детальные результаты по задачам

+ @@ -4114,6 +4251,7 @@

Детальные результаты по задачам

+ @@ -4143,6 +4281,7 @@

Детальные результаты по задачам

+ @@ -4169,6 +4308,7 @@

Детальные результаты по задачам

+ @@ -4199,6 +4339,7 @@

Детальные результаты по задачам

+ @@ -4228,6 +4369,7 @@

Детальные результаты по задачам

+ @@ -4258,6 +4400,7 @@

Детальные результаты по задачам

+ @@ -4290,6 +4433,7 @@

Детальные результаты по задачам

+ @@ -4319,6 +4463,7 @@

Детальные результаты по задачам

+ @@ -4345,6 +4490,7 @@

Детальные результаты по задачам

+ @@ -4373,6 +4519,7 @@

Детальные результаты по задачам

+ @@ -4406,6 +4553,7 @@

Детальные результаты по задачам

+ @@ -4431,6 +4579,7 @@

Детальные результаты по задачам

+ @@ -4462,6 +4611,7 @@

Детальные результаты по задачам

+ @@ -4491,6 +4641,7 @@

Детальные результаты по задачам

+ @@ -4524,6 +4675,7 @@

Детальные результаты по задачам

+ @@ -4550,6 +4702,7 @@

Детальные результаты по задачам

+ @@ -4579,6 +4732,7 @@

Детальные результаты по задачам

+ @@ -4608,6 +4762,7 @@

Детальные результаты по задачам

+ @@ -4637,6 +4792,7 @@

Детальные результаты по задачам

+ @@ -4666,6 +4822,7 @@

Детальные результаты по задачам

+ @@ -4696,6 +4853,7 @@

Детальные результаты по задачам

+ @@ -4728,6 +4886,7 @@

Детальные результаты по задачам

+ @@ -4754,6 +4913,7 @@

Детальные результаты по задачам

+ @@ -4786,6 +4946,7 @@

Детальные результаты по задачам

+ @@ -4812,6 +4973,7 @@

Детальные результаты по задачам

+ @@ -4841,6 +5003,7 @@

Детальные результаты по задачам

+ @@ -4868,6 +5031,7 @@

Детальные результаты по задачам

+ @@ -4898,6 +5062,7 @@

Детальные результаты по задачам

+ @@ -4931,5 +5096,6 @@

Детальные результаты по задачам

+
moonshotai_kimi_k283%
deepseek_deepseek_chat_v3_032482%
google_gemini_2_5_flash_preview82%
openai_gpt_oss_120b82%
deepseek_deepseek_chat_free79%
google_gemini_2_0_flash_lite_00179%
google_gemini_2_5_flash_lite_preview_06_1778%
ollama_codellama_34b ollama_llama3_2 openai_gpt_4o_miniopenai_gpt_oss_120b openai_gpt_oss_20b openai_o3_mini_high qwen_qwen2_5_vl_3b_instruct_free
t1
t120
t123
t129
t135
t137
t138
t14
t140
t143
t144
t145
t15
t150
t152
t157
t158
t160
t163
t18
t19
t20
t22
t23
t24
t25
t29
t3
t30
t31
t32
t35
t36
t40
t42
t43
t46
t47
t49
t50
t52
t53
t54
t55
t57
t61
t62
t64
t66
t67
t70
t74
t75
t8
t80
t83
t87
t93
t95
diff --git a/reports/human_eval_for_ruby_report_total.html b/reports/human_eval_for_ruby_report_total.html index 45d1f2e..40347ba 100644 --- a/reports/human_eval_for_ruby_report_total.html +++ b/reports/human_eval_for_ruby_report_total.html @@ -64,7 +64,7 @@

Суммарный отчет о тестировании моделей

-

Дата: 2025-08-09 18:04:26

+

Дата: 2025-08-09 18:29:10

@@ -75,6 +75,7 @@

Суммарный отчет о тестировании моделей

+ diff --git a/reports/test_results.json b/reports/test_results.json index 8c22dda..439b00a 100644 --- a/reports/test_results.json +++ b/reports/test_results.json @@ -1,5 +1,5 @@ { - "timestamp": "2025-08-09 18:04:26", + "timestamp": "2025-08-09 18:29:10", "models": [ [ "google_gemma_3_9b_it", @@ -29,6 +29,10 @@ "google_gemini_2_5_flash_preview", 82 ], + [ + "openai_gpt_oss_120b", + 82 + ], [ "deepseek_deepseek_chat_free", 79 @@ -143,6 +147,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -172,6 +177,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -203,6 +209,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -233,6 +240,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -263,6 +271,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -294,6 +303,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -323,6 +333,7 @@ "ollama_codellama_13b": true, "ollama_codellama_34b": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -353,6 +364,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -383,6 +395,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -413,6 +426,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -443,6 +457,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -473,6 +488,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -503,6 +519,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -534,6 +551,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -564,6 +582,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -594,6 +613,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -625,6 +645,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -656,6 +677,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -687,6 +709,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -717,6 +740,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -748,6 +772,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -777,6 +802,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -806,6 +832,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -836,6 +863,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -866,6 +894,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -896,6 +925,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -926,6 +956,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -956,6 +987,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -985,6 +1017,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": true, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1014,6 +1047,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1043,6 +1077,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1073,6 +1108,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1102,6 +1138,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1131,6 +1168,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1160,6 +1198,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": false, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1189,6 +1228,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1218,6 +1258,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1247,6 +1288,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1277,6 +1319,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1306,6 +1349,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1336,6 +1380,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1365,6 +1410,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1394,6 +1440,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1423,6 +1470,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1452,6 +1500,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1481,6 +1530,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1510,6 +1560,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1539,6 +1590,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1568,6 +1620,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1597,6 +1650,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1626,6 +1680,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1655,6 +1710,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1684,6 +1740,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1713,6 +1770,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1742,6 +1800,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1771,6 +1830,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1800,6 +1860,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1830,6 +1891,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1859,6 +1921,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": false, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1888,6 +1951,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -1917,6 +1981,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1946,6 +2011,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -1975,6 +2041,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2004,6 +2071,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2033,6 +2101,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2062,6 +2131,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2091,6 +2161,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2120,6 +2191,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2149,6 +2221,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2178,6 +2251,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2207,6 +2281,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2237,6 +2312,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2266,6 +2342,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2296,6 +2373,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2325,6 +2403,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2354,6 +2433,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2384,6 +2464,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2413,6 +2494,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2442,6 +2524,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2472,6 +2555,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2501,6 +2585,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2530,6 +2615,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2559,6 +2645,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": false, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2589,6 +2676,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2618,6 +2706,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2647,6 +2736,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2676,6 +2766,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2705,6 +2796,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2734,6 +2826,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2763,6 +2856,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2792,6 +2886,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2821,6 +2916,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2850,6 +2946,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2879,6 +2976,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -2908,6 +3006,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2938,6 +3037,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2967,6 +3067,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": true, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -2996,6 +3097,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3026,6 +3128,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3055,6 +3158,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3084,6 +3188,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3113,6 +3218,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3142,6 +3248,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3171,6 +3278,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3201,6 +3309,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3231,6 +3340,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3261,6 +3371,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3290,6 +3401,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3319,6 +3431,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3349,6 +3462,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3378,6 +3492,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3407,6 +3522,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3436,6 +3552,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3465,6 +3582,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3494,6 +3612,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3523,6 +3642,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3552,6 +3672,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3581,6 +3702,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3610,6 +3732,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3639,6 +3762,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3668,6 +3792,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3697,6 +3822,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3726,6 +3852,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3755,6 +3882,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3784,6 +3912,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3813,6 +3942,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3842,6 +3972,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3871,6 +4002,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -3900,6 +4032,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3929,6 +4062,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3958,6 +4092,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -3987,6 +4122,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -4016,6 +4152,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4045,6 +4182,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4074,6 +4212,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4103,6 +4242,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -4132,6 +4272,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -4161,6 +4302,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4191,6 +4333,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4220,6 +4363,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4250,6 +4394,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4279,6 +4424,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -4308,6 +4454,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -4337,6 +4484,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4366,6 +4514,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4395,6 +4544,7 @@ "ollama_codellama_34b": true, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -4425,6 +4575,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4454,6 +4605,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4483,6 +4635,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4512,6 +4665,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": false, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4542,6 +4696,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4571,6 +4726,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4600,6 +4756,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4629,6 +4786,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4658,6 +4816,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4688,6 +4847,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4717,6 +4877,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -4746,6 +4907,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4775,6 +4937,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -4804,6 +4967,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4833,6 +4997,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4862,6 +5027,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": true, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": false, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": false, @@ -4891,6 +5057,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": true, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": false, "qwen_qwen2_5_vl_3b_instruct_free": true, @@ -4920,6 +5087,7 @@ "ollama_codellama_34b": false, "ollama_llama3_2": false, "openai_gpt_4o_mini": false, + "openai_gpt_oss_120b": true, "openai_gpt_oss_20b": true, "openai_o3_mini_high": true, "qwen_qwen2_5_vl_3b_instruct_free": true, diff --git a/reports/total.md b/reports/total.md index daaede3..a1eec79 100644 --- a/reports/total.md +++ b/reports/total.md @@ -7,6 +7,7 @@ - moonshotai_kimi_k2: 83% - deepseek_deepseek_chat_v3_0324: 82% - google_gemini_2_5_flash_preview: 82% +- openai_gpt_oss_120b: 82% - deepseek_deepseek_chat_free: 79% - google_gemini_2_0_flash_lite_001: 79% - google_gemini_2_5_flash_lite_preview_06_17: 78% diff --git a/tasks/t0-openai_gpt_oss_120b.rb b/tasks/t0-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..6182141 --- /dev/null +++ b/tasks/t0-openai_gpt_oss_120b.rb @@ -0,0 +1,8 @@ +def has_close_elements(numbers, threshold) + return false if numbers.length < 2 + sorted = numbers.sort + (0...sorted.length - 1).each do |i| + return true if (sorted[i + 1] - sorted[i]).abs <= threshold + end + false +end \ No newline at end of file diff --git a/tasks/t0-openai_gpt_oss_20b.rb b/tasks/t0-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..df344a6 --- /dev/null +++ b/tasks/t0-openai_gpt_oss_20b.rb @@ -0,0 +1,9 @@ +def has_close_elements(numbers, threshold) + return false if numbers.size < 2 + numbers.each_with_index do |num, i| + (i + 1...numbers.size).each do |j| + return true if (num - numbers[j]).abs <= threshold + end + end + false +end \ No newline at end of file diff --git a/tasks/t1-openai_gpt_oss_120b.rb b/tasks/t1-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..137da5f --- /dev/null +++ b/tasks/t1-openai_gpt_oss_120b.rb @@ -0,0 +1,25 @@ +def separate_paren_groups(paren_string) + result = [] + buffer = '' + depth = 0 + paren_string.each_char do |ch| + next if ch == ' ' + if ch == '(' + buffer << ch + depth += 1 + elsif ch == ')' + if depth > 0 + buffer << ch + depth -= 1 + if depth == 0 + result << buffer + buffer = '' + end + else + # stray closing parenthesis, ignore + next + end + end + end + result +end \ No newline at end of file diff --git a/tasks/t1-openai_gpt_oss_20b.rb b/tasks/t1-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..9fd8d0e --- /dev/null +++ b/tasks/t1-openai_gpt_oss_20b.rb @@ -0,0 +1,23 @@ +def separate_paren_groups(paren_string) + clean = paren_string.gsub(/\s+/, '') + result = [] + depth = 0 + start = nil + clean.chars.each_with_index do |c, i| + case c + when '(' + depth += 1 + start = i if depth == 1 + when ')' + if depth == 0 + next + end + depth -= 1 + if depth == 0 && start + result << clean[start..i] + start = nil + end + end + end + result +end \ No newline at end of file diff --git a/tasks/t10-openai_gpt_oss_120b.rb b/tasks/t10-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..79ecb2b --- /dev/null +++ b/tasks/t10-openai_gpt_oss_120b.rb @@ -0,0 +1,12 @@ +def make_palindrome(string) + rev = string.reverse + n = string.length + match_len = 0 + n.downto(0) do |i| + if string[-i, i] == rev[0, i] + match_len = i + break + end + end + string + rev[match_len..-1].to_s +end \ No newline at end of file diff --git a/tasks/t10-openai_gpt_oss_20b.rb b/tasks/t10-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..012413c --- /dev/null +++ b/tasks/t10-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def make_palindrome(string) + n = string.length + (0..n).each do |i| + candidate = string + string[0...i].reverse + return candidate if candidate == candidate.reverse + end + string +end \ No newline at end of file diff --git a/tasks/t100-openai_gpt_oss_120b.rb b/tasks/t100-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..9d29b67 --- /dev/null +++ b/tasks/t100-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def make_a_pile(n) + result = [] + current = n + n.times do + result << current + current += 2 + end + result +end \ No newline at end of file diff --git a/tasks/t100-openai_gpt_oss_20b.rb b/tasks/t100-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..b8b8825 --- /dev/null +++ b/tasks/t100-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def make_a_pile(n) + (0...n).map { |i| n + 2 * i } +end \ No newline at end of file diff --git a/tasks/t101-openai_gpt_oss_120b.rb b/tasks/t101-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..da249f5 --- /dev/null +++ b/tasks/t101-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def words_string(s) + s.split(/[,\s]+/).reject(&:empty?) +end \ No newline at end of file diff --git a/tasks/t101-openai_gpt_oss_20b.rb b/tasks/t101-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..b7b08be --- /dev/null +++ b/tasks/t101-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def words_string(s) + s.split(/[,\s]+/) +end \ No newline at end of file diff --git a/tasks/t102-openai_gpt_oss_120b.rb b/tasks/t102-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..42103c1 --- /dev/null +++ b/tasks/t102-openai_gpt_oss_120b.rb @@ -0,0 +1,5 @@ +def choose_num(x, y) + return -1 if x > y + candidate = y - (y % 2) + candidate >= x ? candidate : -1 +end \ No newline at end of file diff --git a/tasks/t102-openai_gpt_oss_20b.rb b/tasks/t102-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..5b1f1c5 --- /dev/null +++ b/tasks/t102-openai_gpt_oss_20b.rb @@ -0,0 +1,5 @@ +def choose_num(x, y) + return -1 if y < x + candidate = y.even? ? y : y - 1 + candidate >= x ? candidate : -1 +end \ No newline at end of file diff --git a/tasks/t103-openai_gpt_oss_120b.rb b/tasks/t103-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..bb90c1d --- /dev/null +++ b/tasks/t103-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +def rounded_avg(n, m) + return -1 if n > m + count = m - n + 1 + sum = (n + m) * count / 2 + avg = (sum.to_f / count).round + "0b" + avg.to_s(2) +end \ No newline at end of file diff --git a/tasks/t103-openai_gpt_oss_20b.rb b/tasks/t103-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..e62b84e --- /dev/null +++ b/tasks/t103-openai_gpt_oss_20b.rb @@ -0,0 +1,5 @@ +def rounded_avg(n, m) + return -1 if n > m + avg = ((n + m).to_f / 2).round + "0b" + avg.to_s(2) +end \ No newline at end of file diff --git a/tasks/t104-openai_gpt_oss_120b.rb b/tasks/t104-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..2a6db73 --- /dev/null +++ b/tasks/t104-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def unique_digits(numbers) + numbers.select { |n| n.to_s.chars.all? { |c| c.to_i.odd? } }.sort +end \ No newline at end of file diff --git a/tasks/t104-openai_gpt_oss_20b.rb b/tasks/t104-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..2a6db73 --- /dev/null +++ b/tasks/t104-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def unique_digits(numbers) + numbers.select { |n| n.to_s.chars.all? { |c| c.to_i.odd? } }.sort +end \ No newline at end of file diff --git a/tasks/t105-openai_gpt_oss_120b.rb b/tasks/t105-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..6edff0e --- /dev/null +++ b/tasks/t105-openai_gpt_oss_120b.rb @@ -0,0 +1,6 @@ +def by_length(arr) + words = {1 => "One", 2 => "Two", 3 => "Three", 4 => "Four", 5 => "Five", 6 => "Six", 7 => "Seven", 8 => "Eight", 9 => "Nine"} + arr.select { |n| n.between?(1, 9) } + .sort { |a, b| b <=> a } + .map { |n| words[n] } +end \ No newline at end of file diff --git a/tasks/t105-openai_gpt_oss_20b.rb b/tasks/t105-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..1b6e6d9 --- /dev/null +++ b/tasks/t105-openai_gpt_oss_20b.rb @@ -0,0 +1,7 @@ +def by_length(arr) + words = {1=>"One",2=>"Two",3=>"Three",4=>"Four",5=>"Five",6=>"Six",7=>"Seven",8=>"Eight",9=>"Nine"} + arr.select { |x| x.between?(1,9) } + .sort + .reverse + .map { |x| words[x] } +end \ No newline at end of file diff --git a/tasks/t106-openai_gpt_oss_120b.rb b/tasks/t106-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..f9d34fd --- /dev/null +++ b/tasks/t106-openai_gpt_oss_120b.rb @@ -0,0 +1,13 @@ +def f(n) + result = [] + fact = 1 + (1..n).each do |i| + if i.even? + fact *= i + result << fact + else + result << i * (i + 1) / 2 + end + end + result +end \ No newline at end of file diff --git a/tasks/t106-openai_gpt_oss_20b.rb b/tasks/t106-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..effd788 --- /dev/null +++ b/tasks/t106-openai_gpt_oss_20b.rb @@ -0,0 +1,13 @@ +def f(n) + result = [] + (1..n).each do |i| + if i.even? + fact = 1 + (1..i).each { |j| fact *= j } + result << fact + else + result << i * (i + 1) / 2 + end + end + result +end \ No newline at end of file diff --git a/tasks/t107-openai_gpt_oss_120b.rb b/tasks/t107-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..4defa00 --- /dev/null +++ b/tasks/t107-openai_gpt_oss_120b.rb @@ -0,0 +1,14 @@ +def even_odd_palindrome(n) + even = 0 + odd = 0 + (1..n).each do |i| + str = i.to_s + next unless str == str.reverse + if i.even? + even += 1 + else + odd += 1 + end + end + [even, odd] +end \ No newline at end of file diff --git a/tasks/t107-openai_gpt_oss_20b.rb b/tasks/t107-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..c44dc19 --- /dev/null +++ b/tasks/t107-openai_gpt_oss_20b.rb @@ -0,0 +1,15 @@ +def even_odd_palindrome(n) + even_count = 0 + odd_count = 0 + (1..n).each do |i| + str = i.to_s + if str == str.reverse + if i.even? + even_count += 1 + else + odd_count += 1 + end + end + end + [even_count, odd_count] +end \ No newline at end of file diff --git a/tasks/t108-openai_gpt_oss_120b.rb b/tasks/t108-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..ea5d2f0 --- /dev/null +++ b/tasks/t108-openai_gpt_oss_120b.rb @@ -0,0 +1,13 @@ +def sum_digits_with_sign(num) + sign = num < 0 ? -1 : 1 + digits = num.abs.to_s.chars.map { |c| c.ord - 48 } + sum = 0 + digits.each_with_index do |d, i| + sum += i.zero? ? d * sign : d + end + sum +end + +def count_nums(arr) + arr.count { |n| sum_digits_with_sign(n) > 0 } +end \ No newline at end of file diff --git a/tasks/t108-openai_gpt_oss_20b.rb b/tasks/t108-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..c0a7955 --- /dev/null +++ b/tasks/t108-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def count_nums(arr) + arr.count do |n| + digits = n.abs.to_s.chars.map(&:to_i) + sum = digits.sum + sum -= 2 * digits[0] if n < 0 + sum > 0 + end +end \ No newline at end of file diff --git a/tasks/t109-openai_gpt_oss_120b.rb b/tasks/t109-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..c1797ee --- /dev/null +++ b/tasks/t109-openai_gpt_oss_120b.rb @@ -0,0 +1,10 @@ +def move_one_ball(arr) + return true if arr.empty? + n = arr.length + breaks = 0 + n.times do |i| + breaks += 1 if arr[i] > arr[(i + 1) % n] + return false if breaks > 1 + end + true +end \ No newline at end of file diff --git a/tasks/t109-openai_gpt_oss_20b.rb b/tasks/t109-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..fa09ebc --- /dev/null +++ b/tasks/t109-openai_gpt_oss_20b.rb @@ -0,0 +1,11 @@ +def move_one_ball(arr) + return true if arr.empty? + sorted = arr.sort + n = arr.size + start_index = sorted.index(arr[0]) + return false unless start_index + n.times do |i| + return false unless arr[i] == sorted[(start_index + i) % n] + end + true +end \ No newline at end of file diff --git a/tasks/t11-openai_gpt_oss_120b.rb b/tasks/t11-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..2665902 --- /dev/null +++ b/tasks/t11-openai_gpt_oss_120b.rb @@ -0,0 +1,10 @@ +def string_xor(a, b) + min_len = [a.length, b.length].min + result = +'' + i = 0 + while i < min_len + result << (a[i] == b[i] ? '0' : '1') + i += 1 + end + result +end \ No newline at end of file diff --git a/tasks/t11-openai_gpt_oss_20b.rb b/tasks/t11-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..42c0e58 --- /dev/null +++ b/tasks/t11-openai_gpt_oss_20b.rb @@ -0,0 +1,4 @@ +def string_xor(a, b) + min_len = [a.length, b.length].min + (0...min_len).map { |i| a[i] == b[i] ? '0' : '1' }.join +end \ No newline at end of file diff --git a/tasks/t110-openai_gpt_oss_120b.rb b/tasks/t110-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..958c049 --- /dev/null +++ b/tasks/t110-openai_gpt_oss_120b.rb @@ -0,0 +1,5 @@ +def exchange(lst1, lst2) + odd_count = lst1.count { |x| x.odd? } + even_count = lst2.count { |x| x.even? } + odd_count <= even_count ? "YES" : "NO" +end \ No newline at end of file diff --git a/tasks/t110-openai_gpt_oss_20b.rb b/tasks/t110-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..bb48707 --- /dev/null +++ b/tasks/t110-openai_gpt_oss_20b.rb @@ -0,0 +1,5 @@ +def exchange(lst1, lst2) + odd_in_lst1 = lst1.count { |x| x.odd? } + even_in_lst2 = lst2.count { |x| x.even? } + odd_in_lst1 <= even_in_lst2 ? "YES" : "NO" +end \ No newline at end of file diff --git a/tasks/t111-openai_gpt_oss_120b.rb b/tasks/t111-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..4c0d1ad --- /dev/null +++ b/tasks/t111-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def histogram(text) + counts = Hash.new(0) + text.each_char do |ch| + counts[ch] += 1 if ch =~ /[a-z]/ + end + return {} if counts.empty? + max_freq = counts.values.max + counts.select { |_, v| v == max_freq } +end \ No newline at end of file diff --git a/tasks/t111-openai_gpt_oss_20b.rb b/tasks/t111-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..c6b47e4 --- /dev/null +++ b/tasks/t111-openai_gpt_oss_20b.rb @@ -0,0 +1,13 @@ +def histogram(text) + counts = Hash.new(0) + text.each_char do |ch| + counts[ch] += 1 if ch =~ /[a-z]/ + end + max_freq = counts.values.max + return {} unless max_freq && max_freq > 0 + result = {} + counts.each do |letter, freq| + result[letter] = freq if freq == max_freq + end + result +end \ No newline at end of file diff --git a/tasks/t112-openai_gpt_oss_120b.rb b/tasks/t112-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..3bb95d7 --- /dev/null +++ b/tasks/t112-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +require 'set' + +def reverse_delete(s, c) + chars = c.chars.to_set + result = s.chars.reject { |ch| chars.include?(ch) }.join + [result, result == result.reverse] +end \ No newline at end of file diff --git a/tasks/t112-openai_gpt_oss_20b.rb b/tasks/t112-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..dcdc0f0 --- /dev/null +++ b/tasks/t112-openai_gpt_oss_20b.rb @@ -0,0 +1,5 @@ +def reverse_delete(s, c) + result = s.chars.reject { |ch| c.include?(ch) }.join + palindrome = result == result.reverse + [result, palindrome] +end \ No newline at end of file diff --git a/tasks/t113-openai_gpt_oss_120b.rb b/tasks/t113-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..69d0ae9 --- /dev/null +++ b/tasks/t113-openai_gpt_oss_120b.rb @@ -0,0 +1,6 @@ +def odd_count(strings) + strings.map do |s| + cnt = s.count { |ch| ch.ord.odd? } + "the number of odd elements #{cnt}n the str#{cnt}ng #{cnt} of the #{cnt}nput." + end +end \ No newline at end of file diff --git a/tasks/t113-openai_gpt_oss_20b.rb b/tasks/t113-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..5cb5830 --- /dev/null +++ b/tasks/t113-openai_gpt_oss_20b.rb @@ -0,0 +1,6 @@ +def odd_count(strings) + strings.map do |s| + odd_count = s.count('13579') + "the number of odd elements #{odd_count}n the str#{odd_count}ng #{odd_count}nput." + end +end \ No newline at end of file diff --git a/tasks/t114-openai_gpt_oss_120b.rb b/tasks/t114-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..225bb39 --- /dev/null +++ b/tasks/t114-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def min_sub_array_sum(nums) + current_min = nums[0] + min_sum = nums[0] + nums[1..-1].each do |x| + current_min = [current_min + x, x].min + min_sum = [min_sum, current_min].min + end + min_sum +end \ No newline at end of file diff --git a/tasks/t114-openai_gpt_oss_20b.rb b/tasks/t114-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..36aec86 --- /dev/null +++ b/tasks/t114-openai_gpt_oss_20b.rb @@ -0,0 +1,9 @@ +def min_sub_array_sum(nums) + current_min = nums[0] + best_min = nums[0] + nums[1..-1].each do |x| + current_min = [x, current_min + x].min + best_min = [best_min, current_min].min + end + best_min +end \ No newline at end of file diff --git a/tasks/t115-openai_gpt_oss_120b.rb b/tasks/t115-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..89746fa --- /dev/null +++ b/tasks/t115-openai_gpt_oss_120b.rb @@ -0,0 +1,5 @@ +def max_fill(grid, capacity) + total = grid.reduce(0) { |sum, row| sum + row.sum } + return 0 if total == 0 + (total + capacity - 1) / capacity +end \ No newline at end of file diff --git a/tasks/t115-openai_gpt_oss_20b.rb b/tasks/t115-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..b1054ff --- /dev/null +++ b/tasks/t115-openai_gpt_oss_20b.rb @@ -0,0 +1,4 @@ +def max_fill(grid, capacity) + total = grid.flatten.sum + (total + capacity - 1) / capacity +end \ No newline at end of file diff --git a/tasks/t116-openai_gpt_oss_120b.rb b/tasks/t116-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..d760bfc --- /dev/null +++ b/tasks/t116-openai_gpt_oss_120b.rb @@ -0,0 +1,4 @@ +def sort_array(arr) + return arr.sort if arr.any? { |x| x < 0 } + arr.sort_by { |x| [x.to_s(2).count('1'), x] } +end \ No newline at end of file diff --git a/tasks/t116-openai_gpt_oss_20b.rb b/tasks/t116-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..815f058 --- /dev/null +++ b/tasks/t116-openai_gpt_oss_20b.rb @@ -0,0 +1,6 @@ +def sort_array(arr) + negatives, non_negatives = arr.partition { |x| x < 0 } + sorted_negatives = negatives.sort + sorted_non_negatives = non_negatives.sort_by { |x| [x.to_s(2).count('1'), x] } + sorted_negatives + sorted_non_negatives +end \ No newline at end of file diff --git a/tasks/t117-openai_gpt_oss_120b.rb b/tasks/t117-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..46ac1e9 --- /dev/null +++ b/tasks/t117-openai_gpt_oss_120b.rb @@ -0,0 +1,6 @@ +def select_words(s, n) + vowels = /[AEIOUaeiou]/ + s.split.select do |word| + word.count { |ch| ch =~ /[A-Za-z]/ && ch !~ vowels } == n + end +end \ No newline at end of file diff --git a/tasks/t117-openai_gpt_oss_20b.rb b/tasks/t117-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..f339aff --- /dev/null +++ b/tasks/t117-openai_gpt_oss_20b.rb @@ -0,0 +1,7 @@ +def select_words(s, n) + vowels = /[aeiouAEIOU]/ + s.split.select do |word| + consonant_count = word.chars.count { |c| c =~ /[A-Za-z]/ && !c.match?(vowels) } + consonant_count == n + end +end \ No newline at end of file diff --git a/tasks/t118-openai_gpt_oss_120b.rb b/tasks/t118-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..feb816c --- /dev/null +++ b/tasks/t118-openai_gpt_oss_120b.rb @@ -0,0 +1,14 @@ +def get_closest_vowel(word) + vowels = "aeiouAEIOU" + return "" if word.length < 3 + (word.length - 2).downto(1) do |i| + char = word[i] + next unless vowels.include?(char) + left = word[i - 1] + right = word[i + 1] + unless vowels.include?(left) || vowels.include?(right) + return char + end + end + "" +end \ No newline at end of file diff --git a/tasks/t118-openai_gpt_oss_20b.rb b/tasks/t118-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..67c7ff9 --- /dev/null +++ b/tasks/t118-openai_gpt_oss_20b.rb @@ -0,0 +1,14 @@ +def get_closest_vowel(word) + vowels = 'aeiouAEIOU' + len = word.length + return '' if len < 3 + (len - 2).downto(1) do |i| + char = word[i] + next unless vowels.include?(char) + left = word[i - 1] + right = word[i + 1] + next if vowels.include?(left) || vowels.include?(right) + return char + end + '' +end \ No newline at end of file diff --git a/tasks/t119-openai_gpt_oss_120b.rb b/tasks/t119-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..02a8f6c --- /dev/null +++ b/tasks/t119-openai_gpt_oss_120b.rb @@ -0,0 +1,13 @@ +def balanced?(s) + bal = 0 + s.each_char do |ch| + bal += ch == '(' ? 1 : -1 + return false if bal < 0 + end + bal == 0 +end + +def match_parens(lst) + s1, s2 = lst + balanced?(s1 + s2) || balanced?(s2 + s1) ? 'Yes' : 'No' +end \ No newline at end of file diff --git a/tasks/t119-openai_gpt_oss_20b.rb b/tasks/t119-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6f52229 --- /dev/null +++ b/tasks/t119-openai_gpt_oss_20b.rb @@ -0,0 +1,18 @@ +def match_parens(lst) + s, t = lst + bal = 0 + min_s = 0 + s.each_char do |c| + bal_s += (c == '(' ? 1 : -1) + min_s = [min_s, bal_s].min + end + bal_t = 0 + min_t = 0 + t.each_char do |c| + bal_t += (c == '(' ? 1 : -1) + min_t = [min_t, bal_t].min + end + ok1 = (bal_s + bal_t == 0) && (min_s >= 0) && (min_t + bal_s >= 0) + ok2 = (bal_s + bal_t == 0) && (min_t >= 0) && (min_s + bal_t >= 0) + ok1 || ok2 ? 'Yes' : 'No' +end \ No newline at end of file diff --git a/tasks/t12-openai_gpt_oss_120b.rb b/tasks/t12-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..abc64cd --- /dev/null +++ b/tasks/t12-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def longest(strings) + strings.max_by { |s| s.length } +end \ No newline at end of file diff --git a/tasks/t12-openai_gpt_oss_20b.rb b/tasks/t12-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..5b6cee2 --- /dev/null +++ b/tasks/t12-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def longest(strings) + strings.max_by(&:length) +end \ No newline at end of file diff --git a/tasks/t120-openai_gpt_oss_120b.rb b/tasks/t120-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..b046512 --- /dev/null +++ b/tasks/t120-openai_gpt_oss_120b.rb @@ -0,0 +1,4 @@ +def maximum(arr, k) + sorted = arr.sort + sorted[-k, k] || [] +end \ No newline at end of file diff --git a/tasks/t120-openai_gpt_oss_20b.rb b/tasks/t120-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6a1ae98 --- /dev/null +++ b/tasks/t120-openai_gpt_oss_20b.rb @@ -0,0 +1,4 @@ +def maximum(arr, k) + return [] if k == 0 + arr.sort.reverse.take(k).sort +end \ No newline at end of file diff --git a/tasks/t121-openai_gpt_oss_120b.rb b/tasks/t121-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..070a37c --- /dev/null +++ b/tasks/t121-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +def sum_odd_even_pos(lst) + sum = 0 + lst.each_with_index do |val, idx| + sum += val if idx.even? && val.odd? + end + sum +end \ No newline at end of file diff --git a/tasks/t121-openai_gpt_oss_20b.rb b/tasks/t121-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..1da5501 --- /dev/null +++ b/tasks/t121-openai_gpt_oss_20b.rb @@ -0,0 +1,7 @@ +def sum_odd_even_pos(lst) + sum = 0 + lst.each_with_index do |num, idx| + sum += num if idx.even? && num.odd? + end + sum +end \ No newline at end of file diff --git a/tasks/t122-openai_gpt_oss_120b.rb b/tasks/t122-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..34da516 --- /dev/null +++ b/tasks/t122-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +def add_elements(arr, k) + sum = 0 + arr.first(k).each do |num| + sum += num if num.abs <= 99 + end + sum +end \ No newline at end of file diff --git a/tasks/t122-openai_gpt_oss_20b.rb b/tasks/t122-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..a67d845 --- /dev/null +++ b/tasks/t122-openai_gpt_oss_20b.rb @@ -0,0 +1,7 @@ +def add_elements(arr, k) + sum = 0 + arr.first(k).each do |x| + sum += x if x.abs.to_s.length <= 2 + end + sum +end \ No newline at end of file diff --git a/tasks/t123-openai_gpt_oss_120b.rb b/tasks/t123-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..1f6587e --- /dev/null +++ b/tasks/t123-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def get_odd_collatz(n) + odds = [] + loop do + odds << n if n.odd? + break if n == 1 + n = n.even? ? n 2 : n * 3 + 1 + end + odds.sort +end \ No newline at end of file diff --git a/tasks/t123-openai_gpt_oss_20b.rb b/tasks/t123-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..1c41bb9 --- /dev/null +++ b/tasks/t123-openai_gpt_oss_20b.rb @@ -0,0 +1,10 @@ +def get_odd_collatz(n) + odd_numbers = [] + current = n + loop do + odd_numbers << current if current.odd? + break if current == 1 + current = current.even? ? current / 2 : current * 3 + 1 + end + odd_numbers.sort +end \ No newline at end of file diff --git a/tasks/t124-openai_gpt_oss_120b.rb b/tasks/t124-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..dffb0b9 --- /dev/null +++ b/tasks/t124-openai_gpt_oss_120b.rb @@ -0,0 +1,11 @@ +def valid_date?(date_string) + return false unless date_string.is_a?(String) && date_string.match?(/\A\d{2}-\d{2}-\d{4}\z/) + month_str, day_str, year_str = date_string.split('-') + month = month_str.to_i + day = day_str.to_i + year = year_str.to_i + return false unless month.between?(1, 12) && day >= 1 + leap = (year % 4 == 0 && year % 100 != 0) || (year % 400 == 0) + days_in_month = [31, leap ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31] + day <= days_in_month[month - 1] +end \ No newline at end of file diff --git a/tasks/t124-openai_gpt_oss_20b.rb b/tasks/t124-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..c136b0b --- /dev/null +++ b/tasks/t124-openai_gpt_oss_20b.rb @@ -0,0 +1,19 @@ +def valid_date?(date_string) + return false if date_string.nil? || date_string.empty? + match = /\A(\d{2})-(\d{2})-(\d{4})\z/.match(date_string) + return false unless match + month = match[1].to_i + day = match[2].to_i + year = match[3].to_i + return false unless month.between?(1, 12) + days_in_month = case month + when 1, 3, 5, 7, 8, 10, 12 + 31 + when 4, 6, 9, 11 + 30 + when 2 + leap = (year % 400 == 0) || (year % 4 == 0 && year % 100 != 0) + leap ? 29 : 28 + end + day.between?(1, days_in_month) +end \ No newline at end of file diff --git a/tasks/t125-openai_gpt_oss_120b.rb b/tasks/t125-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..cfc3f17 --- /dev/null +++ b/tasks/t125-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def split_words(txt) + if txt.include?(' ') + txt.split(' ') + elsif txt.include?(',') + txt.split(',') + else + txt.each_char.count { |c| ('a'..'z').include?(c) && ((c.ord - 'a'.ord) & 1 == 1) } + end +end \ No newline at end of file diff --git a/tasks/t125-openai_gpt_oss_20b.rb b/tasks/t125-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..e41756f --- /dev/null +++ b/tasks/t125-openai_gpt_oss_20b.rb @@ -0,0 +1,9 @@ +def split_words(txt) + if txt.include?(' ') || txt.include?(',') + words = txt.split(/[ ,]+/) + words.reject!(&:empty?) + words + else + txt.scan(/[bdfhjlnprtvxz]/).size + end +end \ No newline at end of file diff --git a/tasks/t126-openai_gpt_oss_120b.rb b/tasks/t126-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..c76c2bf --- /dev/null +++ b/tasks/t126-openai_gpt_oss_120b.rb @@ -0,0 +1,15 @@ +def is_sorted?(lst) + prev = nil + count = 0 + lst.each do |num| + return false if prev && num < prev + if prev == num + count += 1 + return false if count > 2 + else + count = 1 + end + prev = num + end + true +end \ No newline at end of file diff --git a/tasks/t126-openai_gpt_oss_20b.rb b/tasks/t126-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..8042c3b --- /dev/null +++ b/tasks/t126-openai_gpt_oss_20b.rb @@ -0,0 +1,17 @@ +def is_sorted?(lst) + return true if lst.empty? + prev = lst[0] + count = 1 + (1...lst.size).each do |i| + curr = lst[i] + return false if curr < prev + if curr == prev + count += 1 + return false if count > 2 + else + prev = curr + count = 1 + end + end + true +end \ No newline at end of file diff --git a/tasks/t127-openai_gpt_oss_120b.rb b/tasks/t127-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..bf0f597 --- /dev/null +++ b/tasks/t127-openai_gpt_oss_120b.rb @@ -0,0 +1,21 @@ +def is_prime(n) + return false if n <= 1 + return true if n == 2 + return false if n.even? + i = 3 + while i * i <= n + return false if n % i == 0 + i += 2 + end + true +end + +def intersection(interval1, interval2) + a1, b1 = interval1 + a2, b2 = interval2 + start = [a1, a2].max + finish = [b1, b2].min + return "NO" if start > finish + length = finish - start + 1 + is_prime(length) ? "YES" : "NO" +end \ No newline at end of file diff --git a/tasks/t127-openai_gpt_oss_20b.rb b/tasks/t127-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6e7efa1 --- /dev/null +++ b/tasks/t127-openai_gpt_oss_20b.rb @@ -0,0 +1,12 @@ +def intersection(interval1, interval2) + start = [interval1[0], interval2[0]].max + finish = [interval1[1], interval2[1]].min + return "NO" if start > finish + length = finish - start + 1 + return "NO" if length <= 1 + limit = Math.sqrt(length).floor + (2..limit).each do |i| + return "NO" if length % i == 0 + end + "YES" +end \ No newline at end of file diff --git a/tasks/t128-openai_gpt_oss_120b.rb b/tasks/t128-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..1f8c213 --- /dev/null +++ b/tasks/t128-openai_gpt_oss_120b.rb @@ -0,0 +1,6 @@ +def prod_signs(arr) + return nil if arr.empty? + sum_abs = arr.reduce(0) { |s, x| s + x.abs } + prod_sign = arr.reduce(1) { |p, x| p * (x <=> 0) } + sum_abs * prod_sign +end \ No newline at end of file diff --git a/tasks/t128-openai_gpt_oss_20b.rb b/tasks/t128-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6ecadf7 --- /dev/null +++ b/tasks/t128-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def prod_signs(arr) + return nil if arr.empty? + sum_abs = arr.map(&:abs).sum + sign_product = arr.reduce(1) do |prod, x| + prod * (x > 0 ? 1 : (x < 0 ? -1 : 0)) + end + sum_abs * sign_product +end \ No newline at end of file diff --git a/tasks/t129-openai_gpt_oss_120b.rb b/tasks/t129-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..7665a74 --- /dev/null +++ b/tasks/t129-openai_gpt_oss_120b.rb @@ -0,0 +1,36 @@ +def min_path(grid, k) + n = grid.size + min_val = nil + cur_i = cur_j = nil + grid.each_with_index do |row, i| + row.each_with_index do |val, j| + if min_val.nil? || val < min_val + min_val = val + cur_i = i + cur_j = j + end + end + end + + result = [min_val] + return result if k == 1 + + dirs = [[-1,0],[1,0],[0,-1],[0,1]] + (k - 1).times do + best_val = nil + best_pos = nil + dirs.each do |di, dj| + ni = cur_i + di + nj = cur_j + dj + next if ni < 0 || ni >= n || nj < 0 || nj >= n + val = grid[ni][nj] + if best_val.nil? || val < best_val + best_val = val + best_pos = [ni, nj] + end + end + cur_i, cur_j = best_pos + result << best_val + end + result +end \ No newline at end of file diff --git a/tasks/t129-openai_gpt_oss_20b.rb b/tasks/t129-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..2276722 --- /dev/null +++ b/tasks/t129-openai_gpt_oss_20b.rb @@ -0,0 +1,94 @@ +def min_path(grid, k) + n = grid.size + heap = MinHeap.new + visited = {} + (0...n).each do |i| + (0...n).each do |j| + seq = [grid[i][j]] + key = [i, j, 1] + visited[key] = seq + heap.push([seq, i, j, 1]) + end + end + dirs = [[1, 0], [-1, 0], [0, 1], [0, -1]] + until heap.empty? + seq, i, j, l = heap.pop + key = [i, j, l] + next if visited[key] != seq + return seq if l == k + dirs.each do |di, dj| + ni = i + di + nj = j + dj + next if ni < 0 || ni >= n || nj < 0 || nj >= n + new_seq = seq + [grid[ni][nj]] + new_l = l + 1 + new_key = [ni, nj, new_l] + if !visited.key?(new_key) || new_seq < visited[new_key] + visited[new_key] = new_seq + heap.push([new_seq, ni, nj, new_l]) + end + end + end + [] +end + +class MinHeap + def initialize + @data = [] + end + + def push(item) + @data << item + sift_up(@data.size - 1) + end + + def pop + return nil if @data.empty? + min = @data[0] + last = @data.pop + unless @data.empty? + @data[0] = last + sift_down(0) + end + min + end + + def empty? + @data.empty? + end + + private + + def sift_up(idx) + while idx > 0 + parent = (idx - 1) / 2 + if @data[idx][0] < @data[parent][0] + @data[idx], @data[parent] = @data[parent], @data[idx] + idx = parent + else + break + end + end + end + + def sift_down(idx) + size = @data.size + loop do + left = idx * 2 + 1 + right = left + 1 + smallest = idx + if left < size && @data[left][0] < @data[smallest][0] + smallest = left + end + if right < size && @data[right][0] < @data[smallest][0] + smallest = right + end + if smallest != idx + @data[idx], @data[smallest] = @data[smallest], @data[idx] + idx = smallest + else + break + end + end + end +end \ No newline at end of file diff --git a/tasks/t13-openai_gpt_oss_120b.rb b/tasks/t13-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..677919b --- /dev/null +++ b/tasks/t13-openai_gpt_oss_120b.rb @@ -0,0 +1,10 @@ +def greatest_common_divisor(a, b) + a = a.abs + b = b.abs + return a if b == 0 + return b if a == 0 + while b != 0 + a, b = b, a % b + end + a +end \ No newline at end of file diff --git a/tasks/t13-openai_gpt_oss_20b.rb b/tasks/t13-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..677919b --- /dev/null +++ b/tasks/t13-openai_gpt_oss_20b.rb @@ -0,0 +1,10 @@ +def greatest_common_divisor(a, b) + a = a.abs + b = b.abs + return a if b == 0 + return b if a == 0 + while b != 0 + a, b = b, a % b + end + a +end \ No newline at end of file diff --git a/tasks/t130-openai_gpt_oss_120b.rb b/tasks/t130-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..2e4bb69 --- /dev/null +++ b/tasks/t130-openai_gpt_oss_120b.rb @@ -0,0 +1,15 @@ +def tri(n) + result = [] + (0..n).each do |i| + if i == 0 + result[i] = 1 + elsif i == 1 + result[i] = 3 + elsif i.even? + result[i] = 1 + i / 2 + else + result[i] = result[i - 1] + result[i - 2] + (1 + (i + 1) / 2) + end + end + result +end \ No newline at end of file diff --git a/tasks/t130-openai_gpt_oss_20b.rb b/tasks/t130-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..bd22c56 --- /dev/null +++ b/tasks/t130-openai_gpt_oss_20b.rb @@ -0,0 +1,14 @@ +def tri(n) + tri = Array.new(n + 2) + tri[0] = 1 + tri[1] = 3 + (2..n).each do |i| + if i.even? + tri[i] = 1 + i / 2 + else + tri[i + 1] ||= 1 + (i + 1) / 2 + tri[i] = tri[i - 1] + tri[i - 2] + tri[i + 1] + end + end + tri[0..n] +end \ No newline at end of file diff --git a/tasks/t131-openai_gpt_oss_120b.rb b/tasks/t131-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..1f245eb --- /dev/null +++ b/tasks/t131-openai_gpt_oss_120b.rb @@ -0,0 +1,12 @@ +def digits(n) + product = 1 + has_odd = false + n.to_s.each_char do |c| + d = c.ord - 48 + if d.odd? + product *= d + has_odd = true + end + end + has_odd ? product : 0 +end \ No newline at end of file diff --git a/tasks/t131-openai_gpt_oss_20b.rb b/tasks/t131-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..b800b49 --- /dev/null +++ b/tasks/t131-openai_gpt_oss_20b.rb @@ -0,0 +1,5 @@ +def digits(n) + odd_digits = n.to_s.chars.map(&:to_i).select(&:odd?) + return 0 if odd_digits.empty? + odd_digits.inject(1, :*) +end \ No newline at end of file diff --git a/tasks/t132-openai_gpt_oss_120b.rb b/tasks/t132-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..f45eb79 --- /dev/null +++ b/tasks/t132-openai_gpt_oss_120b.rb @@ -0,0 +1,21 @@ +def is_nested?(string) + second_open = nil + open_count = 0 + string.each_char.with_index do |ch, i| + if ch == '[' + open_count += 1 + if open_count == 2 + second_open = i + break + end + end + end + return false unless second_open + close_count = 0 + string.each_char.with_index do |ch, i| + next if i <= second_open + close_count += 1 if ch == ']' + return true if close_count >= 2 + end + false +end \ No newline at end of file diff --git a/tasks/t132-openai_gpt_oss_20b.rb b/tasks/t132-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..cf2572f --- /dev/null +++ b/tasks/t132-openai_gpt_oss_20b.rb @@ -0,0 +1,21 @@ +def is_nested?(string) + n = string.length + return false if n < 4 + prefix_open = Array.new(n, 0) + count = 0 + string.chars.each_with_index do | count += 1 if ch == '[' + prefix_open[i] = count + end + suffix_close = Array.new(n, 0) + count = 0 + string.chars.reverse_each.with_index do |ch, rev_i| + idx = n - 1 - rev_i + count += 1 if ch == ']' + suffix_close[idx] = count + end + string.chars.each_with_index do |ch, i| + next unless ch == ']' + return true if prefix_open[i] >= 2 && suffix_close[i] >= 2 + end + false +end \ No newline at end of file diff --git a/tasks/t133-openai_gpt_oss_120b.rb b/tasks/t133-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..51cc0a1 --- /dev/null +++ b/tasks/t133-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +def sum_squares(lst) + lst.reduce(0) do |sum, x| + r = x.ceil + r = 0 if r < 0 + sum + r * r + end +end \ No newline at end of file diff --git a/tasks/t133-openai_gpt_oss_20b.rb b/tasks/t133-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..25ac096 --- /dev/null +++ b/tasks/t133-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def sum_squares(lst) + lst.map { |x| x.ceil ** 2 }.sum +end \ No newline at end of file diff --git a/tasks/t134-openai_gpt_oss_120b.rb b/tasks/t134-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..1134955 --- /dev/null +++ b/tasks/t134-openai_gpt_oss_120b.rb @@ -0,0 +1,11 @@ +def check_last_char_letter?(txt) + return false if txt.nil? || txt.empty? + return false if txt.strip.empty? + last = txt[-1] + return false unless last =~ /\p{L}/ + return true if txt.length == 1 + prev = txt[-2] + return false unless prev == ' ' + prefix = txt[0...-2] + !!(prefix =~ /[^\s]/) +end \ No newline at end of file diff --git a/tasks/t134-openai_gpt_oss_20b.rb b/tasks/t134-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..0160aa0 --- /dev/null +++ b/tasks/t134-openai_gpt_oss_20b.rb @@ -0,0 +1,16 @@ +def check_last_char_letter?(txt) + return false if txt.nil? || txt.empty? + return false if txt.strip.empty? + + last_char = txt[-1] + return false unless last_char =~ /[A-Za-z]/ + + if txt.length > 1 + prev_char = txt[-2] + return false if prev_char =~ /[A-Za-z]/ + end + + return false if txt[0] == ' ' + + true +end \ No newline at end of file diff --git a/tasks/t135-openai_gpt_oss_120b.rb b/tasks/t135-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..7d25451 --- /dev/null +++ b/tasks/t135-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +def can_arrange(arr) + last_index = -1 + (1...arr.length).each do |i| + last_index = i if arr[i] < arr[i - 1] + end + last_index +end \ No newline at end of file diff --git a/tasks/t135-openai_gpt_oss_20b.rb b/tasks/t135-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..bc7b268 --- /dev/null +++ b/tasks/t135-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def can_arrange(arr) + last_index = -1 + arr.each_with_index do |value, index| + next if index.zero? + last_index = index if value < arr[index - 1] + end + last_index +end \ No newline at end of file diff --git a/tasks/t136-openai_gpt_oss_120b.rb b/tasks/t136-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..72858ce --- /dev/null +++ b/tasks/t136-openai_gpt_oss_120b.rb @@ -0,0 +1,12 @@ +def largest_smallest_integers(lst) + max_neg = nil + min_pos = nil + lst.each do |n| + if n < 0 + max_neg = n if max_neg.nil? || n > max_neg + elsif n > 0 + min_pos = n if min_pos.nil? || n < min_pos + end + end + [max_neg, min_pos] +end \ No newline at end of file diff --git a/tasks/t136-openai_gpt_oss_20b.rb b/tasks/t136-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..43827e7 --- /dev/null +++ b/tasks/t136-openai_gpt_oss_20b.rb @@ -0,0 +1,12 @@ +def largest_smallest_integers(lst) + largest_neg = nil + smallest_pos = nil + lst.each do |n| + if n < 0 + largest_neg = n if largest_neg.nil? || n > largest_neg + elsif n > 0 + smallest_pos = n if smallest_pos.nil? || n < smallest_pos + end + end + [largest_neg, smallest_pos] +end \ No newline at end of file diff --git a/tasks/t137-openai_gpt_oss_120b.rb b/tasks/t137-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..fadf238 --- /dev/null +++ b/tasks/t137-openai_gpt_oss_120b.rb @@ -0,0 +1,20 @@ +def to_numeric(value) + case value + when String + value.tr(',', '.').to_f + else + value.to_f + end +end + +def compare_one(a, b) + a_num = to_numeric(a) + b_num = to_numeric(b) + if a_num > b_num + a + elsif b_num > a_num + b + else + nil + end +end \ No newline at end of file diff --git a/tasks/t137-openai_gpt_oss_20b.rb b/tasks/t137-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..62fa177 --- /dev/null +++ b/tasks/t137-openai_gpt_oss_20b.rb @@ -0,0 +1,19 @@ +def compare_one(a, b) + parse_value = lambda do |val| + case val + when Integer, Float + val + when String + val.tr(',', '.').to_f + else + raise ArgumentError, "Unsupported type" + end + end + + num_a = parse_value.call(a) + num_b = parse_value.call(b) + + return nil if num_a == num_b + + num_a > num_b ? a : b +end \ No newline at end of file diff --git a/tasks/t138-openai_gpt_oss_120b.rb b/tasks/t138-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..efb780e --- /dev/null +++ b/tasks/t138-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def is_equal_to_sum_even?(n) + n.is_a?(Integer) && n >= 8 && n.even? +end \ No newline at end of file diff --git a/tasks/t138-openai_gpt_oss_20b.rb b/tasks/t138-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..df006c2 --- /dev/null +++ b/tasks/t138-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def is_equal_to_sum_even?(n) + n >= 8 && n.even? +end \ No newline at end of file diff --git a/tasks/t139-openai_gpt_oss_120b.rb b/tasks/t139-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..8f60e25 --- /dev/null +++ b/tasks/t139-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def special_factorial(n) + result = 1 + fact = 1 + (1..n).each do |i| + fact *= i + result *= fact + end + result +end \ No newline at end of file diff --git a/tasks/t139-openai_gpt_oss_20b.rb b/tasks/t139-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..3749069 --- /dev/null +++ b/tasks/t139-openai_gpt_oss_20b.rb @@ -0,0 +1,9 @@ +def special_factorial(n) + result = 1 + factorial = 1 + (1..n).each do |i| + factorial *= i + result *= factorial + end + result +end \ No newline at end of file diff --git a/tasks/t14-openai_gpt_oss_120b.rb b/tasks/t14-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..70d3a75 --- /dev/null +++ b/tasks/t14-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def all_prefixes(string) + (1..string.length).map { |i| string[0, i] } +end \ No newline at end of file diff --git a/tasks/t14-openai_gpt_oss_20b.rb b/tasks/t14-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..00bcf35 --- /dev/null +++ b/tasks/t14-openai_gpt_oss_20b.rb @@ -0,0 +1,7 @@ +def all_prefixes(string) + prefixes = [] + (1..string.length).each do |i| + prefixes << string[0, i] + end + prefixes +end \ No newline at end of file diff --git a/tasks/t140-openai_gpt_oss_120b.rb b/tasks/t140-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..fb0cd60 --- /dev/null +++ b/tasks/t140-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def fix_spaces(text) + text.gsub(/ +/) { |s| s.length > 2 ? '-' : '_' * s.length } +end \ No newline at end of file diff --git a/tasks/t140-openai_gpt_oss_20b.rb b/tasks/t140-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..167c500 --- /dev/null +++ b/tasks/t140-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def fix_spaces(text) + text.gsub(/ +/) { |s| s.length > 2 ? "-" : "_" * s.length } +end \ No newline at end of file diff --git a/tasks/t141-openai_gpt_oss_120b.rb b/tasks/t141-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..683ff5a --- /dev/null +++ b/tasks/t141-openai_gpt_oss_120b.rb @@ -0,0 +1,10 @@ +def file_name_check(file_name) + return 'No' unless file_name.count('.') == 1 + name, ext = file_name.split('.', 2) + return 'No' if name.nil? || name.empty? + return 'No' if ext.nil? || ext.empty? + return 'No' unless %w[txt exe dll].include?(ext.downcase) + return 'No' unless name[0] =~ /[A-Za-z]/ + return 'No' if file_name.scan(/\d/).size > 3 + 'Yes' +end \ No newline at end of file diff --git a/tasks/t141-openai_gpt_oss_20b.rb b/tasks/t141-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6b70f10 --- /dev/null +++ b/tasks/t141-openai_gpt_oss_20b.rb @@ -0,0 +1,16 @@ +def file_name_check(file_name) + return 'No' unless file_name.is_a?(String) + + parts = file_name.split('.') + return 'No' unless parts.size == 2 + + name_part, ext_part = parts + return 'No' if name_part.empty? + return 'No' unless name_part[0] =~ /[A-Za-z]/ + return 'No' unless %w[txt exe dll].include?(ext_part) + + digit_count = file_name.count('0-9') + return 'No' if digit_count > 3 + + 'Yes' +end \ No newline at end of file diff --git a/tasks/t142-openai_gpt_oss_120b.rb b/tasks/t142-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..c47e988 --- /dev/null +++ b/tasks/t142-openai_gpt_oss_120b.rb @@ -0,0 +1,13 @@ +def sum_squares(lst) + total = 0 + lst.each_with_index do |val, idx| + if idx % 3 == 0 + total += val * val + elsif idx % 4 == 0 + total += val ** 3 + else + total += val + end + end + total +end \ No newline at end of file diff --git a/tasks/t142-openai_gpt_oss_20b.rb b/tasks/t142-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..7918b04 --- /dev/null +++ b/tasks/t142-openai_gpt_oss_20b.rb @@ -0,0 +1,13 @@ +def sum_squares(lst) + sum = 0 + lst.each_with_index do |value, index| + if index % 3 == 0 + sum += value * value + elsif index % 4 == 0 + sum += value * value * value + else + sum += value + end + end + sum +end \ No newline at end of file diff --git a/tasks/t143-openai_gpt_oss_120b.rb b/tasks/t143-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..d65b6ee --- /dev/null +++ b/tasks/t143-openai_gpt_oss_120b.rb @@ -0,0 +1,17 @@ +def prime?(n) + return false if n < 2 + return true if n == 2 + return false if n.even? + i = 3 + while i * i <= n + return false if n % i == 0 + i += 2 + end + true +end + +def prime_length_words(sentence) + words = sentence.split(' ') + selected = words.select { |w| prime?(w.length) } + selected.join(' ') +end \ No newline at end of file diff --git a/tasks/t143-openai_gpt_oss_20b.rb b/tasks/t143-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..72f14f1 --- /dev/null +++ b/tasks/t143-openai_gpt_oss_20b.rb @@ -0,0 +1,16 @@ +def prime_length_words(sentence) + words = sentence.split + primes = words.select { |w| prime?(w.length) } + primes.join(' ') +end + +def prime?(n) + return false if n <= 1 + return true if n == 2 + return false if n.even? + limit = Math.sqrt(n).to_i + (3..limit).step(2) do |i| + return false if n % i == 0 + end + true +end \ No newline at end of file diff --git a/tasks/t144-openai_gpt_oss_120b.rb b/tasks/t144-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..7578b2a --- /dev/null +++ b/tasks/t144-openai_gpt_oss_120b.rb @@ -0,0 +1,5 @@ +def simplify(x, n) + a, b = x.split('/').map(&:to_i) + c, d = n.split('/').map(&:to_i) + (a * c) % (b * d) == 0 +end \ No newline at end of file diff --git a/tasks/t144-openai_gpt_oss_20b.rb b/tasks/t144-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..7578b2a --- /dev/null +++ b/tasks/t144-openai_gpt_oss_20b.rb @@ -0,0 +1,5 @@ +def simplify(x, n) + a, b = x.split('/').map(&:to_i) + c, d = n.split('/').map(&:to_i) + (a * c) % (b * d) == 0 +end \ No newline at end of file diff --git a/tasks/t145-openai_gpt_oss_120b.rb b/tasks/t145-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..de9d315 --- /dev/null +++ b/tasks/t145-openai_gpt_oss_120b.rb @@ -0,0 +1,6 @@ +def order_by_points(nums) + nums.each_with_index + .map { |num, idx| [num, idx, num.abs.to_s.chars.map { |c| c.to_i }.sum] } + .sort_by { |_, idx, sum| [sum, idx] } + .map { |num, _, _| num } +end \ No newline at end of file diff --git a/tasks/t145-openai_gpt_oss_20b.rb b/tasks/t145-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..8c9ff90 --- /dev/null +++ b/tasks/t145-openai_gpt_oss_20b.rb @@ -0,0 +1,6 @@ +def order_by_points(nums) + nums.each_with_index + .map { |num, idx| [num, num.abs.digits.sum, idx] } + .sort_by { |_, sum, idx| [sum, idx] } + .map { |num, _, _| num } +end \ No newline at end of file diff --git a/tasks/t146-openai_gpt_oss_120b.rb b/tasks/t146-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..e16c50d --- /dev/null +++ b/tasks/t146-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +def special_filter(nums) + count = 0 + nums.each do |n| + next unless n > 10 + s = n.abs.to_s + first_digit = s[0].ord - 48 + last_digit = s[-1].ord \ No newline at end of file diff --git a/tasks/t146-openai_gpt_oss_20b.rb b/tasks/t146-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..10f9ac9 --- /dev/null +++ b/tasks/t146-openai_gpt_oss_20b.rb @@ -0,0 +1,11 @@ +def special_filter(nums) + count = 0 + nums.each do |n| + next unless n > 10 + abs_str = n.abs.to_s + first_digit = abs_str[0].to_i + last_digit = abs_str[-1].to_i + count += 1 if first_digit.odd? && last_digit.odd? + end + count +end \ No newline at end of file diff --git a/tasks/t147-openai_gpt_oss_120b.rb b/tasks/t147-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..8c71a3f --- /dev/null +++ b/tasks/t147-openai_gpt_oss_120b.rb @@ -0,0 +1,12 @@ +def get_max_triples(n) + return 0 if n < 3 + base = n / 3 + rem = n % 3 + count_mod0 = base + (rem > 0 ? 1 : 0) + count_mod1 = base + (rem > 1 ? 1 : 0) + cnt0 = count_mod1 + cnt1 = n - cnt0 + c0 = cnt0 >= 3 ? cnt0 * (cnt0 - 1) * (cnt0 - 2) / 6 : 0 + c1 = cnt1 >= 3 ? cnt1 * (cnt1 - 1) * (cnt1 - 2) / 6 : 0 + c0 + c1 +end \ No newline at end of file diff --git a/tasks/t147-openai_gpt_oss_20b.rb b/tasks/t147-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..4bfe951 --- /dev/null +++ b/tasks/t147-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def get_max_triples(n) + return 0 if n < 3 + c0 = (n + 1) / 3 + c1 = n - c0 + c0_comb = c0 >= 3 ? c0 * (c0 - 1) * (c0 - 2) / 6 : 0 + c1_comb = c1 >= 3 ? c1 * (c1 - 1) * (c1 - 2) / 6 : 0 + c0_comb + c1_comb +end \ No newline at end of file diff --git a/tasks/t148-openai_gpt_oss_120b.rb b/tasks/t148-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..8fe70c8 --- /dev/null +++ b/tasks/t148-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def bf(planet1, planet2) + planets = %w[Mercury Venus Earth Mars Jupiter Saturn Uranus Neptune] + i1 = planets.index(planet1) + i2 = planets.index(planet2) + return [] if i1.nil? || i2.nil? + start_idx = [i1, i2].min + end_idx = [i1, i2].max + planets[(start_idx + 1)...end_idx] || [] +end \ No newline at end of file diff --git a/tasks/t148-openai_gpt_oss_20b.rb b/tasks/t148-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..28f93f5 --- /dev/null +++ b/tasks/t148-openai_gpt_oss_20b.rb @@ -0,0 +1,9 @@ +def bf(planet1, planet2) + planets = ["Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune"] + idx1 = planets.index(planet1) + idx2 = planets.index(planet2) + return [] if idx1.nil? || idx2.nil? || idx1 == idx2 + start = [idx1, idx2].min + finish = [idx1, idx2].max + planets[(start + 1)...finish] +end \ No newline at end of file diff --git a/tasks/t149-openai_gpt_oss_120b.rb b/tasks/t149-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..041ed8e --- /dev/null +++ b/tasks/t149-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def sorted_list_sum(lst) + lst.select { |s| s.length.even? }.sort_by { |s| [s.length, s] } +end \ No newline at end of file diff --git a/tasks/t149-openai_gpt_oss_20b.rb b/tasks/t149-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..0c1c244 --- /dev/null +++ b/tasks/t149-openai_gpt_oss_20b.rb @@ -0,0 +1,4 @@ +def sorted_list_sum(lst) + filtered = lst.select { |s| s.length.even? } + filtered.sort_by { |s| [s.length, s] } +end \ No newline at end of file diff --git a/tasks/t15-openai_gpt_oss_120b.rb b/tasks/t15-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..f00ed15 --- /dev/null +++ b/tasks/t15-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def string_sequence(n) + (0..n).to_a.join(' ') +end \ No newline at end of file diff --git a/tasks/t15-openai_gpt_oss_20b.rb b/tasks/t15-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..f00ed15 --- /dev/null +++ b/tasks/t15-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def string_sequence(n) + (0..n).to_a.join(' ') +end \ No newline at end of file diff --git a/tasks/t150-openai_gpt_oss_120b.rb b/tasks/t150-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..09b7e3f --- /dev/null +++ b/tasks/t150-openai_gpt_oss_120b.rb @@ -0,0 +1,15 @@ +def prime?(n) + return false if n < 2 + return true if n == 2 + return false if n.even? + i = 3 + while i * i <= n + return false if n % i == 0 + i += 2 + end + true +end + +def x_or_y(n, x, y) + prime?(n) ? x : y +end \ No newline at end of file diff --git a/tasks/t150-openai_gpt_oss_20b.rb b/tasks/t150-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..10b4aef --- /dev/null +++ b/tasks/t150-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def x_or_y(n, x, y) + return y if n <= 1 + limit = Math.sqrt(n).floor + (2..limit).each do |i| + return if n % i == 0 + end + x +end \ No newline at end of file diff --git a/tasks/t151-openai_gpt_oss_120b.rb b/tasks/t151-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..29d0acc --- /dev/null +++ b/tasks/t151-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def double_the_difference(numbers) + numbers.select { |n| n.is_a?(Integer) && n > 0 && n.odd? }.sum { |n| n * n } +end \ No newline at end of file diff --git a/tasks/t151-openai_gpt_oss_20b.rb b/tasks/t151-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6e4d0fa --- /dev/null +++ b/tasks/t151-openai_gpt_oss_20b.rb @@ -0,0 +1,5 @@ +def double_the_difference(numbers) + numbers.select { |n| n.is_a?(Integer) && n > 0 && n.odd? } + .map { |n| n * n } + .sum +end \ No newline at end of file diff --git a/tasks/t152-openai_gpt_oss_120b.rb b/tasks/t152-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..6cf41eb --- /dev/null +++ b/tasks/t152-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def compare(game, guess) + game.zip(guess).map { |g, p| (g - p).abs } +end \ No newline at end of file diff --git a/tasks/t152-openai_gpt_oss_20b.rb b/tasks/t152-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..79510b7 --- /dev/null +++ b/tasks/t152-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def compare(game, guess) + game.zip(guess).map { |g, s| (g - s).abs } +end \ No newline at end of file diff --git a/tasks/t153-openai_gpt_oss_120b.rb b/tasks/t153-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..8c49363 --- /dev/null +++ b/tasks/t153-openai_gpt_oss_120b.rb @@ -0,0 +1,15 @@ +def strongest_extension(class_name, extensions) + return nil if extensions.empty? + best = nil + max_strength = -Float::INFINITY + extensions.each do |ext| + upper = ext.count('A'..'Z') + lower = ext.count('a'..'z') + strength = upper - lower + if strength > max_strength + max_strength = strength + best = ext + end + end + "#{class_name}.#{best}" +end \ No newline at end of file diff --git a/tasks/t153-openai_gpt_oss_20b.rb b/tasks/t153-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..82b82a6 --- /dev/null +++ b/tasks/t153-openai_gpt_oss_20b.rb @@ -0,0 +1,13 @@ +def strongest_extension(class_name, extensions) + return nil if extensions.empty? + best_extension = nil + max_strength = -Float::INFINITY + extensions.each do |ext| + strength = ext.count('A-Z') - ext.count('a-z') + if strength > max_strength + max_strength = strength + best_extension = ext + end + end + "#{class_name}.#{best_extension}" +end \ No newline at end of file diff --git a/tasks/t154-openai_gpt_oss_120b.rb b/tasks/t154-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..19181f4 --- /dev/null +++ b/tasks/t154-openai_gpt_oss_120b.rb @@ -0,0 +1,10 @@ +def cycpattern_check(a, b) + m = b.length + return true if m == 0 + return false if m > a.length + doubled = b + b + (0..a.length - m).each do |i| + return true if doubled.include?(a[i, m]) + end + false +end \ No newline at end of file diff --git a/tasks/t154-openai_gpt_oss_20b.rb b/tasks/t154-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..3cb0ecd --- /dev/null +++ b/tasks/t154-openai_gpt_oss_20b.rb @@ -0,0 +1,10 @@ +def cycpattern_check(a, b) + return true if b.empty? + return false if a.empty? + len = b.length + (0...len).each do |i| + shift = b[i..-1] + b[0...i] + return true if a.include?(shift) + end + false +end \ No newline at end of file diff --git a/tasks/t155-openai_gpt_oss_120b.rb b/tasks/t155-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..0629677 --- /dev/null +++ b/tasks/t155-openai_gpt_oss_120b.rb @@ -0,0 +1,14 @@ +def even_odd_count(num) + return [1, 0] if num == 0 + even = 0 + odd = 0 + num.abs.to_s.each_char do |ch| + digit = ch.ord - 48 + if digit.even? + even += 1 + else + odd += 1 + end + end + [even, odd] +end \ No newline at end of file diff --git a/tasks/t155-openai_gpt_oss_20b.rb b/tasks/t155-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..e332110 --- /dev/null +++ b/tasks/t155-openai_gpt_oss_20b.rb @@ -0,0 +1,15 @@ +def even_odd_count(num) + abs_num = num.abs + return [1, 0] if abs_num == 0 + even_count = 0 + odd_count = 0 + abs_num.to_s.each_char do |ch| + digit = ch.to_i + if digit.even? + even_count += 1 + else + odd_count += 1 + end + end + [even_count, odd_count] +end \ No newline at end of file diff --git a/tasks/t156-openai_gpt_oss_120b.rb b/tasks/t156-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..9fe7d18 --- /dev/null +++ b/tasks/t156-openai_gpt_oss_120b.rb @@ -0,0 +1,25 @@ +def int_to_mini_roman(number) + values = [ + [1000, 'm'], + [900, 'cm'], + [500, 'd'], + [400, 'cd'], + [100, 'c'], + [90, 'xc'], + [50, 'l'], + [40, 'xl'], + [10, 'x'], + [9, 'ix'], + [5, 'v'], + [4, 'iv'], + [1, 'i'] + ] + result = '' + values.each do |val, roman| + while number >= val + result << roman + number -= val + end + end + result +end \ No newline at end of file diff --git a/tasks/t156-openai_gpt_oss_20b.rb b/tasks/t156-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..120a19b --- /dev/null +++ b/tasks/t156-openai_gpt_oss_20b.rb @@ -0,0 +1,25 @@ +def int_to_mini_roman(number) + mapping = [ + [1000, 'm'], + [900, 'cm'], + [500, 'd'], + [400, 'cd'], + [100, 'c'], + [90, 'xc'], + [50, 'l'], + [40, 'xl'], + [10, 'x'], + [9, 'ix'], + [5, 'v'], + [4, 'iv'], + [1, 'i'] + ] + result = '' + mapping.each do |value, symbol| + while number >= value + result << symbol + number -= value + end + end + result +end \ No newline at end of file diff --git a/tasks/t157-openai_gpt_oss_120b.rb b/tasks/t157-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..1db8ab5 --- /dev/null +++ b/tasks/t157-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +def right_angle_triangle?(a, b, c) + return false unless a > 0 && b > 0 && c > 0 + return false unless a + b > c && a + c > b && b + c > a + sides = [a, b, c].sort + x, y, z = sides + ((x * x) + (y * y) - (z * z)).abs < 1e-9 +end \ No newline at end of file diff --git a/tasks/t157-openai_gpt_oss_20b.rb b/tasks/t157-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..ee2370e --- /dev/null +++ b/tasks/t157-openai_gpt_oss_20b.rb @@ -0,0 +1,7 @@ +def right_angle_triangle?(a, b, c) + return false if [a, b, c].any? { |x| x <= 0 } + return false unless a + b > c && a + c > b && b + c > a + sides = [a, b, c].sort + a2, b2, c2 = sides.map { |x| x * x } + (c2 - a2 - b2).abs < 1e-10 +end \ No newline at end of file diff --git a/tasks/t158-openai_gpt_oss_120b.rb b/tasks/t158-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..d8b4573 --- /dev/null +++ b/tasks/t158-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +def find_max(words) + return "" if words.empty? + counts = words.map { |w| [w, w.chars.select { |c| c =~ /[a-z]/ }.uniq.size] } + max = counts.map { |_, c| c }.max + candidates = counts.select { |_, c| c == max }.map { |w, _| w } + candidates.min +end \ No newline at end of file diff --git a/tasks/t158-openai_gpt_oss_20b.rb b/tasks/t158-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6d10c44 --- /dev/null +++ b/tasks/t158-openai_gpt_oss_20b.rb @@ -0,0 +1,10 @@ +def find_max(words) + return "" if words.empty? + stats = words.map do |w| + uniq_count = w.chars.select { |c| c >= 'a' && c <= 'z' }.uniq.size + [uniq_count, w] + end + max_count = stats.map(&:first).max + candidates = stats.select { |c, _| c == max_count }.map(&:last) + candidates.min +end \ No newline at end of file diff --git a/tasks/t159-openai_gpt_oss_120b.rb b/tasks/t159-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..d0cfe60 --- /dev/null +++ b/tasks/t159-openai_gpt_oss_120b.rb @@ -0,0 +1,8 @@ +def eat(number, need, remaining) + to_eat = need - number + to_eat = 0 if to_eat < 0 + eaten_now = to_eat < remaining ? to_eat : remaining + total_eaten = number + eaten_now + carrots_left = remaining - eaten_now + [total_eaten, carrots_left] +end \ No newline at end of file diff --git a/tasks/t159-openai_gpt_oss_20b.rb b/tasks/t159-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6024b6f --- /dev/null +++ b/tasks/t159-openai_gpt_oss_20b.rb @@ -0,0 +1,12 @@ +def eat(number, need, remaining) + needed = need - number + if needed <= 0 + total_eaten = number + carrots_left = remaining + else + eaten = [needed, remaining].min + total_eaten = number + eaten + carrots_left = remaining - eaten + end + [total_eaten, carrots_left] +end \ No newline at end of file diff --git a/tasks/t16-openai_gpt_oss_120b.rb b/tasks/t16-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..0a22090 --- /dev/null +++ b/tasks/t16-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def count_distinct_characters(string) + string.downcase.chars.uniq.size +end \ No newline at end of file diff --git a/tasks/t16-openai_gpt_oss_20b.rb b/tasks/t16-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..0a22090 --- /dev/null +++ b/tasks/t16-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def count_distinct_characters(string) + string.downcase.chars.uniq.size +end \ No newline at end of file diff --git a/tasks/t160-openai_gpt_oss_120b.rb b/tasks/t160-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..1da79d1 --- /dev/null +++ b/tasks/t160-openai_gpt_oss_120b.rb @@ -0,0 +1,54 @@ +def do_algebra(operators, operands) + precedence = { '**' => 3, '*' => 2, '/' => 2, '//' => 2, '+' => 1, '-' => 1 } + right_assoc = { '**' => true } + + output = [] + op_stack = [] + + tokens = [] + operands.each_with_index do |num, i| + tokens << num + tokens << operators[i] if i < operators.size + end + + tokens.each do |token| + if token.is_a?(Integer) + output << token + else + while !op_stack.empty? + top = op_stack[-1] + break if (right_assoc[token] && precedence[token] < precedence[top]) || + (!right_assoc[token] && precedence[token] <= precedence[top]) + output << op_stack.pop + end + op_stack << token + end + end + + output.concat(op_stack.reverse) + + stack = [] + output.each do |tok| + if tok.is_a?(Integer) + stack << tok + else + b = stack.pop + a = stack.pop + result = case tok + when '+' + a + b + when '-' + a - b + when '*' + a * b + when '/', '//' + a / b + when '**' + a ** b + end + stack << result + end + end + + stack.first +end \ No newline at end of file diff --git a/tasks/t160-openai_gpt_oss_20b.rb b/tasks/t160-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..9e9fb49 --- /dev/null +++ b/tasks/t160-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def do_algebra(operator, operand) + expr = operand[0].to_s + operator.each_with_index do |op, i| + op = '/' if op == '//' + expr += op + operand[i + 1].to_s + end + eval(expr).to_i +end \ No newline at end of file diff --git a/tasks/t161-openai_gpt_oss_120b.rb b/tasks/t161-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..386cf11 --- /dev/null +++ b/tasks/t161-openai_gpt_oss_120b.rb @@ -0,0 +1,5 @@ +def solve(s) + has_letter = s.each_char.any? { |c| c =~ /\p{L}/ } + return s.reverse unless has_letter + s.each_char.map { |c| c =~ /\p{L}/ ? c.swapcase : c }.join +end \ No newline at end of file diff --git a/tasks/t161-openai_gpt_oss_20b.rb b/tasks/t161-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..de6b7e5 --- /dev/null +++ b/tasks/t161-openai_gpt_oss_20b.rb @@ -0,0 +1,7 @@ +def solve(s) + if s =~ /[[:alpha:]]/ + s.swapcase + else + s.reverse + end +end \ No newline at end of file diff --git a/tasks/t162-openai_gpt_oss_120b.rb b/tasks/t162-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..d0545a5 --- /dev/null +++ b/tasks/t162-openai_gpt_oss_120b.rb @@ -0,0 +1,6 @@ +require 'digest' + +def string_to_md5(text) + return nil if text == '' + Digest::MD5.hexdigest(text) +end \ No newline at end of file diff --git a/tasks/t162-openai_gpt_oss_20b.rb b/tasks/t162-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..3470396 --- /dev/null +++ b/tasks/t162-openai_gpt_oss_20b.rb @@ -0,0 +1,6 @@ +require 'digest' + +def string_to_md5(text) + return nil if text.empty? + Digest::MD5.hexdigest(text) +end \ No newline at end of file diff --git a/tasks/t163-openai_gpt_oss_120b.rb b/tasks/t163-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..a0cb1d3 --- /dev/null +++ b/tasks/t163-openai_gpt_oss_120b.rb @@ -0,0 +1,6 @@ +def generate_even_numbers(a, b) + low, high = [a, b].minmax + start = low.even? ? low : low + 1 + return [] if start > high + (start..high).step(2).to_a +end \ No newline at end of file diff --git a/tasks/t163-openai_gpt_oss_20b.rb b/tasks/t163-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..090fd46 --- /dev/null +++ b/tasks/t163-openai_gpt_oss_20b.rb @@ -0,0 +1,5 @@ +def generate_even_numbers(a, b) + min = [a, b].min + max = [a, b].max + (min..max).select(&:even?) +end \ No newline at end of file diff --git a/tasks/t17-openai_gpt_oss_120b.rb b/tasks/t17-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..49dcbf4 --- /dev/null +++ b/tasks/t17-openai_gpt_oss_120b.rb @@ -0,0 +1,14 @@ +def parse_music(music_string) + result = [] + music_string.split.each do |token| + case token + when 'o' + result << 4 + when 'o|' + result << 2 + when '.|' + result << 1 + end + end + result +end \ No newline at end of file diff --git a/tasks/t17-openai_gpt_oss_20b.rb b/tasks/t17-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..540ee78 --- /dev/null +++ b/tasks/t17-openai_gpt_oss_20b.rb @@ -0,0 +1,14 @@ +def parse_music(music_string) + music_string.split.map do |token| + case token + when 'o' + 4 + when 'o|' + 2 + when '.|' + 1 + else + nil + end + end.compact +end \ No newline at end of file diff --git a/tasks/t18-openai_gpt_oss_120b.rb b/tasks/t18-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..3a0e73f --- /dev/null +++ b/tasks/t18-openai_gpt_oss_120b.rb @@ -0,0 +1,10 @@ +def how_many_times(string, substring) + return 0 if string.empty? || substring.empty? + count = 0 + i = 0 + while i <= string.length - substring.length + count += 1 if string[i, substring.length] == substring + i += 1 + end + count +end \ No newline at end of file diff --git a/tasks/t18-openai_gpt_oss_20b.rb b/tasks/t18-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..2caa37a --- /dev/null +++ b/tasks/t18-openai_gpt_oss_20b.rb @@ -0,0 +1,14 @@ +def how_many_times(string, substring) + return 0 if string.empty? || substring.empty? + count = 0 + i = 0 + while i <= string.length - substring.length + if string[i, substring.length] == substring + count += 1 + i += 1 + else + i += 1 + end + end + count +end \ No newline at end of file diff --git a/tasks/t19-openai_gpt_oss_120b.rb b/tasks/t19-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..9dfce32 --- /dev/null +++ b/tasks/t19-openai_gpt_oss_120b.rb @@ -0,0 +1,11 @@ +def sort_numbers(numbers) + mapping = { + 'zero' => 0, 'one' => 1, 'two' => 2, 'three' => 3, + 'four' => 4, 'five' => 5, 'six' => 6, 'seven' => 7, + 'eight' => 8, 'nine' => 9 + } + words = numbers.strip.split + return '' if words.empty? + sorted = words.sort_by { |w| mapping[w] } + sorted.join(' ') +end \ No newline at end of file diff --git a/tasks/t19-openai_gpt_oss_20b.rb b/tasks/t19-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..e2e961a --- /dev/null +++ b/tasks/t19-openai_gpt_oss_20b.rb @@ -0,0 +1,10 @@ +def sort_numbers(numbers) + word_to_value = { + 'zero' => 0, 'one' => 1, 'two' => 2, 'three' => 3, + 'four' => 4, 'five' => 5, 'six' => 6, 'seven' => 7, + 'eight' => 8, 'nine' => 9 + } + words = numbers.split + sorted_words = words.sort_by { |w| word_to_value[w] } + sorted_words.join(' ') +end \ No newline at end of file diff --git a/tasks/t2-openai_gpt_oss_120b.rb b/tasks/t2-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..31cd918 --- /dev/null +++ b/tasks/t2-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def truncate_number(number) + number - number.floor +end \ No newline at end of file diff --git a/tasks/t2-openai_gpt_oss_20b.rb b/tasks/t2-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..31cd918 --- /dev/null +++ b/tasks/t2-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def truncate_number(number) + number - number.floor +end \ No newline at end of file diff --git a/tasks/t20-openai_gpt_oss_120b.rb b/tasks/t20-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..3071f5a --- /dev/null +++ b/tasks/t20-openai_gpt_oss_120b.rb @@ -0,0 +1,16 @@ +def find_closest_elements(numbers) + raise ArgumentError, "At least two numbers required" if numbers.size < 2 + sorted = numbers.sort + min_diff = Float::INFINITY + result = [sorted[0], sorted[1]] + (0...sorted.size - 1).each do |i| + a = sorted[i] + b = sorted[i + 1] + diff = (b - a).abs + if diff < min_diff + min_diff = diff + result = [a, b] + end + end + result +end \ No newline at end of file diff --git a/tasks/t20-openai_gpt_oss_20b.rb b/tasks/t20-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..ddc3d1b --- /dev/null +++ b/tasks/t20-openai_gpt_oss_20b.rb @@ -0,0 +1,14 @@ +def find_closest_elements(numbers) + raise ArgumentError, 'At least two numbers required' if numbers.size < 2 + sorted = numbers.sort + min_diff = Float::INFINITY + closest_pair = [sorted[0], sorted[1]] + (0...(sorted.size - 1)).each do |i| + diff = (sorted[i + 1] - sorted[i]).abs + if diff < min_diff + min_diff = diff + closest_pair = [sorted[i], sorted[i + 1]] + end + end + closest_pair +end \ No newline at end of file diff --git a/tasks/t21-openai_gpt_oss_120b.rb b/tasks/t21-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..ae648c6 --- /dev/null +++ b/tasks/t21-openai_gpt_oss_120b.rb @@ -0,0 +1,11 @@ +def rescale_to_unit(numbers) + raise ArgumentError, "At least two elements required" if numbers.size < 2 + min_val = numbers.min + max_val = numbers.max + range = max_val - min_val + if range.zero? + numbers.map { 0.0 } + else + numbers.map { |n| (n - min_val) / range } + end +end \ No newline at end of file diff --git a/tasks/t21-openai_gpt_oss_20b.rb b/tasks/t21-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..4e9887d --- /dev/null +++ b/tasks/t21-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def rescale_to_unit(numbers) + raise ArgumentError, "list must contain at least two elements" if numbers.size < 2 + min_val = numbers.min + max_val = numbers.max + range = max_val - min_val + return numbers.map { 0.0 } if range == 0 + numbers.map { |x| (x - min_val) / range } +end \ No newline at end of file diff --git a/tasks/t22-openai_gpt_oss_120b.rb b/tasks/t22-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..bc2ddff --- /dev/null +++ b/tasks/t22-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def filter_integers(values) + values.select { |v| v.is_a?(Integer) } +end \ No newline at end of file diff --git a/tasks/t22-openai_gpt_oss_20b.rb b/tasks/t22-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..bc2ddff --- /dev/null +++ b/tasks/t22-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def filter_integers(values) + values.select { |v| v.is_a?(Integer) } +end \ No newline at end of file diff --git a/tasks/t23-openai_gpt_oss_120b.rb b/tasks/t23-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..54442c7 --- /dev/null +++ b/tasks/t23-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def strlen(string) + string.length +end \ No newline at end of file diff --git a/tasks/t23-openai_gpt_oss_20b.rb b/tasks/t23-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..54442c7 --- /dev/null +++ b/tasks/t23-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def strlen(string) + string.length +end \ No newline at end of file diff --git a/tasks/t24-openai_gpt_oss_120b.rb b/tasks/t24-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..ae8eb2a --- /dev/null +++ b/tasks/t24-openai_gpt_oss_120b.rb @@ -0,0 +1,10 @@ +def largest_divisor(n) + return nil if n <= 1 + limit = Math.sqrt(n).to_i + (2..limit).each do |i| + if n % i == 0 + return n / i + end + end + 1 +end \ No newline at end of file diff --git a/tasks/t24-openai_gpt_oss_20b.rb b/tasks/t24-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..8641b48 --- /dev/null +++ b/tasks/t24-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def largest_divisor(n) + return nil if n <= 1 + limit = Math.sqrt(n).floor + (2..limit).each do |i| + return n / i if n % i == 0 + end + 1 +end \ No newline at end of file diff --git a/tasks/t25-openai_gpt_oss_120b.rb b/tasks/t25-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..bf6aa42 --- /dev/null +++ b/tasks/t25-openai_gpt_oss_120b.rb @@ -0,0 +1,18 @@ +def factorize(n) + factors = [] + return factors if n == 0 || n == 1 + if n < 0 + factors << -1 + n = -n + end + i = 2 + while i * i <= n + while (n % i).zero? + factors << i + n /= i + end + i += (i == 2 ? 1 : 2) + end + factors << n if n > 1 + factors +end \ No newline at end of file diff --git a/tasks/t25-openai_gpt_oss_20b.rb b/tasks/t25-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..ff9d67b --- /dev/null +++ b/tasks/t25-openai_gpt_oss_20b.rb @@ -0,0 +1,18 @@ +def factorize(n) + factors = [] + return factors if n == 1 || n == -1 + if n < 0 + factors << -1 + n = -n + end + i = 2 + while i * i <= n + while n % i == 0 + factors << i + n /= i + end + i += 1 + end + factors << n if n > 1 + factors +end \ No newline at end of file diff --git a/tasks/t26-openai_gpt_oss_120b.rb b/tasks/t26-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..a64c74f --- /dev/null +++ b/tasks/t26-openai_gpt_oss_120b.rb @@ -0,0 +1,5 @@ +def remove_duplicates(numbers) + freq = Hash.new(0) + numbers.each { |n| freq[n] += 1 } + numbers.select { |n| freq[n] == 1 } +end \ No newline at end of file diff --git a/tasks/t26-openai_gpt_oss_20b.rb b/tasks/t26-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..2d0c565 --- /dev/null +++ b/tasks/t26-openai_gpt_oss_20b.rb @@ -0,0 +1,5 @@ +def remove_duplicates(numbers) + counts = Hash.new(0) + numbers.each { |n| counts[n] += 1 } + numbers.select { |n| counts[n] == 1 } +end \ No newline at end of file diff --git a/tasks/t27-openai_gpt_oss_120b.rb b/tasks/t27-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..0f16ef2 --- /dev/null +++ b/tasks/t27-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def flip_case(string) + string.swapcase +end \ No newline at end of file diff --git a/tasks/t27-openai_gpt_oss_20b.rb b/tasks/t27-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..0f16ef2 --- /dev/null +++ b/tasks/t27-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def flip_case(string) + string.swapcase +end \ No newline at end of file diff --git a/tasks/t28-openai_gpt_oss_120b.rb b/tasks/t28-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..7e06445 --- /dev/null +++ b/tasks/t28-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def concatenate(strings) + strings.join +end \ No newline at end of file diff --git a/tasks/t28-openai_gpt_oss_20b.rb b/tasks/t28-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..7e06445 --- /dev/null +++ b/tasks/t28-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def concatenate(strings) + strings.join +end \ No newline at end of file diff --git a/tasks/t29-openai_gpt_oss_120b.rb b/tasks/t29-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..a7ce431 --- /dev/null +++ b/tasks/t29-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def filter_by_prefix(strings, prefix) + strings.select { |s| s.start_with?(prefix) } +end \ No newline at end of file diff --git a/tasks/t29-openai_gpt_oss_20b.rb b/tasks/t29-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6ac72a3 --- /dev/null +++ b/tasks/t29-openai_gpt_oss_20b.rb @@ -0,0 +1,4 @@ +def filter_by_prefix(strings, prefix) + return strings if prefix.empty? + strings.select { |s| s.start_with?(prefix) } +end \ No newline at end of file diff --git a/tasks/t3-openai_gpt_oss_120b.rb b/tasks/t3-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..9898955 --- /dev/null +++ b/tasks/t3-openai_gpt_oss_120b.rb @@ -0,0 +1,8 @@ +def below_zero?(operations) + balance = 0 + operations.each do |op| + balance += op + return true if balance < 0 + end + false +end \ No newline at end of file diff --git a/tasks/t3-openai_gpt_oss_20b.rb b/tasks/t3-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..9898955 --- /dev/null +++ b/tasks/t3-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def below_zero?(operations) + balance = 0 + operations.each do |op| + balance += op + return true if balance < 0 + end + false +end \ No newline at end of file diff --git a/tasks/t30-openai_gpt_oss_120b.rb b/tasks/t30-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..7d18bc1 --- /dev/null +++ b/tasks/t30-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def get_positive(numbers) + numbers.select { |n| n > 0 } +end \ No newline at end of file diff --git a/tasks/t30-openai_gpt_oss_20b.rb b/tasks/t30-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..7d18bc1 --- /dev/null +++ b/tasks/t30-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def get_positive(numbers) + numbers.select { |n| n > 0 } +end \ No newline at end of file diff --git a/tasks/t31-openai_gpt_oss_120b.rb b/tasks/t31-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..a2d3330 --- /dev/null +++ b/tasks/t31-openai_gpt_oss_120b.rb @@ -0,0 +1,12 @@ +def is_prime?(n) + return false if n <= 1 + return true if n <= 3 + return false if n.even? + limit = Math.sqrt(n).to_i + i = 3 + while i <= limit + return false if n % i == 0 + i += 2 + end + true +end \ No newline at end of file diff --git a/tasks/t31-openai_gpt_oss_20b.rb b/tasks/t31-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..9c54676 --- /dev/null +++ b/tasks/t31-openai_gpt_oss_20b.rb @@ -0,0 +1,12 @@ +def is_prime?(n) + return false if n <= 1 + return true if n == 2 + return false if n.even? + limit = Math.sqrt(n).floor + i = 3 + while i <= limit + return false if n % i == 0 + i += 2 + end + true +end \ No newline at end of file diff --git a/tasks/t32-openai_gpt_oss_120b.rb b/tasks/t32-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..0bcf27e --- /dev/null +++ b/tasks/t32-openai_gpt_oss_120b.rb @@ -0,0 +1,59 @@ +def poly(coeffs, x) + result = 0.0 + coeffs.reverse_each { |c| result = result * x + c } + result +end + +def derivative(coeffs) + ds = [] + coeffs.each_with_index { |c, i| ds << c * i if i > 0 } + ds +end + +def find_zero(xs) + tol = 1e-12 + max_iter = 1000 + dxs = derivative(xs) + guesses = [0.0, 1.0, -1.0, 2.0, -2.0, 5.0, -5.0] + guesses.each do |g| + x = g + max_iter.times do + fx = poly(xs, x) + break if fx.abs < tol + dfx = poly(dxs, x) + break if dfx.abs < 1e-14 + x -= fx / dfx + end + return x if poly(xs, x).abs < 1e-8 + end + left = -1e6 + right = 1e6 + steps = 1000 + step = (right - left) / steps.to_f + prev_x = left + prev_f = poly(xs, prev_x) + (1..steps).each do |i| + cur_x = left + i * step + cur_f = poly(xs, cur_x) + if prev_f * cur_f <= 0 + a = prev_x + b = cur_x + 100.times do + m = (a + b) / 2.0 + fm = poly(xs, m) + break if fm.abs < tol + if prev_f * fm <= 0 + b = m + cur_f = fm + else + a = m + prev_f = fm + end + end + return (a + b) / 2.0 + end + prev_x = cur_x + prev_f = cur_f + end + 0.0 +end \ No newline at end of file diff --git a/tasks/t32-openai_gpt_oss_20b.rb b/tasks/t32-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..b88e61c --- /dev/null +++ b/tasks/t32-openai_gpt_oss_20b.rb @@ -0,0 +1,42 @@ +def find_zero(xs) + poly = ->(x) do + result = 0.0 + xs.reverse_each { |coeff| result = result * x + coeff } + result + end + + a = -1.0 + b = 1.0 + fa = poly.call(a) + fb = poly.call(b) + + if fa == 0.0 + return a + elsif fb == 0.0 + return b + end + + # Expand interval until sign change + while fa * fb > 0 + a *= 2 + b *= 2 + fa = poly.call(a) + fb = poly.call(b) + end + + # Bisection + 100.times do + mid = (a + b) / 2.0 + fm = poly.call(mid) + return mid if fm == 0.0 + if fa * fm < 0 + b = mid + fb = fm + else + a = mid + fa = fm + end + end + + (a + b) / 2.0 +end \ No newline at end of file diff --git a/tasks/t33-openai_gpt_oss_120b.rb b/tasks/t33-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..545af58 --- /dev/null +++ b/tasks/t33-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +def sort_third(l) + result = l.dup + indices = (0...l.length).select { |i| i % 3 == 0 } + sorted_vals = indices.map { |i| l[i] }.sort + indices.each_with_index { |idx, j| result[idx] = sorted_vals[j] } + result +end \ No newline at end of file diff --git a/tasks/t33-openai_gpt_oss_20b.rb b/tasks/t33-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..91c4ebe --- /dev/null +++ b/tasks/t33-openai_gpt_oss_20b.rb @@ -0,0 +1,7 @@ +def sort_third(l) + result = l.dup + indices = (0...result.size).select { |i| i % 3 == 0 } + sorted = indices.map { |i| result[i] }.sort + indices.each_with_index { |i, idx| result[i] = sorted[idx] } + result +end \ No newline at end of file diff --git a/tasks/t34-openai_gpt_oss_120b.rb b/tasks/t34-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..f4aa471 --- /dev/null +++ b/tasks/t34-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def unique(list) + list.uniq.sort +end \ No newline at end of file diff --git a/tasks/t34-openai_gpt_oss_20b.rb b/tasks/t34-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..f4aa471 --- /dev/null +++ b/tasks/t34-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def unique(list) + list.uniq.sort +end \ No newline at end of file diff --git a/tasks/t35-openai_gpt_oss_120b.rb b/tasks/t35-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..19be90f --- /dev/null +++ b/tasks/t35-openai_gpt_oss_120b.rb @@ -0,0 +1,6 @@ +def max_element(list) + return nil if list.empty? + max = list[0] + list.each { |x| max = x if x > max } + max +end \ No newline at end of file diff --git a/tasks/t35-openai_gpt_oss_20b.rb b/tasks/t35-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..8051f22 --- /dev/null +++ b/tasks/t35-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def max_element(list) + list.max +end \ No newline at end of file diff --git a/tasks/t36-openai_gpt_oss_120b.rb b/tasks/t36-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..27b3bc3 --- /dev/null +++ b/tasks/t36-openai_gpt_oss_120b.rb @@ -0,0 +1,12 @@ +def fizz_buzz(n) + return 0 if n <= 0 + count = 0 + i = 1 + while i < n + if i % 11 == 0 || i % 13 == 0 + i.to_s.each_char { |c| count += 1 if c == '7' } + end + i += 1 + end + count +end \ No newline at end of file diff --git a/tasks/t36-openai_gpt_oss_20b.rb b/tasks/t36-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..aef4706 --- /dev/null +++ b/tasks/t36-openai_gpt_oss_20b.rb @@ -0,0 +1,9 @@ +def fizz_buzz(n) + return 0 if n <= 0 + count = 0 + (1...n).each do |i| + next unless i % 11 == 0 || i % 13 == 0 + count += i.to_s.count('7') + end + count +end \ No newline at end of file diff --git a/tasks/t37-openai_gpt_oss_120b.rb b/tasks/t37-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..21a7c3c --- /dev/null +++ b/tasks/t37-openai_gpt_oss_120b.rb @@ -0,0 +1,11 @@ +def sort_even_elements(list) + result = list.dup + even_values = list.each_with_index.map { |v, i| v if i.even? }.compact + even_values.sort! + result.each_with_index do |_, i| + if i.even? + result[i] = even_values.shift + end + end + result +end \ No newline at end of file diff --git a/tasks/t37-openai_gpt_oss_20b.rb b/tasks/t37-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6d9f885 --- /dev/null +++ b/tasks/t37-openai_gpt_oss_20b.rb @@ -0,0 +1,14 @@ +def sort_even_elements(list) + even_vals = list.each_with_index.select { |_, i| i.even? }.map(&:first).sort + result = [] + even_idx = 0 + list.each_with_index do |v, i| + if i.even? + result << even_vals[even_idx] + even_idx += 1 + else + result << v + end + end + result +end \ No newline at end of file diff --git a/tasks/t38-openai_gpt_oss_120b.rb b/tasks/t38-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..175e1ca --- /dev/null +++ b/tasks/t38-openai_gpt_oss_120b.rb @@ -0,0 +1,17 @@ +def encode_cyclic(s) + return s if s.length < 3 + first = s[0, 3] + rest = s[3..-1] || "" + encoded_first = first[1] + first[2] + first[0] + encoded_rest = rest.length % 3 == 0 ? rest : rest[1..-1] + rest[0] + encoded_first + encoded_rest +end + +def decode_cyclic(s) + return s if s.length < 3 + first = s[0, 3] + rest = s[3..-1] || "" + decoded_first = first[2] + first[0] + first[1] + decoded_rest = rest.length % 3 == 0 ? rest : rest[-1] + rest[0...-1] + decoded_first + decoded_rest +end \ No newline at end of file diff --git a/tasks/t38-openai_gpt_oss_20b.rb b/tasks/t38-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..7947103 --- /dev/null +++ b/tasks/t38-openai_gpt_oss_20b.rb @@ -0,0 +1,29 @@ +def encode_cyclic(s) + result = +"" + i = 0 + while i < s.length + chunk = s[i, 3] + if chunk.length == 3 + result << chunk[1, 2] + chunk[0] + else + result << chunk + end + i += 3 + end + result +end + +def decode_cyclic(s) + result = +"" + i = 0 + while i < s.length + chunk = s[i, 3] + if chunk.length == 3 + result << chunk[2] + chunk[0, 2] + else + result << chunk + end + i += 3 + end + result +end \ No newline at end of file diff --git a/tasks/t39-openai_gpt_oss_120b.rb b/tasks/t39-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..ca9a9e1 --- /dev/null +++ b/tasks/t39-openai_gpt_oss_120b.rb @@ -0,0 +1,27 @@ +def prime?(num) + return false if num < 2 + return true if num == 2 + return false if num.even? + limit = Math.sqrt(num).to_i + i = 3 + while i <= limit + return false if num % i == 0 + i += 2 + end + true +end + +def prime_fib(n) + raise ArgumentError, "n must be a positive integer" unless n.is_a?(Integer) && n > 0 + count = 0 + a = 0 + b = 1 + loop do + a, b = b, a + b + next if a < 2 + if prime?(a) + count += 1 + return a if count == n + end + end +end \ No newline at end of file diff --git a/tasks/t39-openai_gpt_oss_20b.rb b/tasks/t39-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..9a2fee3 --- /dev/null +++ b/tasks/t39-openai_gpt_oss_20b.rb @@ -0,0 +1,27 @@ +def prime_fib(n) + raise ArgumentError, 'n must be a positive integer' unless n.is_a?(Integer) && n > 0 + + def is_prime?(num) + return false if num < 2 + return true if num == 2 + return false if num.even? + i = 3 + while i * i <= num + return false if num % i == 0 + i += 2 + end + true + end + + count = 0 + fib_prev = 1 + fib_curr = 1 + loop do + fib_next = fib_prev + fib_curr + fib_prev = fib_curr + fib_curr = fib_next + next unless is_prime?(fib_curr) + count += 1 + return fib_curr if count == n + end +end \ No newline at end of file diff --git a/tasks/t4-openai_gpt_oss_120b.rb b/tasks/t4-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..2f0c97a --- /dev/null +++ b/tasks/t4-openai_gpt_oss_120b.rb @@ -0,0 +1,6 @@ +def mean_absolute_deviation(numbers) + return 0.0 if numbers.empty? || numbers.size == 1 + mean = numbers.sum.to_f / numbers.size + total = numbers.reduce(0.0) { |sum, x| sum + (x - mean).abs } + total / numbers.size +end \ No newline at end of file diff --git a/tasks/t4-openai_gpt_oss_20b.rb b/tasks/t4-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..079daee --- /dev/null +++ b/tasks/t4-openai_gpt_oss_20b.rb @@ -0,0 +1,6 @@ +def mean_absolute_deviation(numbers) + return 0.0 if numbers.empty? || numbers.size == 1 + mean = numbers.sum.to_f / numbers.size + deviations = numbers.map { |x| (x - mean).abs } + deviations.sum.to_f / deviations.size +end \ No newline at end of file diff --git a/tasks/t40-openai_gpt_oss_120b.rb b/tasks/t40-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..d0fc987 --- /dev/null +++ b/tasks/t40-openai_gpt_oss_120b.rb @@ -0,0 +1,19 @@ +def triples_sum_to_zero(numbers) + n = numbers.length + return false if n < 3 + nums = numbers.sort + (0...n - 2).each do |i| + left = i + 1 + right = n - 1 + while left < right + sum = nums[i] + nums[left] + nums[right] + return true if sum == 0 + if sum < 0 + left += 1 + else + right -= 1 + end + end + end + false +end \ No newline at end of file diff --git a/tasks/t40-openai_gpt_oss_20b.rb b/tasks/t40-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..59b4bf7 --- /dev/null +++ b/tasks/t40-openai_gpt_oss_20b.rb @@ -0,0 +1,20 @@ +def triples_sum_to_zero(numbers) + return false if numbers.length < 3 + arr = numbers.sort + n = arr.length + (0...n-2).each do |i| + left = i + 1 + right = n - 1 + while left < right + sum = arr[i] + arr[left] + arr[right] + if sum == 0 + return true + elsif sum < 0 + left += 1 + else + right -= 1 + end + end + end + false +end \ No newline at end of file diff --git a/tasks/t41-openai_gpt_oss_120b.rb b/tasks/t41-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..cfd73a0 --- /dev/null +++ b/tasks/t41-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def car_race_collision(n) + n * n +end \ No newline at end of file diff --git a/tasks/t41-openai_gpt_oss_20b.rb b/tasks/t41-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..cfd73a0 --- /dev/null +++ b/tasks/t41-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def car_race_collision(n) + n * n +end \ No newline at end of file diff --git a/tasks/t42-openai_gpt_oss_120b.rb b/tasks/t42-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..e386e2f --- /dev/null +++ b/tasks/t42-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def incr_list(list) + list.map { |x| x + 1 } +end \ No newline at end of file diff --git a/tasks/t42-openai_gpt_oss_20b.rb b/tasks/t42-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..e386e2f --- /dev/null +++ b/tasks/t42-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def incr_list(list) + list.map { |x| x + 1 } +end \ No newline at end of file diff --git a/tasks/t43-openai_gpt_oss_120b.rb b/tasks/t43-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..c710065 --- /dev/null +++ b/tasks/t43-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def pairs_sum_to_zero(numbers) + seen = {} + numbers.each do |n| + next if n == 0 + return true if seen[-n] + seen[n] = true + end + false +end \ No newline at end of file diff --git a/tasks/t43-openai_gpt_oss_20b.rb b/tasks/t43-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..ae023a4 --- /dev/null +++ b/tasks/t43-openai_gpt_oss_20b.rb @@ -0,0 +1,9 @@ +def pairs_sum_to_zero(numbers) + seen = {} + numbers.each do |num| + next if num == 0 + return true if seen.key?(-num) + seen[num] = true + end + false +end \ No newline at end of file diff --git a/tasks/t44-openai_gpt_oss_120b.rb b/tasks/t44-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..6698b3a --- /dev/null +++ b/tasks/t44-openai_gpt_oss_120b.rb @@ -0,0 +1,11 @@ +def change_base(x, base) + raise ArgumentError, "base must be between 2 and 9" unless base.is_a?(Integer) && base.between?(2, 9) + raise ArgumentError, "x must be a non‑negative integer" unless x.is_a?(Integer) && x >= 0 + return "0" if x == 0 + digits = [] + while x > 0 + digits << (x % base).to_s + x /= base + end + digits.reverse.join +end \ No newline at end of file diff --git a/tasks/t44-openai_gpt_oss_20b.rb b/tasks/t44-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6ea1a45 --- /dev/null +++ b/tasks/t44-openai_gpt_oss_20b.rb @@ -0,0 +1,11 @@ +def change_base(x, base) + raise ArgumentError, "x must be non-negative" unless x.is_a?(Integer) && x >= 0 + raise ArgumentError, "base must be between 2 and 9" unless base.is_a?(Integer) && base.between?(2, 9) + return "0" if x == 0 + digits = [] + while x > 0 + digits << (x % base).to_s + x /= base + end + digits.reverse.join +end \ No newline at end of file diff --git a/tasks/t45-openai_gpt_oss_120b.rb b/tasks/t45-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..56867a9 --- /dev/null +++ b/tasks/t45-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def triangle_area(a, h) + a * h / 2.0 +end \ No newline at end of file diff --git a/tasks/t45-openai_gpt_oss_20b.rb b/tasks/t45-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..56867a9 --- /dev/null +++ b/tasks/t45-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def triangle_area(a, h) + a * h / 2.0 +end \ No newline at end of file diff --git a/tasks/t46-openai_gpt_oss_120b.rb b/tasks/t46-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..e942f35 --- /dev/null +++ b/tasks/t46-openai_gpt_oss_120b.rb @@ -0,0 +1,10 @@ +def fib4(n) + return 0 if n <= 1 + return 2 if n == 2 + return 0 if n == 3 + a = [0, 0, 2, 0] + (4..n).each do |i| + a[i] = a[i - 1] + a[i - 2] + a[i - 3] + a[i - 4] + end + a[n] +end \ No newline at end of file diff --git a/tasks/t46-openai_gpt_oss_20b.rb b/tasks/t46-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..9d03603 --- /dev/null +++ b/tasks/t46-openai_gpt_oss_20b.rb @@ -0,0 +1,13 @@ +def fib4(n) + return 0 if n == 0 || n ==1 || n == 3 + return 2 if n == 2 + a0 = 0 + a1 = 0 + a2 = 2 + a3 = 0 + (4..n).each do + a4 = a0 + a1 + a2 + a3 + a0, a1, a2, a3 = a1, a2, a3, a4 + end + a3 +end \ No newline at end of file diff --git a/tasks/t47-openai_gpt_oss_120b.rb b/tasks/t47-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..0bd6267 --- /dev/null +++ b/tasks/t47-openai_gpt_oss_120b.rb @@ -0,0 +1,8 @@ +def median(numbers) + return nil if numbers.empty? + raise ArgumentError unless numbers.all? { |x| x.is_a?(Numeric) } + sorted = numbers.sort + n = sorted.length + mid = n / 2 + n.odd? ? sorted[mid] : (sorted[mid - 1] + sorted[mid]) / 2.0 +end \ No newline at end of file diff --git a/tasks/t47-openai_gpt_oss_20b.rb b/tasks/t47-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..4372513 --- /dev/null +++ b/tasks/t47-openai_gpt_oss_20b.rb @@ -0,0 +1,15 @@ +def median(numbers) + raise ArgumentError, 'Input must be an array' unless numbers.is_a?(Array) + return nil if numbers.empty? + numbers.each do |n| + raise ArgumentError, 'All elements must be numeric' unless n.is_a?(Integer) || n.is_a?(Float) + end + sorted = numbers.sort + len = sorted.length + mid = len / 2 + if len.odd? + sorted[mid] + else + (sorted[mid - 1] + sorted[mid]) / 2.0 + end +end \ No newline at end of file diff --git a/tasks/t48-openai_gpt_oss_120b.rb b/tasks/t48-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..77def96 --- /dev/null +++ b/tasks/t48-openai_gpt_oss_120b.rb @@ -0,0 +1,4 @@ +def is_palindrome?(text) + filtered = text.downcase.gsub(/[^a-z]/, '') + filtered == filtered.reverse +end \ No newline at end of file diff --git a/tasks/t48-openai_gpt_oss_20b.rb b/tasks/t48-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..bc11d27 --- /dev/null +++ b/tasks/t48-openai_gpt_oss_20b.rb @@ -0,0 +1,4 @@ +def is_palindrome?(text) + cleaned = text.downcase.gsub(/[^a-z]/, '') + cleaned == cleaned.reverse +end \ No newline at end of file diff --git a/tasks/t49-openai_gpt_oss_120b.rb b/tasks/t49-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..9d9c788 --- /dev/null +++ b/tasks/t49-openai_gpt_oss_120b.rb @@ -0,0 +1,11 @@ +def modp(n, p) + return 0 if p == 1 + result = 1 % p + base = 2 % p + while n > 0 + result = (result * base) % p if (n & 1) == 1 + base = (base * base) % p + n >>= 1 + end + result +end \ No newline at end of file diff --git a/tasks/t49-openai_gpt_oss_20b.rb b/tasks/t49-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..2bf1375 --- /dev/null +++ b/tasks/t49-openai_gpt_oss_20b.rb @@ -0,0 +1,10 @@ +def modp(n, p) + result = 1 + base = 2 % p + while n > 0 + result = (result * base) % p if (n & 1) == 1 + base = (base * base) % p + n >>= 1 + end + result +end \ No newline at end of file diff --git a/tasks/t5-openai_gpt_oss_120b.rb b/tasks/t5-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..d362e13 --- /dev/null +++ b/tasks/t5-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def intersperse(numbers, delimeter) + return [] if numbers.empty? + result = [] + numbers.each_with_index do |num, i| + result << num + result << delimeter if i < numbers.size - 1 + end + result +end \ No newline at end of file diff --git a/tasks/t5-openai_gpt_oss_20b.rb b/tasks/t5-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..c01c5cf --- /dev/null +++ b/tasks/t5-openai_gpt_oss_20b.rb @@ -0,0 +1,9 @@ +def intersperse(numbers, delimeter) + return [] if numbers.empty? + result = [] + numbers.each_with_index do |num, idx| + result << num + result << delimeter unless idx == numbers.size - 1 + end + result +end \ No newline at end of file diff --git a/tasks/t50-openai_gpt_oss_120b.rb b/tasks/t50-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..cd5b374 --- /dev/null +++ b/tasks/t50-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def decode_shift(s) + s.each_char.map { |c| ((c.ord - 97 - 5) % 26 + 97).chr }.join +end \ No newline at end of file diff --git a/tasks/t50-openai_gpt_oss_20b.rb b/tasks/t50-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..5c7068a --- /dev/null +++ b/tasks/t50-openai_gpt_oss_20b.rb @@ -0,0 +1,7 @@ +def decode_shift(s) + s.chars.map do |c| + idx = c.ord - 'a'.ord + new_idx = (idx - 5) % 26 + (new_idx + 'a'.ord).chr + end.join +end \ No newline at end of file diff --git a/tasks/t51-openai_gpt_oss_120b.rb b/tasks/t51-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..2071047 --- /dev/null +++ b/tasks/t51-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def remove_vowels(text) + text.gsub(/[aeiouAEIOU]/, '') +end \ No newline at end of file diff --git a/tasks/t51-openai_gpt_oss_20b.rb b/tasks/t51-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..2071047 --- /dev/null +++ b/tasks/t51-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def remove_vowels(text) + text.gsub(/[aeiouAEIOU]/, '') +end \ No newline at end of file diff --git a/tasks/t52-openai_gpt_oss_120b.rb b/tasks/t52-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..8316af5 --- /dev/null +++ b/tasks/t52-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def below_threshold(numbers, threshold) + numbers.all? { |n| n < threshold } +end \ No newline at end of file diff --git a/tasks/t52-openai_gpt_oss_20b.rb b/tasks/t52-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..8316af5 --- /dev/null +++ b/tasks/t52-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def below_threshold(numbers, threshold) + numbers.all? { |n| n < threshold } +end \ No newline at end of file diff --git a/tasks/t53-openai_gpt_oss_120b.rb b/tasks/t53-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..e3bbabc --- /dev/null +++ b/tasks/t53-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def add(x, y) + x + y +end \ No newline at end of file diff --git a/tasks/t53-openai_gpt_oss_20b.rb b/tasks/t53-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..e3bbabc --- /dev/null +++ b/tasks/t53-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def add(x, y) + x + y +end \ No newline at end of file diff --git a/tasks/t54-openai_gpt_oss_120b.rb b/tasks/t54-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..beccda4 --- /dev/null +++ b/tasks/t54-openai_gpt_oss_120b.rb @@ -0,0 +1,4 @@ +def same_chars?(s0, s1) + require 'set' + Set.new(s0.downcase.chars) == Set.new(s1.downcase.chars) +end \ No newline at end of file diff --git a/tasks/t54-openai_gpt_oss_20b.rb b/tasks/t54-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..8bc32d5 --- /dev/null +++ b/tasks/t54-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def same_chars?(s0, s1) + s0.downcase.chars.uniq.sort == s1.downcase.chars.uniq.sort +end \ No newline at end of file diff --git a/tasks/t55-openai_gpt_oss_120b.rb b/tasks/t55-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..84af0e5 --- /dev/null +++ b/tasks/t55-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def fib(n) + return 1 if n <= 2 + a = 1 + b = 1 + (3..n).each do + a, b = b, a + b + end + b +end \ No newline at end of file diff --git a/tasks/t55-openai_gpt_oss_20b.rb b/tasks/t55-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..84af0e5 --- /dev/null +++ b/tasks/t55-openai_gpt_oss_20b.rb @@ -0,0 +1,9 @@ +def fib(n) + return 1 if n <= 2 + a = 1 + b = 1 + (3..n).each do + a, b = b, a + b + end + b +end \ No newline at end of file diff --git a/tasks/t56-openai_gpt_oss_120b.rb b/tasks/t56-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..fded604 --- /dev/null +++ b/tasks/t56-openai_gpt_oss_120b.rb @@ -0,0 +1,14 @@ +def correct_bracketing(brackets) + balance = 0 + brackets.each_char do |ch| + if ch == '<' + balance += 1 + elsif ch == '>' + balance -= 1 + return false if balance < 0 + else + return false + end + end + balance == 0 +end \ No newline at end of file diff --git a/tasks/t56-openai_gpt_oss_20b.rb b/tasks/t56-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..b4592fb --- /dev/null +++ b/tasks/t56-openai_gpt_oss_20b.rb @@ -0,0 +1,12 @@ +def correct_bracketing(brackets) + balance = 0 + brackets.each_char do |ch| + if ch == '<' + balance += 1 + elsif ch == '>' + balance -= 1 + return false if balance < 0 + end + end + balance.zero? +end \ No newline at end of file diff --git a/tasks/t57-openai_gpt_oss_120b.rb b/tasks/t57-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..05c0e6a --- /dev/null +++ b/tasks/t57-openai_gpt_oss_120b.rb @@ -0,0 +1,11 @@ +def monotonic?(arr) + return true if arr.length <= 1 + inc = true + dec = true + (1...arr.length).each do |i| + inc = false if arr[i] < arr[i - 1] + dec = false if arr[i] > arr[i - 1] + break unless inc || dec + end + inc || dec +end \ No newline at end of file diff --git a/tasks/t57-openai_gpt_oss_20b.rb b/tasks/t57-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..168d9af --- /dev/null +++ b/tasks/t57-openai_gpt_oss_20b.rb @@ -0,0 +1,13 @@ +def monotonic?(arr) + return true if arr.size <= 1 + increasing = true + decreasing = true + (1...arr.size).each do |i| + if arr[i] < arr[i - 1] + increasing = false + elsif arr[i] > arr[i - 1] + decreasing = false + end + end + increasing || decreasing +end \ No newline at end of file diff --git a/tasks/t58-openai_gpt_oss_120b.rb b/tasks/t58-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..b3bf435 --- /dev/null +++ b/tasks/t58-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def common(l1, l2) + (l1 & l2).sort +end \ No newline at end of file diff --git a/tasks/t58-openai_gpt_oss_20b.rb b/tasks/t58-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..b3bf435 --- /dev/null +++ b/tasks/t58-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def common(l1, l2) + (l1 & l2).sort +end \ No newline at end of file diff --git a/tasks/t59-openai_gpt_oss_120b.rb b/tasks/t59-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..1204187 --- /dev/null +++ b/tasks/t59-openai_gpt_oss_120b.rb @@ -0,0 +1,17 @@ +def largest_prime_factor(n) + max_factor = 1 + while n % 2 == 0 + max_factor = 2 + n /= 2 + end + i = 3 + while i * i <= n + while n % i == 0 + max_factor = i + n /= i + end + i += 2 + end + max_factor = n if n > 1 + max_factor +end \ No newline at end of file diff --git a/tasks/t59-openai_gpt_oss_20b.rb b/tasks/t59-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..5368e9a --- /dev/null +++ b/tasks/t59-openai_gpt_oss_20b.rb @@ -0,0 +1,13 @@ +def largest_prime_factor(n) + largest = nil + i = 2 + while i * i <= n + while n % i == 0 + largest = i + n /= i + end + i += 1 + end + largest = n if n > 1 + largest +end \ No newline at end of file diff --git a/tasks/t6-openai_gpt_oss_120b.rb b/tasks/t6-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..41430df --- /dev/null +++ b/tasks/t6-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def parse_nested_parens(paren_string) + return [] if paren_string.strip.empty? + paren_string.split(/\s+/).map do |group| + depth = 0 + max_depth = 0 + group.each_char do |ch| + if ch == '(' + depth += 1 + max \ No newline at end of file diff --git a/tasks/t6-openai_gpt_oss_20b.rb b/tasks/t6-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6b1fc54 --- /dev/null +++ b/tasks/t6-openai_gpt_oss_20b.rb @@ -0,0 +1,16 @@ +def parse_nested_parens(paren_string) + return [] if paren_string.strip.empty? + paren_string.split(/\s+/).map do |group| + depth = 0 + max_depth = 0 + group.each_char do |ch| + if ch == '(' + depth += 1 + max_depth = depth if depth > max_depth + elsif ch == ')' + depth -= 1 + end + end + max_depth + end +end \ No newline at end of file diff --git a/tasks/t60-openai_gpt_oss_120b.rb b/tasks/t60-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..a749028 --- /dev/null +++ b/tasks/t60-openai_gpt_oss_120b.rb @@ -0,0 +1,4 @@ +def sum_to_n(n) + return 0 if n <= 0 + n * (n + 1) / 2 +end \ No newline at end of file diff --git a/tasks/t60-openai_gpt_oss_20b.rb b/tasks/t60-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..cd5bb3c --- /dev/null +++ b/tasks/t60-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def sum_to_n(n) + n * (n + 1) / 2 +end \ No newline at end of file diff --git a/tasks/t61-openai_gpt_oss_120b.rb b/tasks/t61-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..d3cd849 --- /dev/null +++ b/tasks/t61-openai_gpt_oss_120b.rb @@ -0,0 +1,13 @@ +def correct_bracketing(brackets) + balance = 0 + brackets.each_char do |ch| + case ch + when '(' + balance += 1 + when ')' + balance -= 1 + return false if balance < 0 + end + end + balance.zero? +end \ No newline at end of file diff --git a/tasks/t61-openai_gpt_oss_20b.rb b/tasks/t61-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..d3cd849 --- /dev/null +++ b/tasks/t61-openai_gpt_oss_20b.rb @@ -0,0 +1,13 @@ +def correct_bracketing(brackets) + balance = 0 + brackets.each_char do |ch| + case ch + when '(' + balance += 1 + when ')' + balance -= 1 + return false if balance < 0 + end + end + balance.zero? +end \ No newline at end of file diff --git a/tasks/t62-openai_gpt_oss_120b.rb b/tasks/t62-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..472cd8f --- /dev/null +++ b/tasks/t62-openai_gpt_oss_120b.rb @@ -0,0 +1,4 @@ +def derivative(coefficients) + return [] if coefficients.nil? || coefficients.length <= 1 + (1...coefficients.length).map { |i| coefficients[i] * i } +end \ No newline at end of file diff --git a/tasks/t62-openai_gpt_oss_20b.rb b/tasks/t62-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..00b33b3 --- /dev/null +++ b/tasks/t62-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def derivative(coefficients) + coefficients.each_with_index.drop(1).map { |c, i| c * i } +end \ No newline at end of file diff --git a/tasks/t63-openai_gpt_oss_120b.rb b/tasks/t63-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..a96d2dc --- /dev/null +++ b/tasks/t63-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +def fibfib(n) + return 0 if n == 0 || n == 1 + return 1 if n == 2 + a, b, c = 0, 0, 1 + (3..n).each { d = a + b + c; a, b, c = b, c, d } + c +end \ No newline at end of file diff --git a/tasks/t63-openai_gpt_oss_20b.rb b/tasks/t63-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..436b450 --- /dev/null +++ b/tasks/t63-openai_gpt_oss_20b.rb @@ -0,0 +1,11 @@ +def fibfib(n) + return 0 if n == 0 || n == 1 + return 1 if n == 2 + a = 0 + b = 0 + c = 1 + (3..n).each do + a, b, c = b, c, a + b + c + end + c +end \ No newline at end of file diff --git a/tasks/t64-openai_gpt_oss_120b.rb b/tasks/t64-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..221682d --- /dev/null +++ b/tasks/t64-openai_gpt_oss_120b.rb @@ -0,0 +1,14 @@ +def vowels_count(word) + return 0 if word.nil? || word.empty? + count = 0 + last_index = word.length - 1 + word.each_char.with_index do |ch, idx| + lc = ch.downcase + if %w[a e i o u].include?(lc) + count += 1 + elsif lc == 'y' && idx == last_index + count += 1 + end + end + count +end \ No newline at end of file diff --git a/tasks/t64-openai_gpt_oss_20b.rb b/tasks/t64-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..ee3dc86 --- /dev/null +++ b/tasks/t64-openai_gpt_oss_20b.rb @@ -0,0 +1,12 @@ +def vowels_count(word) + count = 0 + return 0 if word.empty? + word.chars.each_with_index do |ch, idx| + if 'aeiouAEIOU'.include?(ch) + count += 1 + elsif (ch == 'y' || ch == 'Y') && idx == word.length - 1 + count += 1 + end + end + count +end \ No newline at end of file diff --git a/tasks/t65-openai_gpt_oss_120b.rb b/tasks/t65-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..f11007c --- /dev/null +++ b/tasks/t65-openai_gpt_oss_120b.rb @@ -0,0 +1,10 @@ +def circular_shift(x, shift) + digits = x.to_s + len = digits.length + return digits.reverse if shift > len + s = shift % len + return digits if s == 0 + tail = digits[-s, s] + head = digits[0...-s] + tail + head +end \ No newline at end of file diff --git a/tasks/t65-openai_gpt_oss_20b.rb b/tasks/t65-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6d06787 --- /dev/null +++ b/tasks/t65-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def circular_shift(x, shift) + s = x.to_s + n = s.length + return s.reverse if shift > n + shift %= n + return s if shift.zero? + s[-shift..-1] + s[0...-shift] +end \ No newline at end of file diff --git a/tasks/t66-openai_gpt_oss_120b.rb b/tasks/t66-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..323f4fe --- /dev/null +++ b/tasks/t66-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def digit_sum(s) + sum = 0 + s.each_char do |ch| + if ch >= 'A' && ch <= 'Z' + sum += ch.ord + end + end + sum +end \ No newline at end of file diff --git a/tasks/t66-openai_gpt_oss_20b.rb b/tasks/t66-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..21f4695 --- /dev/null +++ b/tasks/t66-openai_gpt_oss_20b.rb @@ -0,0 +1,9 @@ +def digit_sum(s) + sum = 0 + s.each_char do |c| + if c >= 'A' && c <= 'Z' + sum += c.ord + end + end + sum +end \ No newline at end of file diff --git a/tasks/t67-openai_gpt_oss_120b.rb b/tasks/t67-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..552146e --- /dev/null +++ b/tasks/t67-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +def fruit_distribution(fruit_string, total_fruits) + match = fruit_string.match(/(\d+)\s+apples\s+and\s+(\d+)\s+oranges/) + apples = match[1].to_i + oranges = match[2].to_i + mango = total_fruits - (apples + oranges) + mango < 0 ? 0 : mango +end \ No newline at end of file diff --git a/tasks/t67-openai_gpt_oss_20b.rb b/tasks/t67-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..ac5e703 --- /dev/null +++ b/tasks/t67-openai_gpt_oss_20b.rb @@ -0,0 +1,7 @@ +def fruit_distribution(fruit_string, total_fruits) + matches = fruit_string.match(/(\d+)\s+apples\s+and\s+(\d+)\s+oranges/) + apples = matches[1].to_i + oranges = matches[2].to_i + mangoes = total_fruits - apples - oranges + mangoes < 0 ? 0 : mangoes +end \ No newline at end of file diff --git a/tasks/t68-openai_gpt_oss_120b.rb b/tasks/t68-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..4e57182 --- /dev/null +++ b/tasks/t68-openai_gpt_oss_120b.rb @@ -0,0 +1,12 @@ +def pluck(arr) + min_val = nil + min_idx = nil + arr.each_with_index do |v, i| + next unless v.even? + if min_val.nil? || v < min_val + min_val = v + min_idx = i + end + end + min_val.nil? ? [] : [min_val, min_idx] +end \ No newline at end of file diff --git a/tasks/t68-openai_gpt_oss_20b.rb b/tasks/t68-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..893e375 --- /dev/null +++ b/tasks/t68-openai_gpt_oss_20b.rb @@ -0,0 +1,13 @@ +def pluck(arr) + min_even = nil + min_index = nil + arr.each_with_index do |value, index| + next unless value.even? + if min_even.nil? || value < min_even + min_even = value + min_index = index + end + end + return [] if min_even.nil? + [min_even, min_index] +end \ No newline at end of file diff --git a/tasks/t69-openai_gpt_oss_120b.rb b/tasks/t69-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..1aaaa4a --- /dev/null +++ b/tasks/t69-openai_gpt_oss_120b.rb @@ -0,0 +1,11 @@ +def search(lst) + freq = Hash.new(0) + lst.each { |x| freq[x] += 1 } + result = -1 + freq.each do |num, count| + if count >= num && num > result + result = num + end + end + result +end \ No newline at end of file diff --git a/tasks/t69-openai_gpt_oss_20b.rb b/tasks/t69-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..5414f90 --- /dev/null +++ b/tasks/t69-openai_gpt_oss_20b.rb @@ -0,0 +1,6 @@ +def search(lst) + freq = Hash.new(0) + lst.each { |num| freq[num] += 1 } + candidates = freq.select { |num, count| count >= num }.keys + candidates.empty? ? -1 : candidates.max +end \ No newline at end of file diff --git a/tasks/t7-openai_gpt_oss_120b.rb b/tasks/t7-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..47ac4f4 --- /dev/null +++ b/tasks/t7-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def filter_by_substring(strings, substring) + strings.select { |s| s.include?(substring) } +end \ No newline at end of file diff --git a/tasks/t7-openai_gpt_oss_20b.rb b/tasks/t7-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..47ac4f4 --- /dev/null +++ b/tasks/t7-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def filter_by_substring(strings, substring) + strings.select { |s| s.include?(substring) } +end \ No newline at end of file diff --git a/tasks/t70-openai_gpt_oss_120b.rb b/tasks/t70-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..ae14526 --- /dev/null +++ b/tasks/t70-openai_gpt_oss_120b.rb @@ -0,0 +1,18 @@ +def strange_sort_list(lst) + sorted = lst.sort + result = [] + left = 0 + right = sorted.length - 1 + take_min = true + while left <= right + if take_min + result << sorted[left] + left += 1 + else + result << sorted[right] + right -= 1 + end + take_min = !take_min + end + result +end \ No newline at end of file diff --git a/tasks/t70-openai_gpt_oss_20b.rb b/tasks/t70-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..fd1eb0d --- /dev/null +++ b/tasks/t70-openai_gpt_oss_20b.rb @@ -0,0 +1,10 @@ +def strange_sort_list(lst) + sorted = lst.sort + result = [] + while sorted.any? + result << sorted.shift + break unless sorted.any? + result << sorted.pop + end + result +end \ No newline at end of file diff --git a/tasks/t71-openai_gpt_oss_120b.rb b/tasks/t71-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..718d99e --- /dev/null +++ b/tasks/t71-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +def triangle_area(a, b, c) + return -1 unless a > 0 && b > 0 && c > 0 + return -1 unless a + b > c && a + c > b && b + c > a + s = (a + b + c) / 2.0 + area = Math.sqrt(s * (s - a) * (s - b) * (s - c)) + area.round(2) +end \ No newline at end of file diff --git a/tasks/t71-openai_gpt_oss_20b.rb b/tasks/t71-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..d31382e --- /dev/null +++ b/tasks/t71-openai_gpt_oss_20b.rb @@ -0,0 +1,7 @@ +def triangle_area(a, b, c) + return -1 if a <= 0 || b <= 0 || c <= 0 + return -1 unless a + b > c && a + c > b && b + c > a + s = (a + b + c) / 2.0 + area = Math.sqrt(s * (s - a) * (s - b) * (s - c)) + area.round(2) +end \ No newline at end of file diff --git a/tasks/t72-openai_gpt_oss_120b.rb b/tasks/t72-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..2309a4a --- /dev/null +++ b/tasks/t72-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def will_it_fly?(q, w) + q == q.reverse && q.sum <= w +end \ No newline at end of file diff --git a/tasks/t72-openai_gpt_oss_20b.rb b/tasks/t72-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..e9fdaa1 --- /dev/null +++ b/tasks/t72-openai_gpt_oss_20b.rb @@ -0,0 +1,5 @@ +def will_it_fly?(q, w) + balanced = q == q.reverse + weight_ok = q.sum <= w + balanced && weight_ok +end \ No newline at end of file diff --git a/tasks/t73-openai_gpt_oss_120b.rb b/tasks/t73-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..fc9f375 --- /dev/null +++ b/tasks/t73-openai_gpt_oss_120b.rb @@ -0,0 +1,11 @@ +def smallest_change(arr) + count = 0 + i = 0 + j = arr.length - 1 + while i < j + count += 1 if arr[i] != arr[j] + i += 1 + j -= 1 + end + count +end \ No newline at end of file diff --git a/tasks/t73-openai_gpt_oss_20b.rb b/tasks/t73-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..e8a11e4 --- /dev/null +++ b/tasks/t73-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def smallest_change(arr) + n = arr.length + changes = 0 + (0...(n / 2)).each do |i| + changes += 1 if arr[i] != arr[n - 1 - i] + end + changes +end \ No newline at end of file diff --git a/tasks/t74-openai_gpt_oss_120b.rb b/tasks/t74-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..2442a08 --- /dev/null +++ b/tasks/t74-openai_gpt_oss_120b.rb @@ -0,0 +1,5 @@ +def total_match(lst1, lst2) + sum1 = lst1.reduce(0) { |acc, s| acc + s.length } + sum2 = lst2.reduce(0) { |acc, s| acc + s.length } + sum1 <= sum2 ? lst1 : lst2 +end \ No newline at end of file diff --git a/tasks/t74-openai_gpt_oss_20b.rb b/tasks/t74-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..9e8d77f --- /dev/null +++ b/tasks/t74-openai_gpt_oss_20b.rb @@ -0,0 +1,9 @@ +def total_match(lst1, lst2) + sum1 = lst1.sum { |s| s.length } + sum2 = lst2.sum { |s| s.length } + if sum1 <= sum2 + lst1 + else + lst2 + end +end \ No newline at end of file diff --git a/tasks/t75-openai_gpt_oss_120b.rb b/tasks/t75-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..cddf6f3 --- /dev/null +++ b/tasks/t75-openai_gpt_oss_120b.rb @@ -0,0 +1,30 @@ +def is_prime?(n) + return false if n < 2 + i = 2 + while i * i <= n + return false if n % i == 0 + i += 1 + end + true +end + +def is_multiply_prime?(a) + return false if a <= 1 + primes = [] + n = a + i = 2 + while i * i <= n + if n % i == 0 + cnt = 0 + while n % i == 0 + n /= i + cnt += 1 + end + return false if cnt > 1 + primes << i + end + i += 1 + end + primes << n if n > 1 + primes.size == 3 && primes.uniq.size == 3 +end \ No newline at end of file diff --git a/tasks/t75-openai_gpt_oss_20b.rb b/tasks/t75-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..44e819d --- /dev/null +++ b/tasks/t75-openai_gpt_oss_20b.rb @@ -0,0 +1,16 @@ +def is_multiply_prime?(a) + return false if a <= 1 + factors = {} + n = a + i = 2 + while i * i <= n + while n % i == 0 + factors[i] = (factors[i] || 0) + 1 + n /= i + end + i += 1 + end + factors[n] = (factors[n] || 0) + 1 if n > 1 + return false if factors.values.any? { |e| e > 1 } + factors.size == 3 +end \ No newline at end of file diff --git a/tasks/t76-openai_gpt_oss_120b.rb b/tasks/t76-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..b419fd9 --- /dev/null +++ b/tasks/t76-openai_gpt_oss_120b.rb @@ -0,0 +1,12 @@ +def is_simple_power?(x, n) + return false if x < 0 || n < 0 + return false if x == 0 && n == 0 + return false if x == 0 && n != 0 + return true if x == 1 && n != 0 + return false if n == 0 + return false if n == 1 && x != 1 + while x % n == 0 + x /= n + end + x == 1 +end \ No newline at end of file diff --git a/tasks/t76-openai_gpt_oss_20b.rb b/tasks/t76-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..2a34164 --- /dev/null +++ b/tasks/t76-openai_gpt_oss_20b.rb @@ -0,0 +1,11 @@ +def is_simple_power?(x, n) + return false if x < 0 || n < 0 + return false if n == 0 + return true if x == 1 && n != 0 + return false if x == 0 + return x == 1 if n == 1 + while x % n == 0 + x /= n + end + x == 1 +end \ No newline at end of file diff --git a/tasks/t77-openai_gpt_oss_120b.rb b/tasks/t77-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..59b3042 --- /dev/null +++ b/tasks/t77-openai_gpt_oss_120b.rb @@ -0,0 +1,15 @@ +def is_cube?(a) + low = a < 0 ? a : 0 + high = a > 0 ? a : 0 + while low <= high + mid = (low + high) / 2 + cube = mid * mid * mid + return true if cube == a + if cube < a + low = mid + 1 + else + high = mid - 1 + end + end + false +end \ No newline at end of file diff --git a/tasks/t77-openai_gpt_oss_20b.rb b/tasks/t77-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..5a6e0be --- /dev/null +++ b/tasks/t77-openai_gpt_oss_20b.rb @@ -0,0 +1,18 @@ +def is_cube?(a) + return true if a == 0 + abs_a = a.abs + low = 0 + high = abs_a + while low <= high + mid = (low + high) / 2 + cube = mid * mid * mid + if cube == abs_a + return true + elsif cube < abs_a + low = mid + 1 + else + high = mid - 1 + end + end + false +end \ No newline at end of file diff --git a/tasks/t78-openai_gpt_oss_120b.rb b/tasks/t78-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..391f48a --- /dev/null +++ b/tasks/t78-openai_gpt_oss_120b.rb @@ -0,0 +1,6 @@ +def hex_key(hex_string) + prime_digits = ['2', '3', '5', '7', 'B', 'D'] + count = 0 + hex_string.each_char { |ch| count += 1 if prime_digits.include?(ch) } + count +end \ No newline at end of file diff --git a/tasks/t78-openai_gpt_oss_20b.rb b/tasks/t78-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..a5f19b2 --- /dev/null +++ b/tasks/t78-openai_gpt_oss_20b.rb @@ -0,0 +1,4 @@ +def hex_key(hex_string) + prime_digits = ['2', '3', '5', '7', 'B', 'D'] + hex_string.chars.count { |c| prime_digits.include?(c) } +end \ No newline at end of file diff --git a/tasks/t79-openai_gpt_oss_120b.rb b/tasks/t79-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..c31f744 --- /dev/null +++ b/tasks/t79-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def decimal_to_binary(decimal) + "db#{decimal.to_s(2)}db" +end \ No newline at end of file diff --git a/tasks/t79-openai_gpt_oss_20b.rb b/tasks/t79-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..7e9b717 --- /dev/null +++ b/tasks/t79-openai_gpt_oss_20b.rb @@ -0,0 +1,4 @@ +def decimal_to_binary(decimal) + binary = decimal.to_s(2) + "db#{binary}db" +end \ No newline at end of file diff --git a/tasks/t8-openai_gpt_oss_120b.rb b/tasks/t8-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..d50708c --- /dev/null +++ b/tasks/t8-openai_gpt_oss_120b.rb @@ -0,0 +1,5 @@ +def sum_product(numbers) + sum = numbers.sum + product = numbers.empty? ? 1 : numbers.reduce(1) { |acc, n| acc * n } + [sum, product] +end \ No newline at end of file diff --git a/tasks/t8-openai_gpt_oss_20b.rb b/tasks/t8-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..b3e13d6 --- /dev/null +++ b/tasks/t8-openai_gpt_oss_20b.rb @@ -0,0 +1,5 @@ +def sum_product(numbers) + sum = numbers.reduce(0, :+) + product = numbers.reduce(1, :*) + [sum, product] +end \ No newline at end of file diff --git a/tasks/t80-openai_gpt_oss_120b.rb b/tasks/t80-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..f6ac2ab --- /dev/null +++ b/tasks/t80-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def is_happy?(s) + return false if s.nil? || s.length < 3 + str = s.downcase + (0..str.length - 3).each do |i| + a, b, c = str[i], str[i + 1], str[i + 2] + return false unless a != b && a != c && b != c + end + true +end \ No newline at end of file diff --git a/tasks/t80-openai_gpt_oss_20b.rb b/tasks/t80-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..af61149 --- /dev/null +++ b/tasks/t80-openai_gpt_oss_20b.rb @@ -0,0 +1,10 @@ +def is_happy?(s) + return false if s.length < 3 + (0..s.length - 3).each do |i| + a = s[i] + b = s[i + 1] + c = s[i + 2] + return false if a == b || a == c || b == c + end + true +end \ No newline at end of file diff --git a/tasks/t81-openai_gpt_oss_120b.rb b/tasks/t81-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..e4dff5e --- /dev/null +++ b/tasks/t81-openai_gpt_oss_120b.rb @@ -0,0 +1,37 @@ +def numerical_letter_grade(grades) + raise ArgumentError, "Input must be an array" unless grades.is_a?(Array) + + grades.map do |g| + unless g.is_a?(Numeric) && g >= 0.0 && g <= 4.0 + raise ArgumentError, "Each grade must be a number between 0.0 and 4.0" + end + + if g == 4.0 + "A+" + elsif g > 3.7 + "A" + elsif g > 3.3 + "A-" + elsif g > 3.0 + "B+" + elsif g > 2.7 + "B" + elsif g > 2.3 + "B-" + elsif g > 2.0 + "C+" + elsif g > 1.7 + "C" + elsif g > 1.3 + "C-" + elsif g > 1.0 + "D+" + elsif g > 0.7 + "D" + elsif g > 0.0 + "D-" + else + "E" + end + end +end \ No newline at end of file diff --git a/tasks/t81-openai_gpt_oss_20b.rb b/tasks/t81-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..43b7bab --- /dev/null +++ b/tasks/t81-openai_gpt_oss_20b.rb @@ -0,0 +1,38 @@ +def numerical_letter_grade(grades) + grades.map do |g| + unless g.is_a?(Numeric) + raise ArgumentError, "All elements must be numeric" + end + if g < 0.0 || g > 4.0 + raise ArgumentError, "GPA must be between 0.0 and 4.0" + end + case + when g == 4.0 + "A+" + when g > 3.7 + "A" + when g > 3.3 + "A-" + when g > 3.0 + "B+" + when g > 2.7 + "B" + when g > 2.3 + "B-" + when g > 2.0 + "C+" + when g > 1.7 + "C" + when g > 1.3 + "C-" + when g > 1.0 + "D+" + when g > 0.7 + "D" + when g > 0.0 + "D-" + else + "E" + end + end +end \ No newline at end of file diff --git a/tasks/t82-openai_gpt_oss_120b.rb b/tasks/t82-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..7e193c0 --- /dev/null +++ b/tasks/t82-openai_gpt_oss_120b.rb @@ -0,0 +1,10 @@ +def prime_length?(string) + len = string.length + return false if len < 2 + i = 2 + while i * i <= len + return false if len % i == 0 + i += 1 + end + true +end \ No newline at end of file diff --git a/tasks/t82-openai_gpt_oss_20b.rb b/tasks/t82-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..8ef630a --- /dev/null +++ b/tasks/t82-openai_gpt_oss_20b.rb @@ -0,0 +1,11 @@ +def prime_length?(string) + len = string.length + return false if len <= 1 + return false if len.even? && len != 2 + i = 3 + while i * i <= len + return false if len % i == 0 + i += 2 + end + true +end \ No newline at end of file diff --git a/tasks/t83-openai_gpt_oss_120b.rb b/tasks/t83-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..a15542d --- /dev/null +++ b/tasks/t83-openai_gpt_oss_120b.rb @@ -0,0 +1,8 @@ +def starts_one_ends(n) + return 0 if n <= 0 + return 1 if n == 1 + start_cnt = 10 ** (n - 1) + end_cnt = 9 * (10 ** (n - 2)) + overlap = 10 ** (n - 2) + start_cnt + end_cnt - overlap +end \ No newline at end of file diff --git a/tasks/t83-openai_gpt_oss_20b.rb b/tasks/t83-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..1758491 --- /dev/null +++ b/tasks/t83-openai_gpt_oss_20b.rb @@ -0,0 +1,4 @@ +def starts_one_ends(n) + return 2 if n == 1 + 10**(n - 1) + 8 * 10**(n - 2) +end \ No newline at end of file diff --git a/tasks/t84-openai_gpt_oss_120b.rb b/tasks/t84-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..3019a7d --- /dev/null +++ b/tasks/t84-openai_gpt_oss_120b.rb @@ -0,0 +1,4 @@ +def sum_binary_digits(n) + sum = n.to_s.chars.map { |c| c.to_i }.sum + sum.to_s(2) +end \ No newline at end of file diff --git a/tasks/t84-openai_gpt_oss_20b.rb b/tasks/t84-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..8a53ecf --- /dev/null +++ b/tasks/t84-openai_gpt_oss_20b.rb @@ -0,0 +1,4 @@ +def sum_binary_digits(n) + sum = n.digits.sum + sum.to_s(2) +end \ No newline at end of file diff --git a/tasks/t85-openai_gpt_oss_120b.rb b/tasks/t85-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..6bb911d --- /dev/null +++ b/tasks/t85-openai_gpt_oss_120b.rb @@ -0,0 +1,7 @@ +def add_even_at_odd(lst) + sum = 0 + lst.each_with_index do |num, idx| + sum += num if idx.odd? && num.even? + end + sum +end \ No newline at end of file diff --git a/tasks/t85-openai_gpt_oss_20b.rb b/tasks/t85-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6bb911d --- /dev/null +++ b/tasks/t85-openai_gpt_oss_20b.rb @@ -0,0 +1,7 @@ +def add_even_at_odd(lst) + sum = 0 + lst.each_with_index do |num, idx| + sum += num if idx.odd? && num.even? + end + sum +end \ No newline at end of file diff --git a/tasks/t86-openai_gpt_oss_120b.rb b/tasks/t86-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..f155fed --- /dev/null +++ b/tasks/t86-openai_gpt_oss_120b.rb @@ -0,0 +1,11 @@ +def anti_shuffle(s) + tokens = s.scan(/[^ ]+| +/) + tokens.map! do |token| + if token.strip.empty? + token + else + token.chars.sort.join + end + end + tokens.join +end \ No newline at end of file diff --git a/tasks/t86-openai_gpt_oss_20b.rb b/tasks/t86-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..ad15a50 --- /dev/null +++ b/tasks/t86-openai_gpt_oss_20b.rb @@ -0,0 +1,11 @@ +def anti_shuffle(s) + result = +"" + s.scan(/(\S+)|(\s+)/) do |word, space| + if word + result << word.chars.sort.join + else + result << space + end + end + result +end \ No newline at end of file diff --git a/tasks/t87-openai_gpt_oss_120b.rb b/tasks/t87-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..4b6d161 --- /dev/null +++ b/tasks/t87-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def get_row(lst, x) + result = [] + lst.each_with_index do |row, row_idx| + row.each_with_index do |val, col_idx| + result << [row_idx, col_idx] if val == x + end + end + result.sort_by { |row_idx, col_idx| [row_idx, -col_idx] } +end \ No newline at end of file diff --git a/tasks/t87-openai_gpt_oss_20b.rb b/tasks/t87-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..76d8dfe --- /dev/null +++ b/tasks/t87-openai_gpt_oss_20b.rb @@ -0,0 +1,9 @@ +def get_row(lst, x) + coords = [] + lst.each_with_index do |row, i| + row.each_with_index do |val, j| + coords << [i, j] if val == x + end + end + coords.sort_by { |r, c| [r, -c] } +end \ No newline at end of file diff --git a/tasks/t88-openai_gpt_oss_120b.rb b/tasks/t88-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..2f3e040 --- /dev/null +++ b/tasks/t88-openai_gpt_oss_120b.rb @@ -0,0 +1,6 @@ +def sort_array(array) + return [] if array.empty? + sum = array.first + array.last + sorted = array.sort + sum.odd? ? sorted : sorted.reverse +end \ No newline at end of file diff --git a/tasks/t88-openai_gpt_oss_20b.rb b/tasks/t88-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..add2aa0 --- /dev/null +++ b/tasks/t88-openai_gpt_oss_20b.rb @@ -0,0 +1,10 @@ +def sort_array(array) + arr = array.dup + return arr if arr.empty? + sum = arr.first + arr.last + if sum.odd? + arr.sort + else + arr.sort.reverse + end +end \ No newline at end of file diff --git a/tasks/t89-openai_gpt_oss_120b.rb b/tasks/t89-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..3c4ad84 --- /dev/null +++ b/tasks/t89-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def encrypt(s) + s.each_char.map { |c| ((c.ord - 97 + 4) % 26 + 97).chr }.join +end \ No newline at end of file diff --git a/tasks/t89-openai_gpt_oss_20b.rb b/tasks/t89-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..7b60c31 --- /dev/null +++ b/tasks/t89-openai_gpt_oss_20b.rb @@ -0,0 +1,5 @@ +def encrypt(s) + s.chars.map do |c| + ((c.ord - 97 + 4) % 26 + 97).chr + end.join +end \ No newline at end of file diff --git a/tasks/t9-openai_gpt_oss_120b.rb b/tasks/t9-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..563acbb --- /dev/null +++ b/tasks/t9-openai_gpt_oss_120b.rb @@ -0,0 +1,9 @@ +def rolling_max(numbers) + result = [] + max = nil + numbers.each do |num| + max = max.nil? ? num : (max > num ? max : num) + result << max + end + result +end \ No newline at end of file diff --git a/tasks/t9-openai_gpt_oss_20b.rb b/tasks/t9-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..6449db9 --- /dev/null +++ b/tasks/t9-openai_gpt_oss_20b.rb @@ -0,0 +1,9 @@ +def rolling_max(numbers) + result = [] + current_max = nil + numbers.each do |num| + current_max = num if current_max.nil? || num > current_max + result << current_max + end + result +end \ No newline at end of file diff --git a/tasks/t90-openai_gpt_oss_120b.rb b/tasks/t90-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..c5d9052 --- /dev/null +++ b/tasks/t90-openai_gpt_oss_120b.rb @@ -0,0 +1,14 @@ +def next_smallest(list) + return nil if list.nil? || list.size < 2 + min = nil + second = nil + list.each do |x| + if min.nil? || x < min + second = min + min = x + elsif x != min && (second.nil? || x < second) + second = x + end + end + second +end \ No newline at end of file diff --git a/tasks/t90-openai_gpt_oss_20b.rb b/tasks/t90-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..60b59c7 --- /dev/null +++ b/tasks/t90-openai_gpt_oss_20b.rb @@ -0,0 +1,6 @@ +def next_smallest(list) + return nil if list.size < 2 + min = list.min + second = list.select { |x| x > min }.min + second +end \ No newline at end of file diff --git a/tasks/t91-openai_gpt_oss_120b.rb b/tasks/t91-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..ccfdfdc --- /dev/null +++ b/tasks/t91-openai_gpt_oss_120b.rb @@ -0,0 +1,10 @@ +def count_boredoms(text) + return 0 if text.nil? || text.empty? + count = 0 + text.split(/[.!?]/).each do |segment| + trimmed = segment.lstrip + next if trimmed.empty? + count += 1 if trimmed.start_with?('I') + end + count +end \ No newline at end of file diff --git a/tasks/t91-openai_gpt_oss_20b.rb b/tasks/t91-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..c8ad688 --- /dev/null +++ b/tasks/t91-openai_gpt_oss_20b.rb @@ -0,0 +1,11 @@ +def count_boredoms(text) + return 0 if text.nil? || text.empty? + sentences = text.split(/[.!?]/) + count = 0 + sentences.each do |sentence| + stripped = sentence.lstrip + next if stripped.empty? + count += 1 if stripped =~ /\AI\b/ + end + count +end \ No newline at end of file diff --git a/tasks/t92-openai_gpt_oss_120b.rb b/tasks/t92-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..ab8e761 --- /dev/null +++ b/tasks/t92-openai_gpt_oss_120b.rb @@ -0,0 +1,4 @@ +def any_int?(x, y, z) + return false unless x.is_a?(Integer) && y.is_a?(Integer) && z.is_a?(Integer) + x == y + z || y == x + z || z == x + y +end \ No newline at end of file diff --git a/tasks/t92-openai_gpt_oss_20b.rb b/tasks/t92-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..0047a63 --- /dev/null +++ b/tasks/t92-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def any_int?(x, y, z) + integers = [x, y, z].all? do |n| + n.is_a?(Integer) || (n.is_a?(Float) && n == n.to_i) + end + return false unless integers + + x == y + z || y == x + z || z == x + y +end \ No newline at end of file diff --git a/tasks/t93-openai_gpt_oss_120b.rb b/tasks/t93-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..e5309f3 --- /dev/null +++ b/tasks/t93-openai_gpt_oss_120b.rb @@ -0,0 +1,11 @@ +def encode(message) + vowels = %w[a e i o u A E I O U] + message.each_char.map do |ch| + swapped = ch.swapcase + if vowels.include?(swapped) + (swapped.ord + 2).chr + else + swapped + end + end.join +end \ No newline at end of file diff --git a/tasks/t93-openai_gpt_oss_20b.rb b/tasks/t93-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..d298094 --- /dev/null +++ b/tasks/t93-openai_gpt_oss_20b.rb @@ -0,0 +1,18 @@ +def encode(message) + vowels = %w[a e i o u] + result = +"" + message.each_char do |ch| + if ch =~ /[A-Za-z]/ + inverted = ch =~ /[A-Z]/ ? ch.downcase : ch.upcase + if vowels.include?(inverted.downcase) + replaced = (inverted.ord + 2).chr + result << replaced + else + result << inverted + end + else + result << ch + end + end + result +end \ No newline at end of file diff --git a/tasks/t94-openai_gpt_oss_120b.rb b/tasks/t94-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..a293a5b --- /dev/null +++ b/tasks/t94-openai_gpt_oss_120b.rb @@ -0,0 +1,18 @@ +def prime?(n) + return false if n < 2 + return true if n == 2 + return false if n.even? + limit = Math.sqrt(n).to_i + i = 3 + while i <= limit + return false if n % i == 0 + i += 2 + end + true +end + +def sum_largest_prime_digits(numbers) + max_prime = numbers.select { |num| prime?(num) }.max + return 0 unless max_prime + max_prime.to_s.chars.map { |c| c.to_i }.sum +end \ No newline at end of file diff --git a/tasks/t94-openai_gpt_oss_20b.rb b/tasks/t94-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..b318245 --- /dev/null +++ b/tasks/t94-openai_gpt_oss_20b.rb @@ -0,0 +1,22 @@ +def sum_largest_prime_digits(numbers) + return 0 if numbers.empty? + + is_prime = lambda do |n| + return false if n < 2 + return true if n == 2 + return false if n.even? + limit = Math.sqrt(n).to_i + i = 3 + while i <= limit + return false if n % i == 0 + i += 2 + end + true + end + + primes = numbers.select { |num| is_prime.call(num) } + return 0 if primes.empty? + + largest_prime = primes.max + largest_prime.to_s.chars.map { |c| c.to_i }.sum +end \ No newline at end of file diff --git a/tasks/t95-openai_gpt_oss_120b.rb b/tasks/t95-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..dd5a889 --- /dev/null +++ b/tasks/t95-openai_gpt_oss_120b.rb @@ -0,0 +1,23 @@ +def check_dict_case(hash) + return false if hash.empty? + hash.each_key do |k| + return false unless k.is_a?(String) + end + first = hash.keys.first + if first == first.downcase + expected = :down + elsif first == first.upcase + expected = :up + else + return false + end + hash.each_key do |k| + case expected + when :down + return false unless k == k.downcase + when :up + return false unless k == k.upcase + end + end + true +end \ No newline at end of file diff --git a/tasks/t95-openai_gpt_oss_20b.rb b/tasks/t95-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..26f5771 --- /dev/null +++ b/tasks/t95-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def check_dict_case(hash) + return false if hash.empty? + keys = hash.keys + return false unless keys.all? { |k| k.is_a?(String) } + lower = keys.all? { |k| k == k.downcase } + upper = keys.all? { |k| k == k.upcase } + lower || upper +end \ No newline at end of file diff --git a/tasks/t96-openai_gpt_oss_120b.rb b/tasks/t96-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..4477907 --- /dev/null +++ b/tasks/t96-openai_gpt_oss_120b.rb @@ -0,0 +1,17 @@ +def count_up_to(n) + return [] if n <= 2 + primes = [] + (2...n).each do |i| + is_prime = true + limit = Math.sqrt(i).to_i + primes.each do |p| + break if p > limit + if i % p == 0 + is_prime = false + break + end + end + primes << i if is_prime + end + primes +end \ No newline at end of file diff --git a/tasks/t96-openai_gpt_oss_20b.rb b/tasks/t96-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..d093581 --- /dev/null +++ b/tasks/t96-openai_gpt_oss_20b.rb @@ -0,0 +1,13 @@ +def count_up_to(n) + return [] if n <= 1 + sieve = Array.new(n, true) + sieve[0] = sieve[1] = false if n > 1 + limit = Math.sqrt(n - 1).to_i + (2..limit).each do |i| + next unless sieve[i] + (i * i).step(n - 1, i) { |j| sieve[j] = false } + end + primes = [] + (2...n).each { |i| primes << i if sieve[i] } + primes +end \ No newline at end of file diff --git a/tasks/t97-openai_gpt_oss_120b.rb b/tasks/t97-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..0059325 --- /dev/null +++ b/tasks/t97-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def multiply(a, b) + (a % 10) * (b % 10) +end \ No newline at end of file diff --git a/tasks/t97-openai_gpt_oss_20b.rb b/tasks/t97-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..b719ce3 --- /dev/null +++ b/tasks/t97-openai_gpt_oss_20b.rb @@ -0,0 +1,3 @@ +def multiply(a, b) + (a.abs % 10) * (b.abs % 10) +end \ No newline at end of file diff --git a/tasks/t98-openai_gpt_oss_120b.rb b/tasks/t98-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..3517340 --- /dev/null +++ b/tasks/t98-openai_gpt_oss_120b.rb @@ -0,0 +1,8 @@ +def count_upper(s) + vowels = %w[A E I O U] + count = 0 + s.each_char.with_index do |ch, i| + count += 1 if i.even? && vowels.include?(ch) + end + count +end \ No newline at end of file diff --git a/tasks/t98-openai_gpt_oss_20b.rb b/tasks/t98-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..8dbf752 --- /dev/null +++ b/tasks/t98-openai_gpt_oss_20b.rb @@ -0,0 +1,8 @@ +def count_upper(s) + vowels = ['A', 'E', 'I', 'O', 'U'] + count = 0 + s.each_char.with_index do |char, idx| + count += 1 if idx.even? && vowels.include?(char) + end + count +end \ No newline at end of file diff --git a/tasks/t99-openai_gpt_oss_120b.rb b/tasks/t99-openai_gpt_oss_120b.rb new file mode 100644 index 0000000..0438b55 --- /dev/null +++ b/tasks/t99-openai_gpt_oss_120b.rb @@ -0,0 +1,3 @@ +def closest_integer(value) + value.to_f.round +end \ No newline at end of file diff --git a/tasks/t99-openai_gpt_oss_20b.rb b/tasks/t99-openai_gpt_oss_20b.rb new file mode 100644 index 0000000..530cff2 --- /dev/null +++ b/tasks/t99-openai_gpt_oss_20b.rb @@ -0,0 +1,15 @@ +def closest_integer(value) + f = value.to_f + lower = f.floor + upper = f.ceil + return f.to_i if lower == upper + diff_lower = f - lower + diff_upper = upper - f + if diff_lower < diff_upper + lower + elsif diff_lower > diff_upper + upper + else + f > 0 ? upper : lower + end +end \ No newline at end of file
МодельУспешность
moonshotai_kimi_k283%
deepseek_deepseek_chat_v3_032482%
google_gemini_2_5_flash_preview82%
openai_gpt_oss_120b82%
deepseek_deepseek_chat_free79%
google_gemini_2_0_flash_lite_00179%
google_gemini_2_5_flash_lite_preview_06_1778%