Datasets:
Tasks:
Text Generation
Modalities:
Text
Formats:
json
Languages:
English
Size:
< 1K
ArXiv:
Tags:
competitive-programming
code-generation
specification-generation
proof-generation
verification
rust
License:
Download leetcode/lc1276/code.rs from Gax-c/VeriContest_Lite: direct link, hf CLI and curl.
- Browser
- Download file 464 Bytes
-
https://huggingface.co/datasets/Gax-c/VeriContest_Lite/resolve/main/leetcode/lc1276/code.rs
- Command line
-
hf download hf://datasets/Gax-c/VeriContest_Lite/leetcode/lc1276/code.rs
-
curl -L -o code.rs https://huggingface.co/datasets/Gax-c/VeriContest_Lite/resolve/main/leetcode/lc1276/code.rs
464 Bytes
| impl Solution { | |
| pub fn num_of_burgers(tomato_slices: i32, cheese_slices: i32) -> Vec<i32> { | |
| if tomato_slices % 2 != 0 { | |
| return Vec::new(); | |
| } | |
| let jumbo = tomato_slices / 2 - cheese_slices; | |
| let small = cheese_slices - jumbo; | |
| if jumbo < 0 || small < 0 { | |
| return Vec::new(); | |
| } | |
| let mut result = Vec::new(); | |
| result.push(jumbo); | |
| result.push(small); | |
| result | |
| } | |
| } | |