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:
File size: 464 Bytes
e5529fb | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | 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
}
}
|