id stringlengths 17 26 | language stringclasses 9
values | difficulty stringclasses 3
values | category stringclasses 7
values | prompt stringlengths 66 215 | output_format stringclasses 20
values | entry_point stringclasses 4
values | reference_solution null | tests stringlengths 2 79 | timeout_seconds int64 3 3 | metadata stringlengths 175 559 |
|---|---|---|---|---|---|---|---|---|---|---|
smolscript-csharp-0173 | csharp | medium | collections_loops | In C#, Select items at odd zero-based indices from values in original order. Return their sum. | Return only the function public static long Solve(long[] values) inside public class Solution. | Solve | null | [{"expected":2,"input":[1,2,3]},{"expected":0,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"f437c8993c06242e214012b3399712402c921df3413b8fcc512dd5c9a2780b1c"} |
smolscript-csharp-0175 | csharp | medium | collections_loops | In C#, Select positive items from values in original order. Return their number of distinct values. | Return only the function public static long Solve(long[] values) inside public class Solution. | Solve | null | [{"expected":3,"input":[1,2,3]},{"expected":1,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"bbb5a3885aedf9121b59faa02f23987013722dbbb6d058a7c81b9375dc0e5776"} |
smolscript-csharp-0176 | csharp | medium | collections_loops | In C#, Select items with absolute value at most three from values in original order. Return their maximum. Return 0 when none are selected. | Return only the function public static long Solve(long[] values) inside public class Solution. | Solve | null | [{"expected":3,"input":[1,2,3]},{"expected":2,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"10df1f967ac4e41760384381cc0cd966c29f9d403d173cc97f6bd8695cf684ad"} |
smolscript-csharp-0181 | csharp | medium | collections_loops | In C#, Select items at even zero-based indices from values in original order. Return their number of distinct values. | Return only the function public static long Solve(long[] values) inside public class Solution. | Solve | null | [{"expected":2,"input":[1,2,3]},{"expected":2,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"f7de58b20c4f979112bcd74ce55e46b16f27f0885e24111cdeb2f0df25bc5784"} |
smolscript-csharp-0182 | csharp | medium | collections_loops | In C#, Select all items from values in original order. Return their maximum. Return 0 when none are selected. | Return only the function public static long Solve(long[] values) inside public class Solution. | Solve | null | [{"expected":3,"input":[1,2,3]},{"expected":2,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"6a8e0746549b8e7b04060b8c6739c1a29a3f5309b888df5ed75733d7468afdac"} |
smolscript-csharp-0185 | csharp | medium | frequency_tables | In C#, Select odd items from values in original order. Return their largest frequency of a value. | Return only the function public static long Solve(long[] values) inside public class Solution. | Solve | null | [{"expected":1,"input":[1,2,3]},{"expected":0,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"74d575fca848f398fdda8449bcef6c12640f163d81dca6efaec257b4bee035f0"} |
smolscript-csharp-0187 | csharp | medium | collections_loops | In C#, Select all items from values in original order. Return their first value. Return 0 when none are selected. | Return only the function public static long Solve(long[] values) inside public class Solution. | Solve | null | [{"expected":1,"input":[1,2,3]},{"expected":-2,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"e160e0c67e818776e1bac59b64d8c6798dc202bbf30337f07d70bb07aec4e3ff"} |
smolscript-csharp-0204 | csharp | moderate | collections_loops | In C#, Select nonzero items from values in original order. For each selected item, square it. Return their sum. | Return only the function public static long Solve(long[] values) inside public class Solution. | Solve | null | [{"expected":14,"input":[1,2,3]},{"expected":8,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"dbc19e2bae71d9881bedacdc079131db159b52371496c0d4d2a2dd51ea7cfbd6"} |
smolscript-csharp-0205 | csharp | moderate | collections_loops | In C#, Select items with absolute value at most three from values in original order. For each selected item, replace it with -1, 0, or 1 according to its sign. Return their number of distinct values. | Return only the function public static long Solve(long[] values) inside public class Solution. | Solve | null | [{"expected":1,"input":[1,2,3]},{"expected":3,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"be6804501845e0e77e18501b23e96a1453ce25c8c636c59cdc5554f06044ae14"} |
smolscript-csharp-0216 | csharp | moderate | collections_loops | In C#, Select nonzero items from values in original order. For each selected item, replace it with -1, 0, or 1 according to its sign. Return their sum. | Return only the function public static long Solve(long[] values) inside public class Solution. | Solve | null | [{"expected":3,"input":[1,2,3]},{"expected":0,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"b2ec38ef2c8789f4975d427555c81ed73b5690fa35bd589df1b8077390923a89"} |
smolscript-csharp-0222 | csharp | moderate | frequency_tables | In C#, Select nonzero items from values in original order. For each selected item, take its absolute value. Return their largest frequency of a value. | Return only the function public static long Solve(long[] values) inside public class Solution. | Solve | null | [{"expected":1,"input":[1,2,3]},{"expected":2,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"aa20e8ad412a4cf1b2ba2f90053a7fdf721edafe00a2116b2f8c2a95fb7807f1"} |
smolscript-rust-0002 | rust | easy | strings | In Rust, Starting with ASCII string s, convert lowercase ASCII letters to uppercase, then convert uppercase ASCII letters to lowercase. Return the result. | Return only the function fn solve(mut s: String) -> String. Do not include a main program. | solve | null | [{"expected":"hello","input":"Hello"},{"expected":" code ","input":" Code "}] | 3 | {"family":"string","input_domain":"ASCII s of at most 80 characters, without newlines.","protocol":"smolscript-0.3.0","semantic_id":"d72b70a400dc3832144dc2eac80cc8ce0f08324063f36287efb727f4c25f92c3"} |
smolscript-rust-0003 | rust | easy | arithmetic_conditions | In Rust, Starting with n, clamp it to the inclusive range -5 to 5, then subtract it from ten. Return the result. | Return only the function fn solve(mut n: i64) -> i64. Do not include a main program. | solve | null | [{"expected":7,"input":3},{"expected":12,"input":-2}] | 3 | {"family":"scalar","input_domain":"Integer n from -120 to 120.","protocol":"smolscript-0.3.0","semantic_id":"7c8efc7e37e7026e7e0bcacdf4e2bbdac144ddbe07576c4b102ca139d2c3509d"} |
smolscript-rust-0006 | rust | easy | strings | In Rust, Starting with ASCII string s, keep characters from index floor(length/2) onward, then keep the first floor(length/2) characters. Return the result. | Return only the function fn solve(mut s: String) -> String. Do not include a main program. | solve | null | [{"expected":"l","input":"Hello"},{"expected":"od","input":" Code "}] | 3 | {"family":"string","input_domain":"ASCII s of at most 80 characters, without newlines.","protocol":"smolscript-0.3.0","semantic_id":"5c8c1c0f14dde36a09082a2c21bbb69576eac91998e14b0ada08ea0e0b83a9b0"} |
smolscript-rust-0015 | rust | easy | arithmetic_conditions | In Rust, Starting with n, double it, then take the last decimal digit of its absolute value. Return the result. | Return only the function fn solve(mut n: i64) -> i64. Do not include a main program. | solve | null | [{"expected":6,"input":3},{"expected":4,"input":-2}] | 3 | {"family":"scalar","input_domain":"Integer n from -120 to 120.","protocol":"smolscript-0.3.0","semantic_id":"ade7b55151527a3deee5ca1434bee8d379e3bb237dd779de03319398cf7fce4a"} |
smolscript-rust-0017 | rust | easy | arithmetic_conditions | In Rust, Starting with n, take its absolute value, then add one. Return the result. | Return only the function fn solve(mut n: i64) -> i64. Do not include a main program. | solve | null | [{"expected":4,"input":3},{"expected":3,"input":-2}] | 3 | {"family":"scalar","input_domain":"Integer n from -120 to 120.","protocol":"smolscript-0.3.0","semantic_id":"9a7c80ba874fd76ffdde6dcd7c801961ed511a4842aca48e902cea7de11eedde"} |
smolscript-rust-0029 | rust | easy | arithmetic_conditions | In Rust, Starting with n, add one, then subtract it from ten. Return the result. | Return only the function fn solve(mut n: i64) -> i64. Do not include a main program. | solve | null | [{"expected":6,"input":3},{"expected":11,"input":-2}] | 3 | {"family":"scalar","input_domain":"Integer n from -120 to 120.","protocol":"smolscript-0.3.0","semantic_id":"c7e979d6564facd56943353026d30b702b2b0aa6f6108fadcb564316284c616f"} |
smolscript-rust-0030 | rust | easy | strings | In Rust, Starting with ASCII string s, remove leading and trailing spaces, then remove leading and trailing spaces. Return the result. | Return only the function fn solve(mut s: String) -> String. Do not include a main program. | solve | null | [{"expected":"Hello","input":"Hello"},{"expected":"Code","input":" Code "}] | 3 | {"family":"string","input_domain":"ASCII s of at most 80 characters, without newlines.","protocol":"smolscript-0.3.0","semantic_id":"cca9cb316b095a5f43e5d501020f1a2560fabd1ab6d01cc7e014bc3c85b471cf"} |
smolscript-rust-0031 | rust | easy | arithmetic_conditions | In Rust, Starting with n, add one, then replace it with 1 if even, otherwise 0. Return the result. | Return only the function fn solve(mut n: i64) -> i64. Do not include a main program. | solve | null | [{"expected":1,"input":3},{"expected":0,"input":-2}] | 3 | {"family":"scalar","input_domain":"Integer n from -120 to 120.","protocol":"smolscript-0.3.0","semantic_id":"cbc3e1dfa44187921111ce071b1fd55eeec1d1f77517fe5b8eaccbd2ee904204"} |
smolscript-rust-0033 | rust | easy | arithmetic_conditions | In Rust, Starting with n, negate it, then replace it with -1, 0, or 1 according to its sign. Return the result. | Return only the function fn solve(mut n: i64) -> i64. Do not include a main program. | solve | null | [{"expected":-1,"input":3},{"expected":1,"input":-2}] | 3 | {"family":"scalar","input_domain":"Integer n from -120 to 120.","protocol":"smolscript-0.3.0","semantic_id":"9bbed522c596aca42bc66c8aa1f0af146d6f9c1513f011173cb38803ea95277c"} |
smolscript-rust-0046 | rust | easy | strings | In Rust, Starting with ASCII string s, keep the first floor(length/2) characters, then swap the case of ASCII letters. Return the result. | Return only the function fn solve(mut s: String) -> String. Do not include a main program. | solve | null | [{"expected":"hE","input":"Hello"},{"expected":" c","input":" Code "}] | 3 | {"family":"string","input_domain":"ASCII s of at most 80 characters, without newlines.","protocol":"smolscript-0.3.0","semantic_id":"cc57555ffbf9802702d5d5dc94e9754a2b569d94f537c32bdbb5ab73e015f675"} |
smolscript-rust-0051 | rust | easy | arithmetic_conditions | In Rust, Starting with n, take the last decimal digit of its absolute value, then clamp it to the inclusive range -5 to 5. Return the result. | Return only the function fn solve(mut n: i64) -> i64. Do not include a main program. | solve | null | [{"expected":3,"input":3},{"expected":2,"input":-2}] | 3 | {"family":"scalar","input_domain":"Integer n from -120 to 120.","protocol":"smolscript-0.3.0","semantic_id":"19cb30424ca4502257c78aa702f50371fdaa20d55720258943468f6cd3f4338a"} |
smolscript-rust-0056 | rust | easy | strings | In Rust, Starting with ASCII string s, keep the first floor(length/2) characters, then keep characters from index floor(length/2) onward. Return the result. | Return only the function fn solve(mut s: String) -> String. Do not include a main program. | solve | null | [{"expected":"e","input":"Hello"},{"expected":" C","input":" Code "}] | 3 | {"family":"string","input_domain":"ASCII s of at most 80 characters, without newlines.","protocol":"smolscript-0.3.0","semantic_id":"480bcb355f50cb4c57c84eaf826c62f1dcc1c6460e896c8072939cd2a431f389"} |
smolscript-rust-0060 | rust | easy | strings | In Rust, Starting with ASCII string s, keep characters from index floor(length/2) onward, then keep only decimal digits. Return the result. | Return only the function fn solve(mut s: String) -> String. Do not include a main program. | solve | null | [{"expected":"","input":"Hello"},{"expected":"","input":" Code "}] | 3 | {"family":"string","input_domain":"ASCII s of at most 80 characters, without newlines.","protocol":"smolscript-0.3.0","semantic_id":"66691f529e2341f74a3ec4e9d86a8d1e6c1b0bc3f32fda5668e18c9933405261"} |
smolscript-rust-0063 | rust | easy | arithmetic_conditions | In Rust, Starting with n, negate it, then replace it with 1 if even, otherwise 0. Return the result. | Return only the function fn solve(mut n: i64) -> i64. Do not include a main program. | solve | null | [{"expected":0,"input":3},{"expected":1,"input":-2}] | 3 | {"family":"scalar","input_domain":"Integer n from -120 to 120.","protocol":"smolscript-0.3.0","semantic_id":"1abf747fd6e7fae059b08f2bf25fbbdd3aeae7c07ea14de0d1647d0dd5a82ae2"} |
smolscript-rust-0070 | rust | easy | strings | In Rust, Starting with ASCII string s, remove leading and trailing spaces, then replace each run of spaces with one space. Return the result. | Return only the function fn solve(mut s: String) -> String. Do not include a main program. | solve | null | [{"expected":"Hello","input":"Hello"},{"expected":"Code","input":" Code "}] | 3 | {"family":"string","input_domain":"ASCII s of at most 80 characters, without newlines.","protocol":"smolscript-0.3.0","semantic_id":"2ca9e839fa72a29fe2fe908e370c9fde372ede8b642008715505caf3115a483f"} |
smolscript-rust-0083 | rust | easy | arithmetic_conditions | In Rust, Starting with n, square it, then add one. Return the result. | Return only the function fn solve(mut n: i64) -> i64. Do not include a main program. | solve | null | [{"expected":10,"input":3},{"expected":5,"input":-2}] | 3 | {"family":"scalar","input_domain":"Integer n from -120 to 120.","protocol":"smolscript-0.3.0","semantic_id":"9c552536e51f9330f811ae738d4994138987bcae15c2207b04dc410108266e5f"} |
smolscript-rust-0091 | rust | easy | arithmetic_conditions | In Rust, Starting with n, take the tens digit of its absolute value, then subtract it from ten. Return the result. | Return only the function fn solve(mut n: i64) -> i64. Do not include a main program. | solve | null | [{"expected":10,"input":3},{"expected":10,"input":-2}] | 3 | {"family":"scalar","input_domain":"Integer n from -120 to 120.","protocol":"smolscript-0.3.0","semantic_id":"b20f05421a6eaff24fda5353cd76cd95dc1abc90c3f58efcc1cfe86ff1bd9d0c"} |
smolscript-rust-0106 | rust | easy | strings | In Rust, Starting with ASCII string s, remove vowels aeiou in either case, then remove vowels aeiou in either case. Return the result. | Return only the function fn solve(mut s: String) -> String. Do not include a main program. | solve | null | [{"expected":"Hll","input":"Hello"},{"expected":" Cd ","input":" Code "}] | 3 | {"family":"string","input_domain":"ASCII s of at most 80 characters, without newlines.","protocol":"smolscript-0.3.0","semantic_id":"f1d5bd69b10a080384537c382e3a78baa6faf45e0beb6a93702baa135082f396"} |
smolscript-rust-0115 | rust | easy | arithmetic_conditions | In Rust, Starting with n, subtract it from ten, then double it. Return the result. | Return only the function fn solve(mut n: i64) -> i64. Do not include a main program. | solve | null | [{"expected":14,"input":3},{"expected":24,"input":-2}] | 3 | {"family":"scalar","input_domain":"Integer n from -120 to 120.","protocol":"smolscript-0.3.0","semantic_id":"5c00ec7cacd152f9bc3cf7177508a18352a4c6e010a2c097524597552ca24482"} |
smolscript-rust-0116 | rust | easy | strings | In Rust, Starting with ASCII string s, remove leading and trailing spaces, then keep only ASCII letters. Return the result. | Return only the function fn solve(mut s: String) -> String. Do not include a main program. | solve | null | [{"expected":"Hello","input":"Hello"},{"expected":"Code","input":" Code "}] | 3 | {"family":"string","input_domain":"ASCII s of at most 80 characters, without newlines.","protocol":"smolscript-0.3.0","semantic_id":"fa9003f7c513422aa682419cb9801d44a1cd3352fdce2ca766089e8508d6dc5d"} |
smolscript-rust-0132 | rust | easy | strings | In Rust, Starting with ASCII string s, reverse the characters, then remove every space. Return the result. | Return only the function fn solve(mut s: String) -> String. Do not include a main program. | solve | null | [{"expected":"olleH","input":"Hello"},{"expected":"edoC","input":" Code "}] | 3 | {"family":"string","input_domain":"ASCII s of at most 80 characters, without newlines.","protocol":"smolscript-0.3.0","semantic_id":"3e7e7cb3608459260f6daf3926c6642aece3924558c4f944181c61ad8f078762"} |
smolscript-rust-0133 | rust | easy | arithmetic_conditions | In Rust, Starting with n, replace it with -1, 0, or 1 according to its sign, then double it. Return the result. | Return only the function fn solve(mut n: i64) -> i64. Do not include a main program. | solve | null | [{"expected":2,"input":3},{"expected":-2,"input":-2}] | 3 | {"family":"scalar","input_domain":"Integer n from -120 to 120.","protocol":"smolscript-0.3.0","semantic_id":"7f7eddf8a1ffa511040d241cbcf0b73bfca3a2cebaa59b47415fd95fb9d32fa1"} |
smolscript-rust-0134 | rust | easy | strings | In Rust, Starting with ASCII string s, keep characters from index floor(length/2) onward, then keep characters from index floor(length/2) onward. Return the result. | Return only the function fn solve(mut s: String) -> String. Do not include a main program. | solve | null | [{"expected":"lo","input":"Hello"},{"expected":"e ","input":" Code "}] | 3 | {"family":"string","input_domain":"ASCII s of at most 80 characters, without newlines.","protocol":"smolscript-0.3.0","semantic_id":"e4743c0d060cd8601652e269282204bff11ffa4d199d18276d770ec2bf48b28c"} |
smolscript-rust-0138 | rust | medium | collections_loops | In Rust, Select items at odd zero-based indices from values in original order. Return their last value. Return 0 when none are selected. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":2,"input":[1,2,3]},{"expected":0,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"78ccaeffcfcd1390bf6fc35b5de737c68e7996b2418298a555ca096e8ae741db"} |
smolscript-rust-0148 | rust | medium | collections_loops | In Rust, Select even items from values in original order. Return their sum. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":2,"input":[1,2,3]},{"expected":0,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"d01e8428cc3c94e2cb37dce97a04d20d0b9626e783a8a918839d987c1daa4d47"} |
smolscript-rust-0152 | rust | medium | collections_loops | In Rust, Select items at even zero-based indices from values in original order. Return their count. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":2,"input":[1,2,3]},{"expected":2,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"7f9141068fddd28f069edb74a65c43dbd4141365459479489caa6ad106e9c620"} |
smolscript-rust-0158 | rust | medium | collections_loops | In Rust, Select items at odd zero-based indices from values in original order. Return their count. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":1,"input":[1,2,3]},{"expected":1,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"290f81bbf90160ab72c0f01d5e4f85aab52f95b23572e5654cfa259b8df1360c"} |
smolscript-rust-0160 | rust | medium | collections_loops | In Rust, Select nonzero items from values in original order. Return their minimum. Return 0 when none are selected. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":1,"input":[1,2,3]},{"expected":-2,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"89278f784ef636295e87a12b13d38f3fd77a9a3afc39646cf2268e162a6dd2a0"} |
smolscript-rust-0165 | rust | medium | collections_loops | In Rust, Select items at odd zero-based indices from values in original order. Return their maximum minus minimum. Return 0 when none are selected. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":0,"input":[1,2,3]},{"expected":0,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"449b8ba12d8e3762e69ba977650487c3b30c50f5c71a2c51f26bcb2bc487769a"} |
smolscript-rust-0176 | rust | medium | collections_loops | In Rust, Select items with absolute value at most three from values in original order. Return their maximum. Return 0 when none are selected. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":3,"input":[1,2,3]},{"expected":2,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"10df1f967ac4e41760384381cc0cd966c29f9d403d173cc97f6bd8695cf684ad"} |
smolscript-rust-0178 | rust | medium | collections_loops | In Rust, Select items with absolute value greater than three from values in original order. Return their maximum minus minimum. Return 0 when none are selected. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":0,"input":[1,2,3]},{"expected":0,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"04e4ef9a1e6359877c3ed543a38575c34ced5da7dac4b70e6cca762907fa3ba2"} |
smolscript-rust-0190 | rust | medium | collections_loops | In Rust, Select items with absolute value at most three from values in original order. Return their first value. Return 0 when none are selected. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":1,"input":[1,2,3]},{"expected":-2,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"b55f15c1b415ec88e1f39c47cee6c77ab01331c8c995a0376c77624873537476"} |
smolscript-rust-0196 | rust | medium | collections_loops | In Rust, Select items with absolute value at most three from values in original order. Return their last value. Return 0 when none are selected. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":3,"input":[1,2,3]},{"expected":2,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"93487efb07e2ab4c455cc5e5c80ed09863258fde647ee5bb2fad694c85b578cd"} |
smolscript-rust-0198 | rust | medium | collections_loops | In Rust, Select nonzero items from values in original order. Return their maximum. Return 0 when none are selected. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":3,"input":[1,2,3]},{"expected":2,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"053eebb9d6b4756bb9f4208b9bed3718c42e493856dd532d2d9c4c98a32a5939"} |
smolscript-rust-0199 | rust | medium | frequency_tables | In Rust, Select positive items from values in original order. Return their largest frequency of a value. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":1,"input":[1,2,3]},{"expected":1,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"7304131d264fe60c1d19eef4307a3b20ad46de5a67d04c7d42aed76fe04564fa"} |
smolscript-rust-0203 | rust | moderate | collections_loops | In Rust, Select items at odd zero-based indices from values in original order. For each selected item, double it. Return their maximum minus minimum. Return 0 when none are selected. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":0,"input":[1,2,3]},{"expected":0,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"85c9c0d5316b01f6e69ea5a711697bc201f89aec76f437c0833a1564d8c4e028"} |
smolscript-rust-0214 | rust | moderate | collections_loops | In Rust, Select all items from values in original order. For each selected item, replace it with -1, 0, or 1 according to its sign. Return their maximum. Return 0 when none are selected. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":1,"input":[1,2,3]},{"expected":1,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"7855867b78c8421e299b7eaa78f023d5998cf9f7ff94b505c02342acfa61116a"} |
smolscript-rust-0215 | rust | moderate | collections_loops | In Rust, Select items at even zero-based indices from values in original order. For each selected item, negate it. Return their sum. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":-4,"input":[1,2,3]},{"expected":0,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"aa22d5ce24befd134488633bd13f5fd67ceaa5a1ec7f49a6e1f66fc2bcd46f47"} |
smolscript-rust-0221 | rust | moderate | frequency_tables | In Rust, Select all items from values in original order. For each selected item, square it. Return their largest frequency of a value. | Return only the function fn solve(values: Vec<i64>) -> i64. Do not include a main program. | solve | null | [{"expected":1,"input":[1,2,3]},{"expected":2,"input":[-2,0,2]}] | 3 | {"family":"array","input_domain":"At most eight integers, each from -6 to 6.","protocol":"smolscript-0.3.0","semantic_id":"506c6dd09551f4de09b9eac4d2f318c1f3e2f2e41eaa8f2094f91381bd4f00e4"} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.